Norbert,
Something I noticed, similar to Jean-Michel, is that the spacing in the odbc.ini file is a little tricky. I too, had problems connecting iODBC, then I tried unixODBC and everything worked better. Have you tried unixODBC?
About the spacing.
Take a look at this listing below: ( ~/.odbc.ini )
[maxdb] Driver =<independent_program_path>/lib/libsqlod.so Description = MaxDB Connection ServerDB =DatabaseName ServerNode =localhost Trace = no TraceFile
This listing worked well for me. Note that the "Description" field needs a space, while the others do not. Leaving out the space causes the equals sign to be interpreted as part of the value. You can test this with the command:
isql maxdb <userid> <password>
Also, make sure that the file libsqlod.so has read privileges for everyone.
Hope that helps!
Cheers, JLS
+-------------------------------------------------------------------------+ | Liked my post? Then you're sure to love my book on MaxDB. | | You can signup to be notified when my book is available at: | | | | http://www.johnsingleton.com/maxdb/signup.html | | | | And you can read my semi-regular column on MaxDB at: | | | | http://www.johnsingleton.com/maxdb/ | | | +-------------------------------------------------------------------------+
Norbert Felde wrote:
Hallo,
My odbc.ini
[ODBC Data Sources] maxtest = Max Test testdb = Maxdriver
[testdb] ServerDB = test ServerNode = localhost SQLMode = INTERNAL IsolationLevel = Uncommitted Description = Test Database Driver = /opt/sdb/programs/lib/libsqlod.so
[default] Driver = /opt/sdb/programs/lib/libsqlod.so
[maxtest] Description = test ServerDB = test ServerNode = linux Driver = /opt/sdb/programs/lib/libsqlod.so
My odbcinst.ini:
[ODBC Drivers] Maxdriver = installed
[Maxdriver] Description = test adatbazis Driver = /opt/sdb/programs/lib/libsqlod.so Setup = /usr/lib/libiodbc/libsapdbS.so FileUsage = 1
I use iodbctest as follows: iodbctest "DSN=testdb;UID=dba;PWD=pwd" and the odbc_connect looks: odbc_connect( "testdb", "dba", "pwd" )
I run iodbctest trough gdb and it looks for me as it would handle the maxdb odbc driver as unicode driver independet which ( libsqlod.so or libsqlodw.so ) driver I use. That is why I thought to leave out iodbc and to use php with native php support.
Thanks Norbert
Jean-Michel OLTRA wrote:
bonjour,
Le dimanche 13 juin 2004, Norbert Felde a �crit...
I am trying to use maxdb with php trough odbc but it dous not work. The SQLstate contains an absolute useless string if I run iodbctest and three question marks if I try to connect with odbc_connect in php.
I gave it up and I have compiled a new php with sapdb support. Now as I try to connect it can not find the dsn. I have copied the odbc.ini from the etc directory into the
iodbctest looks at /home/<username>/.iodbc.ini while odbc_connect() is searching for /etc/odbc.ini
Here is the connect string I use with iodbc: /usr/local/iodbc/bin/odbctest "DSN=TR;UID=JM;PWD=xxxxxxx"
How does your odbc.ini looks like ?
-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
