Click here to Skip to main content
15,918,243 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please tell me the Connection String Available in VB 6.0 to Connect to SQL SERVER 2000.
Posted
Updated 9-Nov-11 23:17pm
v2
Comments
Smithers-Jones 10-Nov-11 5:17am    
Removed bold.

Hello,
Here is your answer

Public SqlCon As New System.Data.SqlClient.SqlConnection("server=ComputerName\SqlServerName;user id=sa;pwd=your password;data source=ComputerName\SqlServerName;database=DB name")

------------------------------------------------------
Best regards
Morteza Shoja
ir_digitalboy@yahoo.com
 
Share this answer
 
v2
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
 
Share this answer
 
v2
Comments
RaviRanjanKr 10-Nov-11 5:59am    
[Edited]Code is wrapped in "pre" tag[/Edited]
A suggestion :- Always use "pre" tag to wrapped your code to give better readability to user.
 
Share this answer
 
Comments
RaviRanjanKr 10-Nov-11 6:00am    
My 5+
P.Salini 10-Nov-11 6:07am    
Thank you Ravi
 
Share this answer
 
Comments
RaviRanjanKr 10-Nov-11 5:59am    
Nice Link, My 5+
sachin10d 10-Nov-11 6:27am    
thanks ravi
Have a look here, all connection strings you will ever need.[^]
How I found it? By typing "connection strings" into Google. Remember, Google is your friend.
 
Share this answer
 
Comments
RaviRanjanKr 10-Nov-11 5:59am    
My 5+
Smithers-Jones 10-Nov-11 6:21am    
Thanks a lot, Ravi. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900