Article View: borland.public.cppbuilder.database.ado
Article #3857Access violation for FieldByName
From: Claudia
Date: Fri, 07 Jun 2002 18:11
Date: Fri, 07 Jun 2002 18:11
17 lines
1497 bytes
1497 bytes
I want to update a table from a text file. For every given string in a line
I want to use FieldByNumber to add it to the table but it's giving me an
access violation error on
TempTable->Fields->FieldByNumber(i+1)->AsVariant
Here's what my code looks like:
TempTable->Open();
TempTable->First();
TempTable->Insert();
for (int j=0;TempTable->Fields->Count > j; j++)
{
TempTable->Fields->FieldByNumber(i+1)->AsString=FieldValue;
}
TempTable->Post();
TempTable->Close();
Technical Details
Message-ID:
<3d00f724_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!news.cs.utwente.nl!newshunter!cosy.sbg.ac.at!newsrouter.chello.at!newsfeed01.univie.ac.at!news-fra1.dfn.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,aeb35031d8a9deae,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-06-07 11:23:45 PST From: "Claudia" <claudiam@paratransit.org> Newsgroups: borland.public.cppbuilder.database.ado Subject: Access violation for FieldByName Date: Fri, 7 Jun 2002 11:11:31 -0700 Lines: 19 Organization: Paratransit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 NNTP-Posting-Host: 64.174.0.50 Message-ID: <3d00f724_2@dnews> X-Trace: dnews 1023473444 64.174.0.50 (7 Jun 2002 11:10:44 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!news.cs.utwente.nl!newshunter!cosy.sbg.ac.at!newsrouter.chello.at!newsfeed01.univie.ac.at!news-fra1.dfn.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!dnews