I'm facing some issues trying devloping a program that has to get informations from database and tables created under MSSQL 2008 management. I have to admit that I'm new to ODBC... If anyone could help me with this issues? I tried two solutions to connect to my database [CodeA] and [CodeB]. I found documentation on google and tried a couple of solutions but until now can't find the right one. Please have a look at my connection string below.
CodeA:
SQLDriverConnect (sqlconnectionhandle,NULL,
(SQLCHAR*)TEXT("DRIVER={SQL Server};SERVER=TOWER-PC\\SQLEXPRESS;DATABASE=tfe;UID=adminA;PWD=@Admin1;IntegratedSecurity=SSPI;"),
SQL_NTS,retconstring,1024,NULL,SQL_DRIVER_NOPROMPT)
CodeB:
SQLDriverConnect (sqlconnectionhandle,NULL,
(SQLCHAR*)TEXT("DRIVER={SQL Server};SERVER=TOWER-PC\\SQLEXPRESS;DATABASE=tfe.mdf;UID=adminA;PWD=@Admin1;Trusted_Connection=Yes;"),
SQL_NTS,retconstring,1024,NULL,SQL_DRIVER_NOPROMPT)
CodeC:
SQLDriverConnect (sqlconnectionhandle,NULL,
(SQLCHAR*)TEXT("DRIVER={SQL Server};SERVER=TOWER-PC\\SQLEXPRESS;DATABASE=tfe.mdf;Trusted_Connection=Yes;"),
SQL_NTS,retconstring,1024,NULL,SQL_DRIVER_NOPROMPT)
The SQLSTATE that is returned from the execution.
While this are the roles attributed to my user: