ADO connection to Progress OpenEdge database in Visual Studi

Posted by stephanies on 07-Jun-2019 14:43

(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

Posted by Brian K. Maher on 07-Jun-2019 16:12

www.progress.com/esd, you want the SQL Client Access product for Win32 (32 bit) and Win64 (64 bit)
 
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

All Replies

Posted by Tinco on 07-Jun-2019 15:15

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

Posted by stephanies on 07-Jun-2019 15:34

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.

Posted by Brian K. Maher on 07-Jun-2019 16:02

Hi Stephanie,
 
When a client (32 or 64 bit) connects to the database using client/server (i.e. over a TCP connection) the bit mode does not matter.
 
Are you trying to connect to the database from Visual Studio using ODBC?  If so, you just need the appropriate ODBC driver installed (either the 32 bit or 64 bit one .. or you can install both).
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

Posted by stephanies on 07-Jun-2019 16:06

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!

Posted by stephanies on 07-Jun-2019 16:07

To answer your question:

Are you trying to connect to the database from Visual Studio using ODBC?

YES.

Posted by Brian K. Maher on 07-Jun-2019 16:12

www.progress.com/esd, you want the SQL Client Access product for Win32 (32 bit) and Win64 (64 bit)
 
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

This thread is closed