|
SQLAPI++
Well iv come accross SQLAPI++ which looks like itll solve all my problems. Iv downloaded it and my app compiles ok except it seems to stop working. I cant seem to connect to the MSSQL database. My code is as follows:
SAConnection con;
SACommand cmd(
&con,
"Select * from nhssms");
con.setOption( "UseAPI" ) = "DB-Library";
try
{
con.Connect(
"SMSTEST@nhssms", // database name
"sa", // user name
"", // password
SA_SQLServer_Client);
con.Disconnect();
}
catch(SAException &x)
{
ShowErr((const char*)x.ErrText());
}
I must be doing something wrong, any suggestions?
Thanks,
Seb
|