Click here to Skip to main content
15,041,525 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
im vb6 user im want change in i ahve a problem in Eof in!!!!

Set tempRs = gCnn.Execute("Select StudentId From finance_reports.rep_stud_name;")
While Not tempRs.EOF
Set temp_Update_rs = gCnn.Execute("Select distinct * From finance_reports.rep_stud_Others Where StudentId='" & tempRs.Fields(0).Value & "';")
With temp_Update_rs
While Not .EOF
gCnn.Execute ("Update finance_reports.rep_statement1 Set Others" & countX & "='" & Replace(.Fields(1).Value, "'", "''") & "',O_Amount" & countX & "=" & CCur(.Fields(2).Value) & " Where StudentID='" & tempRs.Fields(0).Value & "';")
countX = countX + 1
End With
Set temp_Update_rs = Nothing
countX = 1
Set tempRs = Nothing

how count i write this in im a vb6 developer i want to change in

plz give me sample codes in EOF using and mysql!!!!!!!!thnks in advance........
Updated 3-Jan-10 19:44pm

1 solution

You need to throw all of this out. You seem to be using ADO. Don't. Use ADO.NET to return DataSets and then work with those.

Also, use parameterised queries to handle escaping your SQL statements etc. You're a few years late to be getting out of VB6, but it's never a bad time. Just avoid the VisualBasic namespace, so you can learn to do things the .NET way. This code needs to be totally scrapped and replaced with .NET code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900