RE: [PHP] Desperate: odbc_connect() does not work! Please help!
| From: | Kraa de Simon | Date: | Wed, 31 Oct 2001 18:59:17 +0000 |
| Subject: | RE: [PHP] Desperate: odbc_connect() does not work! Please help! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73059@lists.php.net to get a copy of this message | ||
Hi Andrew,
I'm using the Merant DataDirect 3.6 Progress SQL92 ODBC drivers and they
seem to be working fine when I try their test C program. I can connect to
the Progress database en retrieve data.
I'm using their driver manager as well (--with-custom-odbc).
The test C program uses:
SQLConnect (hdbc, driver, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS);
SQLConnect is executed without problems. A connection can be made.
When I try odbctest (from iODBC / odbcsdk) the connect fails (same drivers,
same odbc.ini, same odbcinst.ini).
SQLDriverConnect (hdbc, 0, (UCHAR *) dataSource, SQL_NTS, (UCHAR *) buf,
sizeof (buf), &buflen, SQL_DRIVER_COMPLETE);
SQLDriverConnect returns -1. A connection cannot be made.
Why is the first program using SQLConnect() and the other
SQLDriverConnect()?
Are ODBC driver and ODBC driver manager dependent on each other?
Or can I use the iODBC driver manager and the Merant ODBC drivers together?
Are there alternatives to the Merant ODBC drivers?
I am connect a Progress 9.1c database on SCO UnixWare 7.1.1 from Red Hat
Linux 7.1 with Merant DataDirect 3.6 Progress SQL92 ODBC drivers and ODBC
driver manager.
Any ideas?
Regards,
Simon.
> -----Original Message-----
> From: Andrew Hill [mailto:ahill@openlinksw.com]
> Sent: woensdag 31 oktober 2001 16:12
> To: Kraa de Simon; Php-General (E-mail)
> Subject: RE: [PHP] Desperate: odbc_connect() does not work!
> Please help!
>
>
> Kraa,
>
> The 01000 error is a 'General Error', probably at connect time.
> This suggest that your DSN settings might be bad or not being
> passed into
> PHP.
> Is your DSN named "results" and is that the one you are using
> in your tests?
>
> Also, are you setting your environment variables as appropriate? e.g.:
> setenv("ODBCINI=/path/to/odbc.ini");
> setenv("LD_LIBRARY_PATH=/path/to/your/driver/manager/lib");
>
> You may also which to try this connection with odbctest, a sample
> application available in the iODBC SDK at www.iodbc.org.
>
> HTH!
>
> Best regards,
> Andrew Hill
> Director of Technology Evangelism
> OpenLink Software http://www.openlinksw.com
> Universal Data Access & Data Integration Technology Providers
>
> > -----Original Message-----
> > From: Kraa de Simon [mailto:Simon.de.Kraa@icl.nl]
> > Sent: Wednesday, October 31, 2001 8:44 AM
> > To: Php-General (E-mail)
> > Subject: RE: [PHP] Desperate: odbc_connect() does not work!
> Please help!
> >
> >
> > So desperate I even forgot the attachment...
> >
> > > -----Original Message-----
> > > From: Kraa de Simon [mailto:Simon.de.Kraa@icl.nl]
> > > Sent: woensdag 31 oktober 2001 14:40
> > > To: Php-General (E-mail)
> > > Subject: [PHP] Desperate: odbc_connect() does not work!
> Please help!
> > >
> > >
> > > Hi,
> > >
> > > When I execute:
> > >
> > > <? odbc_pconnect("results", "sysprogress", "mls");
> > > ?>
> > >
> > > I get error:
> > >
> > > Warning: SQL error: , SQL state 01000 in SQLConnect in
> > > /usr/local/apache/htdocs/odbc.php on line 1
> > >
> > > See attachment for phpinfo().
> > >
> > > BTW 1
> > >
> > > The ODBC config itself works fine. I can make a connection
> > > and retrieve data
> > > from the database using a test C program.
> > >
> > > BTW 2
> > >
> > > I used --with-custom-odbc and set env var CUSTOM_ODBC_LIBS to
> > > the lib dirs
> > > and env var CFLAGS to the include dirs.
> > >
> > > Met vriendelijke groet / With kind regards,
> > >
> > > ICL Nederland B.V. Simon de Kraa
> > > e-Applications / Logistic Systems Systems Architect
> > > Het Kwadrant 1 Tel. +31 346 598865
> > > Postbus 4000 Fax +31 346 562703
> > > 3600 KA MAARSSEN
> > > The Netherlands
> mailto:Simon.de.Kraa@icl.nl
> > >
> > > ---
> > >
> > > Progress 9.1c, Roundtable 9.1c, NuSphere Pro Advantage 2.3.1
> > > @ MS Windows
> > > 2000 5.00.2195 SP 2
> > > Progress 9.1b @ SCO UnixWare 7.1.1
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php-general-help@lists.php.net
> > > To contact the list administrators, e-mail:
> > > php-list-admin@lists.php.net
> > >
> >
> >
> >
>
>