Unix Technical Forum

SQLSetPos with SQL_UPDATE not working

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 ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 07:54 AM
John C. Frickson
 
Posts: n/a
Default SQLSetPos with SQL_UPDATE not working

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 07:54 AM
John C. Frickson
 
Posts: n/a
Default Re: SQLSetPos with SQL_UPDATE not working

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 07:54 AM
John C. Frickson
 
Posts: n/a
Default Re: SQLSetPos with SQL_UPDATE not working

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:54 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com