If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Visual Basic > Remote SQL Server Database Connection Problem using VB6 using OLEDB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-22-09, 06:10
ksenthilbabu ksenthilbabu is offline
Registered User
 
Join Date: Jul 2009
Posts: 4
Remote SQL Server Database Connection Problem using VB6 using OLEDB

Please Help me,

We had a Software application Developed using VB6 with MSSQL SERVER2005 as Database(Remote) in ZNet India® - Web Hosting, Dedicated Server & Reseller Hosting our web space provider , the application was working properly until they upgraded the Server configuration, Now we are not able to connect with the database using the normal OLEDB connection String

Code:
adoConn.Open PROVIDER=MSDataShape;Data Provider=SQLOLEDB.1;Persist Security Info=0;User ID=UserName;Password=Password;Initial Catalog=DatabaseName;Data Source=servername
It is giving an ERROR (Error No.-2147467259 at Line No. 0 ([DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.) in procedure )

We contacted our service providers they informed that they asked us to try with the SQL Server Instance

Code:
adoConn.Open PROVIDER=MSDataShape;Data Provider=SQLOLEDB.1;Persist Security Info=0;User ID=UserName;Password=Password;Initial Catalog=DatabaseName;Data Source=servername/instancename
It is giving an ERROR (Error No.-2147467259 at Line No. 0 ([DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.) in procedure)

Again they informed to use the ip address instead of servername without the named instance and also with the named instance,but the same errors are generating.

WE TRIED WITH SQL NATIVE CLIENT : -

With Instance Name:

Code:
adoConn.Open PROVIDER=MSDataShape;Data Provider=SQLNCLI.1;Persist Security Info=0;User ID=UserName;Password=Password;Initial Catalog=DatabaseName;Data Source=servername/Insancename
Error No.-2147467259 at Line No. 0 (Named Pipes Provider: Could not open a connection to SQL Server [53]. ) in procedure Command1_Click of Form Form1


WithOut Instance Name:

Code:
adoConn.Open PROVIDER=MSDataShape;Data Provider=SQLNCLI.1;Persist Security Info=0;User ID=UserName;Password=Password;Initial Catalog=DatabaseName;Data Source=servername
IT IS WORKING PROPERLY.


The Web Service Provider came online using Team Viewer worked directly in our machine and tried the connection string

Code:
adoConn.Open PROVIDER=MSDataShape;Data Provider=SQLOLEDB.1;Persist Security Info=0;User ID=UserName;Password=Password;Initial Catalog=DatabaseName;Data Source=servername/instancename
using Microsoft Data Link Provider It is not working and generating Errors.

When they tried in their system with the same connection string using Microsoft Data Link Provider it is connecting with the database without any problems. ( We also viewed through Team Viewer their system)

Please help us to solve this connection problem using OLEDB, because when we use SQL NATIVE CLIENT we will not be able to connect using Crystal Reports 10 because CR10 will not support SQL NATIVE CLIENT.
REWRITING THE ENTIRE APPLICATION TO USE SQL NATIVE CLIENT IS VERY DIFFICULT.

Please help us..

With Thanks,
K.Senthil Babu
Reply With Quote
  #2 (permalink)  
Old 10-09-09, 10:02
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Personally, I have never seen the provider that you have in your connection string...

This should help you: SQL Server 2005 Connection String Samples - ConnectionStrings.com
__________________
George
Twitter | Blog
Reply With Quote
  #3 (permalink)  
Old 10-12-09, 18:47
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,797
try using the oledb connection string utility here to build a working connection string, then paste the resulting connection string into your app (or a text file, etc.)
__________________
Lou
使大吃一惊
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Reply With Quote
Reply

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On