473,473 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem connect vb6 to sql server

5 New Member
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
6 8161
willakawill
1,646 Top Contributor
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
1,754 Recognized Expert Top Contributor
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
Sky86
5 New Member
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
willakawill
1,646 Top Contributor
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
Sky86
5 New Member
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
vps021
1 New Member
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

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

Similar topics

7
by: mj | last post by:
Hello, thanks for the help. I am running a WinXP Pro w/ SP2 (my home computer, with ZoneAlarm firewall) Apache 2.0.52 MySQL 4.1.7 PHP 5.1.0-dev I have developed a PHP/MySQL web app that...
1
by: Dmitry Akselrod | last post by:
Hello everyone, I have a vb.net application that wraps the TCPListener object in a class. The server connects to the local interface and establishes itself on port 9900. It then polls for...
0
by: AlessanBar | last post by:
Hello Friends !! I have a strange problem, and I need to know what would be the source of this. I have a laptop computer with the following configuration: Pentium III Brand : Toshiba Speed :...
9
by: Niyazi | last post by:
Hi, I can connect using my PC local SQL Server Enterprise manager to Remote SQL Server. But I cannot connect using my Connection string? strConn = "Data Source=190.168.0.97,1433;Network...
4
by: Reinier Beeckman | last post by:
Hi got the following problem, it's more a programming problem then really a database problem. I have a Database class which connects to a mySQL database on the network. In WebForm1.aspx i connect,...
2
by: Buddy Ackerman | last post by:
I have a web app that I have setup on numerous web servers. I've set one up for a new client at their hosting facility and cannot get it to connect to their database. I get a "SQL Server does not...
5
by: TOM | last post by:
When i am trying to connect to my SQL server using the SQLdataadapter or the OLEDBdataadapter, VB tells me that i can not connect to it. I can not even make a new connection. Any Ideas Thanks...
17
by: Danieltbt05 | last post by:
just installed SQL server 2000 and using my client , i can't locate the server. I used SQL query analyzer to search but no servers were found. Error message is as below Server : Msg17,level...
6
by: Hemant Shah | last post by:
Folks, I am having hard time figuring out the problem I have with setting up new DB2 instance. This is 22nd instance I am creating on the server and I have never encounterd this problem. My...
2
by: Rudolf Bargholz | last post by:
Windows 2003 R2 Server DB2 Express C Version 9 DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL09012" with level identifier "01030107". Informational tokens are "DB2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.