Computing.Net > Forums > Programming > RecordSet help vb6

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

RecordSet help vb6

Reply to Message Icon

Name: Anthony Arde
Date: May 4, 2005 at 06:55:13 Pacific
OS: win XP pro sp2
CPU/Ram: 256mb ram, 1.7 celeron
Comment:

Ok im running a recorset loop to add data to a table but it copys all data exept for the last record here is the code
please help thanks Ant

while not RsStatement4.EOF
RsStatement5.AddNew
RsStatement5!sellersconcode = RsStatement4!s
RsStatement5!sellersname = RsStatement4!nme
RsStatement5!poconcode = RsStatement4!pv
RsStatement5!poname = RsStatement4!code
RsStatement5!RunFindNo = RsStatement4!run
RsStatement5!Amountpaid = RsStatement4!paid
RsStatement4.Update
RsStatement4.MoveNext
wend



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: May 4, 2005 at 07:52:05 Pacific
Reply:

If the last line is failing for some reason, VB should produce an error. There are numerous possibilities: A mistyped word. The Amount failed field is miss spelt or doesn't exist. Every time there is a problem like this, VB will generate an error.

It may be that you have your error trapping code is configured in such a way that the error forces a return to the calling routine and the error is reported there. If this is the case, run the application from within the IDE and set it to stop on all errors. The default is to stop on unhandled errors.

Stuart


0

Response Number 2
Name: Chi Happens
Date: May 4, 2005 at 08:06:37 Pacific
Reply:

while not RsStatement4.EOF
RsStatement5.AddNew
RsStatement5!sellersconcode = RsStatement4!s
RsStatement5!sellersname = RsStatement4!nme
RsStatement5!poconcode = RsStatement4!pv
RsStatement5!poname = RsStatement4!code
RsStatement5!RunFindNo = RsStatement4!run
RsStatement5!Amountpaid = RsStatement4!paid
RsStatement4.Update
RsStatement4.MoveNext
wend
should be
while not RsStatement4.EOF
RsStatement5.AddNew
RsStatement5!sellersconcode = RsStatement4!s
RsStatement5!sellersname = RsStatement4!nme
RsStatement5!poconcode = RsStatement4!pv
RsStatement5!poname = RsStatement4!code
RsStatement5!RunFindNo = RsStatement4!run
RsStatement5!Amountpaid = RsStatement4!paid
RsStatement5.Update ' <-- the problem is here
RsStatement4.MoveNext
wend

They mostly come at night...mostly


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


JDBC! I Think? .bat Automatically Overwr...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: RecordSet help vb6

saving rtf files to a folder (vb6) www.computing.net/answers/programming/saving-rtf-files-to-a-folder-vb6/11617.html

Why wont this work? Plz help! VB6 www.computing.net/answers/programming/why-wont-this-work-plz-help-vb6/6228.html

Need help in VB6 www.computing.net/answers/programming/need-help-in-vb6/8843.html