EXCEL ODBC: Can CRecordSet Update spreadsheet? 
Author Message
 EXCEL ODBC: Can CRecordSet Update spreadsheet?

I have developed a 16-bit VC/MFC app that interacts with a database using
ODBC. It works fine with MS ACCESS. And, it is able to read the database
ported to XL4, XL5, and XL97. However, if I modify a record in the Excel
version of the database and then try to move to another record I get a DB
Exception: State 37000, [Microsoft][ODBC Cursor Library] Syntax error or
access violation.

I have traced the problem into CRecordset::InsertUpdateDelete(). It is
attempting to execute an SQL UPDATE statement. This fails and the CRecordSet
throws the exception.

I note that the UPDATE statement include a WHERE CURRENT OF clause.
ODBCJTNW.HLP says that WHERE CURRENT OF is not supported in UPDATE
statements for the desktop drivers. However, I also note that when my
program accesses the ACCESS version of my database, the same UPDATE
statement seems to work fine.

So, is it true that the UPDATE with WHERE CURRENT OF clause will not work?
If so, does MS/MFC have a workaround? After all, it's not a very useful
database if you can't update it.

Thanks in advace for your help.

Jim Walsh



Mon, 19 Feb 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Why CRecordset can't update Excel spreadsheet - the answer

2. Can CRecordset update an Excel spreadsheet

3. Why CRecordset can't update Excel spreadsheet - the answer

4. Can CRecordset update an Excel spreadsheet

5. Can CRecordSet update an Excel spreadsheet?

6. Updates on EXcel spreadsheet

7. Can Excel Spreadsheet be updated with CDatabase

8. CDatabase ODBC problem with Excel SpreadSheet

9. Error Accessing an Excel spreadsheet using ODBC in an ISAPI

10. CDatabase ODBC problem with Excel SpreadSheet

11. change excel.application to excel spreadsheet

12. Error updating SQL-Server record via ODBC (CRecordset)

 

 
Powered by phpBB® Forum Software