This is a discussion on SQLSetPos with SQL_UPDATE not working within the MySQL forums, part of the Database Server Software category; --> MySQL version: 4.1.20 MyODBC version: 3.51.12-2 After doing a SQLFetchScroll, I update one or more columns. Then I do ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| MySQL version: 4.1.20 MyODBC version: 3.51.12-2 After doing a SQLFetchScroll, I update one or more columns. Then I do a rc = SQLSetPos(hstmt, 1, SQL_UPDATE, SQL_LOCK_NO_CHANGE); to do the updates. Nothing happens. I even ran tcpdump to see what (if anything) was going across the wire. I see the query, the result passed back after the SQLFetchScroll, but nothing else. So when I say "Nothing happens", I really mean, NOTHING happens! I've tried various settings settings in the driver. I've tried using SQL_CURSOR_STATIC, and SQL_CURSOR_DYNAMIC, and I've tried with and without SQLSetConnectAttr(hdbc, SQL_ATTR_ODBC_CURSORS, (void*)SQL_CUR_USE_ODBC, 0); Does this not work, or am I missing something? Thanks! jcf |
| |||
| Maybe I'm asking the wrong question. Does anybody actually have updates through SQLSetPos working? If so, I'd like to see your driver settings and code snippets. John C. Frickson wrote: > MySQL version: 4.1.20 > MyODBC version: 3.51.12-2 > > After doing a SQLFetchScroll, I update one or more columns. Then I do a > rc = SQLSetPos(hstmt, 1, SQL_UPDATE, SQL_LOCK_NO_CHANGE); > to do the updates. Nothing happens. > > I even ran tcpdump to see what (if anything) was going across the wire. > I see the query, the result passed back after the SQLFetchScroll, but > nothing else. So when I say "Nothing happens", I really mean, NOTHING > happens! > > I've tried various settings settings in the driver. I've tried using > SQL_CURSOR_STATIC, and SQL_CURSOR_DYNAMIC, and I've tried with and > without SQLSetConnectAttr(hdbc, SQL_ATTR_ODBC_CURSORS, > (void*)SQL_CUR_USE_ODBC, 0); > > > Does this not work, or am I missing something? > > Thanks! > jcf |
| ||||
| Update: Something I did got me further along. It's still not working, but now it looks like a bug in the driver (very weird update query.) John C. Frickson wrote: > Maybe I'm asking the wrong question. Does anybody actually have updates > through SQLSetPos working? If so, I'd like to see your driver settings > and code snippets. > > John C. Frickson wrote: >> MySQL version: 4.1.20 >> MyODBC version: 3.51.12-2 >> >> After doing a SQLFetchScroll, I update one or more columns. Then I do a >> rc = SQLSetPos(hstmt, 1, SQL_UPDATE, SQL_LOCK_NO_CHANGE); >> to do the updates. Nothing happens. >> >> I even ran tcpdump to see what (if anything) was going across the wire. >> I see the query, the result passed back after the SQLFetchScroll, but >> nothing else. So when I say "Nothing happens", I really mean, NOTHING >> happens! >> >> I've tried various settings settings in the driver. I've tried using >> SQL_CURSOR_STATIC, and SQL_CURSOR_DYNAMIC, and I've tried with and >> without SQLSetConnectAttr(hdbc, SQL_ATTR_ODBC_CURSORS, >> (void*)SQL_CUR_USE_ODBC, 0); >> >> >> Does this not work, or am I missing something? >> >> Thanks! >> jcf |