I'm starting to think I hit a hole in the ODBC Api , or at least in the documentation .... I suspect there's no clean and smart solution to the problem. Anyway I'll take a look at the newsgroup you mentioned. Thank you for your support .
Leo --- In [email protected], Thomas Hruska <thru...@...> wrote: > > spudgun0 wrote: > > Yes , I agree , but that's the way it is and i can't do anything about it > > ... seems like those 255 fields are not totally used, but may be in the > > future and so the designer tried to set it ready for the worst case > > scenario. > > > > Anyway I am puzzled about how I can "bind a bookmark column" : is there a > > code sample I can look at ? > > > > Points in the MSDN article you refer say what to do (which I already knew ) > > , but not how to do it .... > > > > Have I got to set the bookmark column myself ? or is it already there ready > > for use ? and whcih kind of data is the column ? all these things I have to > > know prior to binding the column , and seems I can't find any useful info > > about them, both on MSDN and elsewhere ..... > > Unfortunately, you've hit my limit of knowledge regarding ODBC and I'm > pretty much the expert on this list. My experience with the ODBC API is > the "write-once and hope to never touch the code again" approach. You > could try the Microsoft ODBC newsgroup - assuming it still exists. > > As far as binding columns goes, SQLBindParameter() is possibly what you > want. As far as "row bookmarks" go, there is a probably correlation > between "bookmarks" and "cursors". SQLGetInfo() is supposed to be > called to determine what sort of cursors are supported by the > SQLBulkOperations() call. > > As far as source code, the closest thing you will find is probably the > MySQL ODBC driver source code for their SQLBulkOperations() > implementation. You just have to write code that is the exact reverse > of what they implemented. You could try to locate a test suite for the > ODBC driver, which would have a more straight-forward solution. > > A quick glance at the MySQL implementation shows they support adding and > fetching only and the implementation of adding is to build a gigantic > INSERT statement. Update and delete code is as follows: > > > case SQL_UPDATE_BY_BOOKMARK: > case SQL_DELETE_BY_BOOKMARK: > default : > return sqlReturn( SQL_ERROR, "IM001", (const > char*)"Driver does not support this function" ); > > > I suspect many ODBC drivers take a similarly lazy approach. > > -- > Thomas Hruska > CubicleSoft President > Ph: 517-803-4197 > > *NEW* MyTaskFocus 1.1 > Get on task. Stay on task. > > http://www.CubicleSoft.com/MyTaskFocus/ >
