shootsnlad Posted November 19, 2002 Posted November 19, 2002 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. Quote
Leaders quwiltw Posted November 19, 2002 Leaders Posted November 19, 2002 I'm know nothing of Informix, but do you have a driver installed for it? I would have expected your connection string to look more like one of these. http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForInformix Quote --tim
*Gurus* Thinker Posted November 19, 2002 *Gurus* Posted November 19, 2002 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? Quote Posting Guidelines
Leaders quwiltw Posted November 19, 2002 Leaders Posted November 19, 2002 Kinda... I must admit, so far I've stuck with SQL Server, MSDE and Oracle -- as that's what the app I'm developing has to talk to. Since the ODBC Provider implements the same interfaces, should be no different though. http://www.microsoft.com/downloads/release.asp?ReleaseID=35715&area=search&ordinal=4 Quote --tim
loquin Posted January 17, 2003 Posted January 17, 2003 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. Quote
*Experts* Nerseus Posted January 17, 2003 *Experts* Posted January 17, 2003 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 Quote "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
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.