Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a program I am trying to get connected directly to a Informix database via ODBC, instead of having to go through Access and then to the database. I first tried using the wizard in Standard VB.NET, but I always got an error message about not being able to do what I wanted in this version of Visual Studio. Something about only being able to conect to SQL Server Desktop Engine databases and Access Databases. I then decided to use ADO.NET. I am having a problem with the connection string. I think it has something to do with the provider. Here is the error message I get:

 

 

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.

 

 

Here is my code:

 


       Dim dagisconstring As String
       Dim textline As String
       dagisconstring = "Provider=Microsoft OLE DB Provider for ODBC Drivers;DSN=dagisNT;DB=dagis;HOST=198.212.171.17;SERV=turbo;SRVR=DBQ_Informix;PRO=onsoctcp;UID=informix;PWD=informix"
       Dim dagisdbcon As New System.Data.OleDb.OleDbConnection(dagisconstring)
       dagisdbcon.Open()
       Dim emptycityda As New System.Data.OleDb.OleDbDataAdapter("Select * from dub.city_parcels", dagisconstring)
       Dim emptycityds As New DataSet()
       emptycityda.Fill(emptycityds, "dub.city_parcels")
       Dim emptycitydt As DataTable = emptycityds.Tables("dub.city_parcels")

 

Thank you for the help. For now I'll have to stick with the Access link.

  • *Gurus*
Posted

Just curious (since I haven't yet had the joy of working with

ADO.Net) since the error message includes...

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

Does ADO.Net support ODBC drivers at all? If not, then how can

he even make this connection?

  • 1 month later...
Posted

I've just started connecting to the Oracle database at work with .Net, and the only way I've been able to get connected is with ODBC or OLEDB. (We have an older installation of Oracle 6.3.7 - the upgrade to 8i is to take place in a couple of months, and the oracle .Net provider requires 8.i or greater on the client.)

 

As with VB, you need to make sure that the project refereces ADODB if you follow this approach..

 

Project

Add Reference

 

then select adodb.

  • *Experts*
Posted

Here's a few ideas, not sure if any will help.

 

1. Try changing the Provider from "Microsoft OLE DB Provider for ODBC Drivers" to "MSDASQL"

2. The IP has a space between 171 and 17. Might cause future problems (but probably not the one you're seeing).

 

I cut-n-paste your error string in google and it showed a few other people having similar problems. The articles I scanned related to a beta version of .NET but they may have some workarounds to help...

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...