Using the following connect strings:
cn.szConnStr="DRIVER=SQL Server;SERVER=Thomas\SQLEXPRESS;Initial Catalog=Lights;User Id=sa;Password=sa;"
cn.szConnStr="DRIVER={SQL Native Client};Server=Thomas\SQLEXPRESS;Database=Lights;Uid=sa;Pwd=sa;
cn.szConnStr="DSN=LightsA;
I get the following result in the debug window:
cn.szConnStr = DSN=LightsA;
Exception unknown, code = &HE06D7363
Exception unknown, code = &HE06D7363
Exception unknown, code = &HE06D7363
Exception unknown, code = &HE06D7363
Exception unknown, code = &HE06D7363
Exception unknown, code = &HE06D7363
01000
[Microsoft][SQL Native Client][SQL Server]Changed database context to 'Lights'.
SQLDriverConnect() Returned SQL_SUCCESS_WITH_INFO!
It seems to be a good connection but the exceptions can't be good. Does anybody recognize this???
Thanks,
Peter House
Yes, I get that every time I connect to any SQL Server too. I asked about it over in the PowerBASIC Forums about a year and a half ago, and was told not to worry about it. It seems SQL Server maintains something known as a database context, and I don't know anything about that either. In this case I'd just about consider SQL_SUCCESS_WITH_INFO to be as good as plain old SQL_SUCCESS. I know this isn't a good answer, but I've gotten used to living with it till I get a better one too! I've done a lot of SQL Server processing with the _WITH_INFO result and everything works out OK.
Thanks for the response and I guess I feel better now and will use it "as is". It is not very comforting!
If I find an answer I will post back.
Peter