So.. I have found an entry in ODBCI.INI which showed me the correct path to
the db2cli.dll
And also, within my test code, I use as a DataBaseName the name of a System
DSN ('db2rcdata', configured with the ODBC Administrator of Windows. And now
I am getting a connection.
I wonder if I could not avoid the ODBC stuff and define directly an address
and port?
=== code which works for me ===
Dim f as FolderItem
f=GetFolderItem("C:\PROGRA~2\IBM\SQLLIB\BIN\DB2CLI.DLL",
FolderItem.PathTypeShell)
If f.Exists then
db.SetFileOption SQLConnectionMBS.kOptionLibraryDB2, f
db.DatabaseName="DB2:db2rcdata" // Prefix DB2: + ODBC Datasource Name
db.UserName="db2admin" // default login
db.Password="somepassword"
if db.Connect then
MsgBox "We are connected!"
MsgBox "Server Version: "+db.GetConnection.ServerVersionString
db.Close
else
MsgBox db.ErrorMessage
end if
End If
===
Oliver
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info