🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #963

TBookmarkList problem ?

#963
From: Ludek Kansky
Date: Wed, 04 Oct 2000 00:00
18 lines
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 *'.
Technical Details
Message-ID: <01c02e0b$6c907ba0$33dbb3c1@COMP>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,487f594f3d4ca67,start
X-Google-Attributes: gidfcd2b,public
From: "Ludek Kansky" <ludek_kansky@rubena.cgs.cz>
Subject: TBookmarkList problem ?
Date: 2000/10/04
Message-ID: <01c02e0b$6c907ba0$33dbb3c1@COMP>
X-Deja-AN: 677462365
X-Trace: 4 Oct 2000 06:51:19 -0800, 193.179.219.51
Newsgroups: borland.public.cppbuilder.database.multi-tier