Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Connection

Status
Not open for further replies.

stevejones

Programmer
Jul 3, 2002
30
GB
Hi all,

We have recently decided to swith from VB 6 to .net and I am having a problem when opening an OLEDB connection.

My connection string includes "PROVIDER= MSDASQL", but this generates the following error.

An unhandled exception of type 'System.ArgumentException' occurred in system.data.dll

Additional information: The .Net Data OLE DB Provider(System.Data.OleDb) does not support the MSDASQL Provider, Microsoft OLE DB Provider for ODBC Drivers.

The same odbc connection works in VB 6. Am I missing something?

TIA

Steve


 
What components have you added to your form? Do you have an OLEDbConnection, and an OLEDBAdapter?

In my slow migration from 6 to .Net, I find it easier to add these to the form (although they are not a visible part on the form like ADO objects).
 
Thanks for your help guys!

I have used the Microsoft.Data.ODBC add on component and this seems to work fine when connecting to the data source.

Many Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top