467,879 Members | 1,100 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,879 developers. It's quick & easy.

Problem connect vb6 to sql server

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
  • viewed: 7890
Share:
6 Replies
1GB
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 1GB
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
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
1GB
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
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
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.

Similar topics

7 posts views Thread by mj | last post: by
1 post views Thread by Dmitry Akselrod | last post: by
9 posts views Thread by Niyazi | last post: by
4 posts views Thread by Reinier Beeckman | last post: by
2 posts views Thread by Buddy Ackerman | last post: by
5 posts views Thread by TOM | last post: by
17 posts views Thread by Danieltbt05 | last post: by
6 posts views Thread by Hemant Shah | last post: by
2 posts views Thread by Rudolf Bargholz | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.