By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,789 Members | 1,215 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,789 IT Pros & Developers. It's quick & easy.

connection to sql server

samycbe
P: 83
dear friends,
i want to connect vb with sql server database. i am not having the rights to create dsn. how can i? please help me.

i connected with access by the following method

Set cn = New ADODB.Connection
cn.Provider = "Microsoft.JET.OLEDB.4.0"
cn.ConnectionString = "d:\vb projects\a.mdb"
cn.Open

please help me.......

samy
Mar 22 '07 #1
Share this Question
Share on Google+
4 Replies


100+
P: 149
dear friends,
i want to connect vb with sql server database. i am not having the rights to create dsn. how can i? please help me.

i connected with access by the following method

Set cn = New ADODB.Connection
cn.Provider = "Microsoft.JET.OLEDB.4.0"
cn.ConnectionString = "d:\vb projects\a.mdb"
cn.Open

please help me.......

samy
Do you need to create a connection through DSN. You can use a DSN less connection.

Check this link out

http://www.freevbcode.com/ShowCode.Asp?ID=1257

thanks
ansuman
Mar 22 '07 #2

Dököll
Expert 100+
P: 2,364
dear friends,
i want to connect vb with sql server database. i am not having the rights to create dsn. how can i? please help me.

i connected with access by the following method

Set cn = New ADODB.Connection
cn.Provider = "Microsoft.JET.OLEDB.4.0"
cn.ConnectionString = "d:\vb projects\a.mdb"
cn.Open

please help me.......

samy
Take ansumansahu's advice. Also, take comfort in the fact that you can add DSN connection/access through your Data Source Admin (Control Panel + Admin Tools)...See if this works well :-)
Mar 27 '07 #3

samycbe
P: 83
I can't use DSN. Because i dont have access of DSN craetion. Please help me the code for connecting the sql server database

please help me

samy
Mar 27 '07 #4

vijaydiwakar
100+
P: 579
dear friends,
i want to connect vb with sql server database. i am not having the rights to create dsn. how can i? please help me.

i connected with access by the following method

Set cn = New ADODB.Connection
cn.Provider = "Microsoft.JET.OLEDB.4.0"
cn.ConnectionString = "d:\vb projects\a.mdb"
cn.Open

please help me.......

samy
try to make ur all programms DSN less as these are very comfertable
use ADODC ctrl drop it on ur form right click on it click on properties and set the connection to use sqlserver then after finishing u'll get a connection string there copy and paste it as
Conn.open <ur coppied connection string here >
try it
good luck
Mar 27 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.