Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Provider independent data access
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01219083
Message ID:
01219821
Vues:
7
See if this help: in my VB.Net projects I set connection like this
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + _
                Excelfile + ";Extended Properties='Excel 8.0;HDR=YES;IMEX=1'"
>VS2005
>I have an application that is used by a variety of clients. The application analyzes some data and writes the results into a database.
>
>Different clients use different databases, and sometimes the same client will use a different database at different times.
>
>So, I want the user to be able to specifiy the database to be used at runtime using a UDL file.
>
>To get the basic user interface configured, I began with a VFP version of the database. The user interface involves a grid that is populated by one table from the database.And a listbox populated by another table in the database.
>
>I am assuming Ole Db Providers. For VFP: Ole Db Provider for Visual FoxPro. For Excel, Ole Db Provider for ODBC Drivers.
>
>At runtime, I look at the connection string that the user has specified, and use the DbProviderFactory capability to create appropriate table adapter, connection, and command objects. All of this works fine when filling the tables from the VFP database.
>
>However, when I attempt to fill the tables from the Excel version of the database I get an ODBC error containing the following message:
>
>ERROR [IM002][Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified.”
>
>In setting up the Excel workbook as the data source, I first used the ODBC Administrator to make it an Excel ODBC data source, and then the Data Link wizard to create an OLE DB Provider for ODBC Drivers connection string.
>
>I would appreciate some guidance on how to proceed. I suspect that the Ole DB Provider for ODBC Drivers is my problem.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform