Article View: borland.public.cppbuilder.database.ado
Article #4357beginners help in programming ADO objects
From: Henrik Larsson
Date: Mon, 14 Jan 2002 14:31
Date: Mon, 14 Jan 2002 14:31
16 lines
1701 bytes
1701 bytes
Hi! I've just started programming databases with C++ Builder 5 enterprise, and I've encountered a few small problems.I hope you can help me with any or all of them. I'm using ADO to access an SQL-Server database, and I'm using the ADO data-access objects. 1) Right now I'm using this notation to read from or write to database-fields Form->Table->FieldValues["FieldToAccess"], but in the help it states that this is slow because it returns a variant. How should I do to speed it up and return the value as a) an Integer or b) an AnsiString 2) I've managed to go through tables row by row, using Table->First() and Table->Next, is it possible to do the same on the results from a query? As it is now I must go through every record and test the validity of it with an if-statement, it would be nice to use a query to filter out the interesting results before going through them one by one. Thanks Henrik
Technical Details
Message-ID:
<3c42eba4$1_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,5a4ffac50c25512d,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-01-14 06:40:35 PST From: "Henrik Larsson" <sigma@home.se> Sender: "Henrik Larsson" <sigma@home.se> Reply-To: "Henrik Larsson" <sigma@home.se> Subject: beginners help in programming ADO objects Newsgroups: borland.public.cppbuilder.database.ado X-User-Info: 138.227.189.8 138.227.189.8 NNTP-Posting-Host: 207.105.83.65 Message-ID: <3c42eba4$1_2@dnews> Date: 14 Jan 2002 06:31:00 -0800 X-Trace: dnews 1011018660 207.105.83.65 (14 Jan 2002 06:31:00 -0800) Lines: 17 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews