VB6 - SQL connection

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2008
Posts: 3
Reputation: Saboto_me is an unknown quantity at this point 
Solved Threads: 0
Saboto_me Saboto_me is offline Offline
Newbie Poster

VB6 - SQL connection

 
0
  #1
Apr 25th, 2008
Hello Friends,
Good day to you all
I have been using Access as a base for all my vb projects. I am told SQL is more secure and can handle a wide range of data. I have therefore decided to give it a try, but I don't have any Idea as to how to do the connection. Can anybody help me by taking me through the steps to go through to connect to SQL database.

Any suggestion will be much appreciated.
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 645
Reputation: binoj_daniel is an unknown quantity at this point 
Solved Threads: 17
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: VB6 - SQL connection

 
0
  #2
Apr 25th, 2008
Hi,
Nothing offence but if you search with this keyword on daniweb "sql connection" you will see lot of good results. Also I would suggest you to read some SQL Books to start with.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 537
Reputation: choudhuryshouvi is an unknown quantity at this point 
Solved Threads: 49
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro

Re: VB6 - SQL connection

 
0
  #3
Apr 26th, 2008
do you know anything about sql?

do you ever worked with a database server like SQL SERVER or ORACLE?

i'm asking this because there is a lot of things first you need to know before you make any project using any server side rdbms.
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 3
Reputation: Saboto_me is an unknown quantity at this point 
Solved Threads: 0
Saboto_me Saboto_me is offline Offline
Newbie Poster

Re: VB6 - SQL connection

 
0
  #4
Apr 28th, 2008
Hello Shouvik,
Thanks for the quik response to my request, I really appreciate it.
I have been reading about SQL 2000 for a couple of weeks.
All I know for now is how to create and delete databases and tables as well as enter, delete and edit data.
Please let me know what else to read about to be able to connect the table to my forms.
thanks.

Hey Binoj,
Thanks so much for your advise, I will try them too.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 537
Reputation: choudhuryshouvi is an unknown quantity at this point 
Solved Threads: 49
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro

Re: VB6 - SQL connection

 
0
  #5
Apr 30th, 2008
well apart from the sql server tutorials you also need to know about the ADO technology. This is useful in order to connect your vb6 application to your sql server database and manipulating various back-end operations. there are a lot of resources about ADO are available on the net. But for your convenience THIS IS A VERY USEFUL LINK YOU CAN VISIT TO KNOW ABOUT ADO PROGRAMMING.

check this and get back here when you have more questions.

regards
Shouvik
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 3
Reputation: Saboto_me is an unknown quantity at this point 
Solved Threads: 0
Saboto_me Saboto_me is offline Offline
Newbie Poster

Converting Excel file to XML using VB6

 
0
  #6
Aug 5th, 2008
Hello friends,
I have an excell file that I want to convert to XML, but I do not know how to go about it.
I would be very grateful if can you help me do that using VB6 codes.
Please note that I am using office 2003.
Thanks.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 44
Reputation: K.Vanlalliana is an unknown quantity at this point 
Solved Threads: 3
K.Vanlalliana K.Vanlalliana is offline Offline
Light Poster

Re: VB6 - SQL connection

 
0
  #7
Aug 6th, 2008
Hi,

You are facing the same problem which I had face before. This is very simple, let my tell you:

First, make a database using SQL and let the database name be 'MyRecord' and your ID for your Database be 'Master' and make Password as '123'. So, to be able to connect to this database using ADO, you may write this code in your VB form / module:


Set ConnectData = New ADODB.Connection
ConnectData.Provider = "SQLOLEDB.1;Password=123;Persist Security Info=True;User ID=Master;Initial Catalog=MyRecord"
ConnectData.Open

To make this code working properly, You have to select ' Microsoft ActiveX data Objects Recordset 2.0 or 2.1 or 2.5 or 2.8'from the preference.

If you do like this, the connection will surely correct.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 44
Reputation: K.Vanlalliana is an unknown quantity at this point 
Solved Threads: 3
K.Vanlalliana K.Vanlalliana is offline Offline
Light Poster

Re: Converting Excel file to XML using VB6

 
0
  #8
Aug 6th, 2008
Originally Posted by Saboto_me View Post
Hello friends,
I have an excell file that I want to convert to XML, but I do not know how to go about it.
I would be very grateful if can you help me do that using VB6 codes.
Please note that I am using office 2003.
Thanks.
OH Friend, this is very simple, Whether you are using Office 97 -2008, the coding is same. Read Excel sheet from VB and display the list using Flex Grid. As there are a number
of way to display excel data (content) in VB Form, do it as you like, and then save this to XML format like thia

.Save App.Path & "\LExtracted\Name_Of File.XML", adPersistXML
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 44
Reputation: K.Vanlalliana is an unknown quantity at this point 
Solved Threads: 3
K.Vanlalliana K.Vanlalliana is offline Offline
Light Poster

Re: VB6 - SQL connection

 
0
  #9
Aug 6th, 2008
[Hi,

You are facing the same problem which I had face before. This is very simple, let my tell you:

First, make a database using SQL and let the database name be 'MyRecord' and your ID for your Database be 'Master' and make Password as '123'. So, to be able to connect to this database using ADO, you may write this code in your VB form / module:


Set ConnectData = New ADODB.Connection
ConnectData.Provider = "SQLOLEDB.1;Password=123;Persist Security Info=True;User ID=Master;Initial Catalog=MyRecord"
ConnectData.Open

To make this code working properly, You have to select ' Microsoft ActiveX data Objects Recordset 2.0 or 2.1 or 2.5 or 2.8'from the preference.

If you do like this, the connection will surely correct.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC