Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 26th, 2005, 02:58 AM
Registered User
Join Date: Feb 2005
Location: Aurangabad, Maharashtra, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL server connection error

I have a VB 6.0 application which has commands to access a SQL Server 2000 database. Ex:
EZCONN.Open "Provider=SQLOLEDB.1;data source=" & GDBSource & ";Initial Catalog=" & GDBName, GDBUserName, GDBPassword
Where i am reading the parameters from INI file. and the server parameters are given correctly. This line returns the following error:

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Actually I am updating some CSV files to the database. For that I am calling databaseupdate procedure and the files gets updated one by one in a loop. I am opening the connection before the loop and i am closing it on form_unload event. The code is written in commandbutton_click event and it gets called once in the form_load event and then I am ending the application. The application is a standalone exe that runs at startup. so there is no any possibility of calling the click event twice. However it is giving this error while updating some files not for all the files. some files are getting updated to the database.

Can anyone tell what is the reason for this error and what is the solution?
please reply ASAP

Reply With Quote
  #2 (permalink)  
Old February 26th, 2005, 06:03 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

Hi there,

It looks like your connection string is not OK. Check this page for the correct connection string:


AFAICS, your password / username are not in the correct format.


Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #3 (permalink)  
Old February 28th, 2005, 01:57 AM
Registered User
Join Date: Feb 2005
Location: Aurangabad, Maharashtra, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts


thanks for your reply.

yes the connection string was not proper but then how the application is working ok. The application is working fine since last 3 months. Only sometimes it gives the stated error regarding SQL server not available. The application updates some CSV files to the database successfully using the same connection string as I have given in the earlier post and sometimes it does not update the file to the database giving the error of [DBNETLIB] - is this related to network/port settings. Is it giving this error because of network accessibility problem? If connection string is not proper then it should give error for all the files.

Please reply ASAP.

Thanks again.
Reply With Quote
  #4 (permalink)  
Old April 4th, 2005, 04:17 AM
Friend of Wrox
Join Date: Oct 2004
Location: India.
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india

Hi Mayuri25

i think it is bcoz of network problem. make sure tht ur server is in the same Domain. also configure SQL Server user with Windows user

Reply With Quote
  #5 (permalink)  
Old September 12th, 2005, 05:42 AM
Authorized User
Join Date: Aug 2005
Location: , , Argentina.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to CarlosV

now i'm using this and i don't have any problem
Set Conn1 = New Connection
Conn1.ConnectionString = "driver={SQL Server};server=Carlos;uid=;pwd=;database=SysDB; Trusted_Connection=Yes;"

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote connection error with SQL Server Express DudeBori82 SQL Server 2005 4 April 12th, 2009 01:51 AM
sql server pool connection error MunishBhatia SQL Server 2005 0 June 28th, 2007 11:40 AM
SQL Server remote connection error sterreyl ASP.NET 2.0 Basics 1 April 6th, 2007 07:17 PM
SQL Server Connection error shivani_desai SQL Server 2000 1 January 16th, 2005 03:53 AM
SQL Server Connection mpeterson Classic ASP Databases 1 July 8th, 2003 09:50 PM

All times are GMT -4. The time now is 08:03 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.