|
|
Subject:
Access 2000 linking to Oracle (without DSN)
Category: Computers > Programming Asked by: ny_insomniac-ga List Price: $3.00 |
Posted:
21 Mar 2003 05:56 PST
Expires: 20 Apr 2003 06:56 PDT Question ID: 179123 |
How do I make a DSN-Less connection from Access to Oracle using DAO? I know the basic code, but I can't seem to get the connection string right. Set db = CurrentDb() Set tdf = db.CreateTableDef("Test") tdf.Connect = "ODBC;DRIVER=msdaora;SERVER=Orcl;UID=test;PWD=test;" 'This doesn't work!! I also tried Driver={Microsoft ODBC for Oracle} tdf.SourceTableName = "Test" db.TableDefs.Append tdf Whatever I put in Driver or Server, I get 'Odbc connection to DriverServer failed'. I can link it manually though using a Data Source. | |
| |
|
|
Subject:
Re: Access 2000 linking to Oracle (without DSN)
Answered By: mathtalk-ga on 21 Mar 2003 10:04 PST Rated: |
Hi, ny_insomniac-ga: The original error was caused by using 'msdaora' as the ODBC Driver parameter. MSDAORA.DLL is the Microsoft Data Access component that is an OLE DB 'provider' for Oracle, not an ODBC 'driver'. In other words msdaora is an ADO thing than a DAO thing. Yep, it's confusing. best wishes, mathtalk |
ny_insomniac-ga
rated this answer:
Perfect. Those links confirmed a lot of what I thought which was really helpful. |
|
Subject:
Re: Access 2000 linking to Oracle (without DSN)
From: mathtalk-ga on 21 Mar 2003 09:39 PST |
Hi, ny_insomniac-ga: Congratulations, I think you've solved it. Your syntax looks fine. A discussion of techniques including DSN-less connections for ODBC data access often centers on how an application can be distributed to end-users, as here: [Problematic or Programmatic ODBC] http://www.databasejournal.com/features/mssql/article.php/1491051 (scroll to end to see the DSN-less example, similar to your version except that it targets SQL Server rather than Oracle) The same author (Danny Lesandrini) has created a tutorial on DSN-less connections: [ODBC DSN-Less Connection Tutorial] http://www.databasejournal.com/features/mssql/article.php/1491011 For a collection of DSN-less ODBC connection strings suitable for ADO (rather than DAO), see here: [ODBC DSN Less] http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm The Oracle examples (Microsoft new & old drivers, and Oracle driver) are located slightly futher than halfway down the page. My installed version of the Microsoft ODBC for Oracle driver (MSORCL32.DLL) is about a year newer than yours (2.573.9030.00 dated 8/29/2002). regards, mathtalk |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |