(I am a rank noob working with OpenEdge. So if I ask something dumb, please correct me. [:D])
I am working on determining how to connect to an existing OpenEdge database that is used with my company's application. I am working on options for connection to the database outside of our standard development environment for the purpose of testing. So I want to start with creating a basic connection using ODBC in ADO. Using articles I found in the knowledge base, I have a class that looks like:
using ADODB; using System.Data.Odbc; namespace VSIAutomationDataManager { public class DataTools { private string connectionString() { string myString = "DRIVER=Progress OpenEdge 11.7 Driver;HOST=QA2-W2012R2-TC;PORT=4003;DB=RecTrac;UID=zzz@VSI;PWD=password;DIL=Read Uncommitted"; //string connString = "DRIVER=Progress OpenEdge 10.2B Driver;HOST=localhost;PORT=9999;DB=sports2000;UID=pub;PWD=pub;DIL=Read Uncommitted". return myString; } public void MakeConnection() { OdbcConnection cn = new System.Data.Odbc.OdbcConnection(connectionString()); cn.Open(); } } }
I receive the error
"Data source name not found and no default driver specified"
when executing the cn.Open(); command from my unit test that exercises this poor, boring class.
I am attempting to do a DSN-less connection.
Any words of wisdom as to what I might be doing wrong, please? Thanks!
Stephanie
|
||||
Brian Maher
|
||||
Principal Engineer, Technical Support
|
||||
Progress
|
||||
14 Oak Park | Bedford, MA 01730 | USA
|
||||
|
||||
|
Hi Stephanie,
The error message "Data source name not found and no default driver specified" could be caused by a mismatch between the bitness of the application and the bitness of the installed ODBC driver.
A 32 bit application needs a 32 bit ODBC driver and a 64 bit application needs a 64 bit ODBC driver.
The 64 bit Windows ODBC manager is located on %windir%\system32\odbcad32.exe
The 32 bit Windows ODBC manager is located on %windir%\syswow64\odbcad32.exe
Hopes this help,
Tinco
Well, yes. And no. What does one do when one is using a 32 bit app, like Visual Studio, against OpenEdge which is 64-bit. I won't lie. I understand very little about bitness.
|
||||
Brian Maher
|
||||
Principal Engineer, Technical Support
|
||||
Progress
|
||||
14 Oak Park | Bedford, MA 01730 | USA
|
||||
|
||||
|
I was under the impression that there was no 32 bit odbc driver. Yes, that is what I want. Where would one find this driver, please? Thanks!
To answer your question:
Are you trying to connect to the database from Visual Studio using ODBC?
YES.
|
||||
Brian Maher
|
||||
Principal Engineer, Technical Support
|
||||
Progress
|
||||
14 Oak Park | Bedford, MA 01730 | USA
|
||||
|
||||
|