OLE DB Connection problem 
Author Message
 OLE DB Connection problem
I am using VB6 and SQL Server 2k.

I changed my connection string from

driver=SQL Server;DATABASE=myDatabase;SERVER=MYSERVER

to

driver=SQL Server;DATABASE=myDatabase;SERVER=MYSERVER
Provider=sqloledb

I have no problems connecting on my laptop but when I try to run the app on
another machine
I get the error : "Invalid connection string attribute"

I suspect I need to install something on the other computers but what? I
installed MDAC 2.6 but no luck.

Any suggestions?

Thanks,
Jim



Mon, 28 Jun 2004 10:18:15 GMT
 OLE DB Connection problem


Quote:
> I am using VB6 and SQL Server 2k.
> I changed my connection string from
> driver=SQL Server;DATABASE=myDatabase;SERVER=MYSERVER
> to
> driver=SQL Server;DATABASE=myDatabase;SERVER=MYSERVER
> Provider=sqloledb
> I have no problems connecting on my laptop but when I try to run the app on
> another machine
> I get the error : "Invalid connection string attribute"
> I suspect I need to install something on the other computers but what? I
> installed MDAC 2.6 but no luck.

Jim,
Are you using the SQL Server ODBC Driver or the OLE DB Provider?
You've listed both in your second connection string.
Try using one of these connection strings
http://www.able-consulting.com/ADO_Conn.htm#OLEDBProviderForSQLServer

--

Thanks,
Carl Prothman
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.



Mon, 28 Jun 2004 12:29:19 GMT
 OLE DB Connection problem
Thanks for the help Carl! I was trying to use OLE DB In the second example
but didn't realize the syntax was different.

I thought adding "Provider=sqloledb" to the connection string was all I
needed to connect via OLE DB.  I am wondering why the second example ran ok
on my development machine. This lead me to the false conclusion.

Your page is a great reference. It has been bookmarked.

Regards,
Jim



Mon, 28 Jun 2004 13:31:33 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. OLE DB Connection Problem ?

2. SQL Server 7/OLE DB Connection Problem

3. sql 2000/OLE DB connection problem via ASP script on multiinstance server

4. OLE DB connection problem on Windows 200 Professional

5. Oracle Object for OLE and DB connection problems

6. INFORMIX OLE DB Provider Connection problem

7. Problems with ole-db connection

8. OLE DB Close DB Connection w/MSSQL 6.5

9. Default Table Lock-mode for DB-LIB, OLE DB Connections

10. Default Table Lock-mode for DB-LIB, OLE DB Connections

11. Difference between OLE DB 8.0 and OLE DB

12. ODBC Connection Pooling Vs OLE DB Resource Pooling


 
Powered by phpBB® Forum Software