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

Problem connect vb6 to sql server

P: 5
i'm new in vb, got some problem in connect to sql server 2000.
i use the following code to connect, n got error.

Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.ConnectionString = "Driver={sql server};server= ABC ;database= test"
conn.ConnectionTimeout = 30
conn.Open


The error i got in vb is

Run-time error -2147467259(80004005):
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied

but i hav start my sql server already.
need help on this problem, thank for helping!
Nov 26 '06 #1
Share this Question
Share on Google+
6 Replies


100+
P: 1,646
i'm new in vb, got some problem in connect to sql server 2000.
i use the following code to connect, n got error.

Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.ConnectionString = "Driver={sql server};server= ABC ;database= test"
conn.ConnectionTimeout = 30
conn.Open


The error i got in vb is

Run-time error -2147467259(80004005):
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied

but i hav start my sql server already.
need help on this problem, thank for helping!
Hi
Is the security for sql server set to Windows or mixed?
Nov 27 '06 #2

sashi
Expert 100+
P: 1,754
i'm new in vb, got some problem in connect to sql server 2000.
i use the following code to connect, n got error.

Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.ConnectionString = "Driver={sql server};server= ABC ;database= test"
conn.ConnectionTimeout = 30
conn.Open


The error i got in vb is

Run-time error -2147467259(80004005):
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied

but i hav start my sql server already.
need help on this problem, thank for helping!
Hi there,

Is the SQL Server software installed in your local machine? If it's a local machine then you should change the server name to 127.0.0.1, hope it helps. Good luck & take care.
Nov 27 '06 #3

P: 5
Hi
Is the security for sql server set to Windows or mixed?

the sql server security set to window.
which 1 is better or easy to linking
Nov 27 '06 #4

100+
P: 1,646
the sql server security set to window.
which 1 is better or easy to linking
It is better for you to create a user with rights to the database and tables that you need. Then you can use the id and password for this user on any computer that uses your app. Otherwise you will get a lot of problems making a connection.
Nov 27 '06 #5

P: 5
It is better for you to create a user with rights to the database and tables that you need. Then you can use the id and password for this user on any computer that uses your app. Otherwise you will get a lot of problems making a connection.

thank
i got connect to sql already.
Nov 28 '06 #6

P: 1
How you got it? Can you pl. reply to vikas@cdacmumbai.in

i'm new in vb, got some problem in connect to sql server 2000.
i use the following code to connect, n got error.

Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.ConnectionString = "Driver={sql server};server= ABC ;database= test"
conn.ConnectionTimeout = 30
conn.Open


The error i got in vb is

Run-time error -2147467259(80004005):
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied

but i hav start my sql server already.
need help on this problem, thank for helping!
Mar 31 '08 #7

Post your reply

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