Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ODBC : trying to bind the bookmark column

27 views
Skip to first unread message

Leo

unread,
May 19, 2009, 10:41:01 AM5/19/09
to
Greetings .
My question is as follows . I have to do an Update of a row in a Table
(MSAccess) using SQLBulkOPerations (UPDATE_BY_BOOKMARK).
I have all the columns to update already bound , all I need is to bind the
"bookmark column" (that is , column 0, following MSDN instructions) .
Can I use the SQLBindCol () as I did with other columns ?
And which kind of buffer shoud I associate to the bookmark row ?
is there a code sample I can follow to solve this problem ?
Thank you in advance.

leo

Pak-Ming Cheung - MSFT

unread,
May 21, 2009, 12:39:00 AM5/21/09
to
Please make sure:
1. SQLSetStmtAttr( SQL_ATTR_USE_BOOKMARKS ) is called.
2. Use SQLBindCol to bind the column #0 and columns you would like to update

There is a sample at:
http://msdn.microsoft.com/en-us/library/ms712471(VS.85).aspx
(esp. the section: Performing Bulk Updates by Using Bookmarks)

Thanks,
Ming.
WDAC Team, Microsoft.

P.S. We recommend customers to use the forum to ask questions in the future,
where you can obtain a faster response (Forum is at:
http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/threads/)

Leo

unread,
May 21, 2009, 9:19:02 AM5/21/09
to
Dear Pak-Ming Cheung,
it seems I didn't use the correct C-type in the SQLBindCol () for column 0
(I was using SQL_C_BOOKMARK instead of SQL_C_VARBOOKMARK) and the correct
type for the bookmark bound variable itself : more , I used the SQL_UB_FIXED
instead of SQL_UB_VARIABLE in the SQLSetStmtAtttr ().
By now I can see that the program seems to be working fine .
Thank you very much.

Leo

0 new messages