Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages
Started by Ludek Kansky
Wed, 04 Oct 2000 00:00
TBookmarkList problem ?
Author: Ludek Kansky
Date: Wed, 04 Oct 2000 00:00
Date: Wed, 04 Oct 2000 00:00
18 lines
987 bytes
987 bytes
Can anyone help me ?
In examples I found this code, but I can't compile it.
1. if (DBGrid1->SelectedRows->Count > 0 )
2. {
3. AnsiString s="";
4. TDataSet *pDS = DBGrid1->DataSource->DataSet;
5. for ( int i=0; i< DBGrid1->SelectedRows->Count ; i++ )
6. {
7. if ( i>0 ) s = s + ", ";
8. pDS->GotoBookmark((void *)DBGrid1->SelectedRows->Items[i]);
9. s = s + pDS->Fields->Fields[1]->AsString;
10. }
11. Application->MessageBox(s.c_str(),"selected names",MB_OK);
12. }
[C++ Error] Unit1.cpp(8): Cannot cast from 'AnsiString' to 'void *'.
Re: TBookmarkList problem ?
Author: Mark Cashman (TeamB)
Date: Wed, 04 Oct 2000 00:00
Date: Wed, 04 Oct 2000 00:00
13 lines
982 bytes
982 bytes
pDS->GotoBookmark(DBGrid1->SelectedRows->Items[i]); I believe will do it. IIRC, in an earlier release, bookmarks were void *, now they are strings. ------ Mark Cashman, TeamB C++ Builder http://www.temporaldoorway.com/programming/index.htm C++ Builder, JBuilder programming information Home of The C++ Builder Programmer's Webring - Join us! ------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads