Hello all.
I'm in the process of adding simple ODBC functionnality to our in-house software. So far I can retrieve text & int data and then update the database. I'm using win2000, Visual Studio 6 (w/ C), SQL Server 2000 and the Northwind demo database. I had previously no experience with SQL nor ODBC.
This Query is my problem right now. It aims to change the city of an employee, based on his primary key that was retrieved earlier. I had no problem with update queries using string comparison (ie : where "firstname" like 'andrew' is ok), but this here, using an int as a comparison, just hangs on execution.
The same query, run in Query Analyzer, works just fine, so the problem is just when I make the ODBC call in C.
I tried tracing the driver call from Query Analyzer and my program call, but they are the same (programmed one just seems to run forever).
Query (northwind) :
pszQuery <=> update "Employees" set "City" = 'Citytest' where "EmployeeID" = 1
SQLExecDirect(hstmt1,pszQuery,SQL_NTS)
Does anyone here have an idea about this ? I may be doing something stupid, but I have no clue what...
Many thanks in advance.
--
Sebastien Ruchet / sruchet@NOSPAMwizart.com
I'm in the process of adding simple ODBC functionnality to our in-house software. So far I can retrieve text & int data and then update the database. I'm using win2000, Visual Studio 6 (w/ C), SQL Server 2000 and the Northwind demo database. I had previously no experience with SQL nor ODBC.
This Query is my problem right now. It aims to change the city of an employee, based on his primary key that was retrieved earlier. I had no problem with update queries using string comparison (ie : where "firstname" like 'andrew' is ok), but this here, using an int as a comparison, just hangs on execution.
The same query, run in Query Analyzer, works just fine, so the problem is just when I make the ODBC call in C.
I tried tracing the driver call from Query Analyzer and my program call, but they are the same (programmed one just seems to run forever).
Query (northwind) :
pszQuery <=> update "Employees" set "City" = 'Citytest' where "EmployeeID" = 1
SQLExecDirect(hstmt1,pszQuery,SQL_NTS)
Does anyone here have an idea about this ? I may be doing something stupid, but I have no clue what...
Many thanks in advance.
--
Sebastien Ruchet / sruchet@NOSPAMwizart.com