🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3858

Re: Access violation for FieldByName

#3858
From: Claudia
Date: Fri, 07 Jun 2002 18:55
26 lines
1772 bytes
Never mind this question. It was a stupid error on my part.  I should have
used "j" instead of "i". You've got to love these kinds of stupid errors.

"Claudia" <claudiam@paratransit.org> wrote in message
news:3d00f724_2@dnews...
> 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: <3d01016a$1_1@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!amsnews01.chello.com!newsfeed.freenet.de!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3d00f724_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,aeb35031d8a9deae
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-06-07 12:05:16 PST
From: "Claudia" <claudiam@paratransit.org>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3d00f724_2@dnews>
Subject: Re: Access violation for FieldByName
Date: Fri, 7 Jun 2002 11:55:24 -0700
Lines: 28
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: <3d01016a$1_1@dnews>
X-Trace: dnews 1023476074 64.174.0.50 (7 Jun 2002 11:54:34 -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!amsnews01.chello.com!newsfeed.freenet.de!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews