ODBC Database Connectivity Issue

Linux specific forum
MarkR
New User
New User
Posts: 8
Joined: Fri Apr 18, 2008 9:03 pm
Location: USA

ODBC Database Connectivity Issue

Post by MarkR »

Hello,

I have some code with works on Windows and when ported to Linux (PB 4.10) is has an issue. It seems to initialize ODBC okay but can't seem to open the database. I have the DNS configured and tested with iodbctest on the linux platform. Here is the code. If anyone has any suggestions on debugging this, please let me know thanks.

If UseODBCDatabase() = 0

Debug("Can't initialize Database (ODBC v3 or better) environment")
End

; ODBC Init Success Continue
Else

If OpenDatabase(0, "database", "testuser", "password") = 0

Debug("Can't open database")
End

Else

DatabaseQuery(0, "select * from tbl_name")


While NextDatabaseRow(0)
Debug(GetDatabaseString(0, 0) + " " + GetDatabaseString(0, 1))

Wend

CloseDatabase(0)

EndIf


EndIf