Just out of curiocity :
The odbc entry i have made in Windows Control Panel "ODBC Data Source Administrator",is working ok when i set it to point at a database at my local host.
The code
db.setDatabaseName("pm");
db.setDatabaseName("pm");
To copy to clipboard, switch view to plain text mode
is the only thing i need to connect to the server.
But when that odbc entry is point to a network server, it does not work. It requires the commands
db.setUserName("sa");
db.setPassword("password");
db.setUserName("sa");
db.setPassword("password");
To copy to clipboard, switch view to plain text mode
so it can work and connect.
I trapped the db.lastError() and it gives me :
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. QODBC3: Unable to connect
It seems that it somehow does not retain the credentials that i've correctly declared.
Am i missing something ??
Bookmarks