Connecting to Progress Database from .Net

I would really appreciate if somebody could help me with this.

When I try to make a dataConnection to Progress database using ODBC and System DSN, it works fine (I can see the tables and data) but if I hit the Test Connection it gives me an error

Error [HY000][DataDirect][ODBC PROGRESS driver] Insufficient information to connect to the data source.

Same thing happens while coding I I use the same connectstring to make a odbc connection
it gives me the foll 2 errors:
Error [HY000][DataDirect][ODBC PROGRESS driver] Insufficient information to connect to the data source.
ERROR [01S00][DataDirect][ODBC PROGRESS driver] Invalid attribute in connection string:server
code is :

Dim sConnstringAsString ="DRIVER={DataDirect 4.1 32-bit Progress SQL92 v9.1D};host name=serv2;user id=dba; password=; port number=test_support;database=support;"

sConnstring ="DRIVER={DataDirect 4.1 32-bit Progress SQL92 v9.1D};Dsn=odbc_test_support;host=serv2;port=test_support;db=support;uid=dba"

sConnstring ="DRIVER={DataDirect 4.1 32-bit Progress SQL92 v9.1D};Dsn=odbc_test_support;uid=dba;server=serv2;pwd=;"

Dim oConnAs Odbc.OdbcConnection

oConn =New Odbc.OdbcConnection(sconnstring)

oConn.Open()


I tried all the above 3 connect strings and still get the error.

thanks.

[1975 byte] By [Anjali] at [2007-12-16]
# 1
You can use your DSN as a part of the ODBC connection:

  • DSN:
    "DSN=myDsn;Uid=username;Pwd=;"

  • File DSN:
    "FILEDSN=c:\myData.dsn;Uid=username;Pwd=;"
  • DMan1 at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
    # 2
    WOW never tried the simple approach. It worked thanks a lot.
    Anjali at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
    # 3
    Though that works but if I use the DSN then don't I have to have that set up in the clien't machine as well - is there any way we can make a connection without having to setup the the system dsn.

    thanks,

    Anjali at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
    # 4
    YES the DSN file will have to exist on the deployed machine...You can create the DSN on the fly during first install or include the DSN in the installation (knowing that you will probably have to edit the file)...
    DMan1 at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
    # 5
    here's what u use to make a dsn-less connection to progress

    connstring = "DRIVER={DataDirect 4.1 32-bit Progress SQL92 v9.1D};host=servername;uid=username; password=passordvalue; port=portname;db=databasename;"

    Anjali at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
    # 6
    This is the exact issue I am having,
    I tried to do as suggested here using these connections strings.
    DSN:
    "DSN=mfgwprod-odbc;Uid=username;PWD=password=;"
    I get datasource name is too long. Also the .dll file for the driver resides on a network share.
    Am i doing something wrong here?
    TonySpaulding at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...

    .NET Development

    Site Classified