Hi Derek

> -----Original Message-----
> From: Derek M. A. Lee-Wo [mailto:[EMAIL PROTECTED]
> Sent: Freitag, 28. Februar 2003 15:01
> To: [EMAIL PROTECTED]
> Subject: ODBC API without an ODBC manager under AIX
> 
> 
> 
> I'm trying to use the ODBC interface in a C app under AIX 
> without using
> an ODBC manager. 
> 
> I managed to create a test application that compiles cleanly, but the
> SQLConnect() call fails with
> 
>   OpenDB(): SQLConnect() failed, rc=-1
>   LogSQLError(): sqlstate=[IM002] sqlcode=[0] 
>             sqlmessage=[[SAP AG][LIBSQLOD SO] Data source 
>             name not found and no default driver specified.]
> 
> I have been playing around with /var/spool/sql/config/odbc.ini, but
> nothing I do seems to make a difference.  Does someone have a sample
> odbc.ini file I can use as a guide?  

Either in /usr/spool/sql/ini/odbc.ini or in ~/.odbc.ini you can write
definitions like

[mydsn]
SERVERNODE = 10.31.165.196
SERVERDB = V73ASC
tracefilename = ~/odbc.log


Furthermore you can use "host:dbname" (eg. 10.31.165.196:V73ASC) as 
servername in SQLConnect. In this case an odbc.ini file is not needed.

Another possibility is to use SQLDriverConnect, where the connect string
contains all necessary information.


Regards  Thomas


----------------------------------------------
Dr. Thomas K�tter
SAP DB, SAP Labs Berlin


SAP DB is open source. Get it!    www.sapdb.org 


 
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to