By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,144 Members | 972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,144 IT Pros & Developers. It's quick & easy.

DataReport not updating at run time in vb6

P: 9
Hi,

I am using vb6 and datareport. I am updating the tables whle the program running. But the datareport doesnot show the updated information. Its always shows the previous value. But when i restart the package i can see which i updated previously.

Can I see updated information while i am running my package...?
I want to update the datareport in running time... please help me ....
Feb 28 '07 #1
Share this Question
Share on Google+
5 Replies


vijaydiwakar
100+
P: 579
Hi,

I am using vb6 and datareport. I am updating the tables whle the program running. But the datareport doesnot show the updated information. Its always shows the previous value. But when i restart the package i can see which i updated previously.

Can I see updated information while i am running my package...?
I want to update the datareport in running time... please help me ....
try to reopen the command/conection
Feb 28 '07 #2

P: 9
I tryied... to reopen.. the connection ,But still have the sme problem...
Wht i do...?
My databse updation done properly... But only the report have the problem.

Thank u for the reply
I expect more ...

I ll post my code with this... Please check...

cn.Execute "delete * from temp2"
cn.Execute "delete * from temp3"
Set rs = cn.Execute("select distinct pjc from empdetails where (id='" & Trim(txtrpid.Text) & "'and mth='" & Trim(cmbmonth.ListIndex + 1) & "' and yr='" & Trim(txtsrchyr) & "')")
If rs.EOF = True And rs.BOF = True Then
MsgBox "Make sure your entry....", vbCritical, "Error"
Exit Sub
End If
rs.MoveFirst
Do Until rs.EOF
cn.Execute "insert into temp3(pjc)values('" & rs.Fields(0) & "')"
rs.MoveNext
Loop
cn.Close
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path + "\masterdb.mdb" & ";Persist Security Info=False"

Set rs = cn.Execute("select * from empdetails where (id='" & Trim(txtrpid.Text) & "'and mth='" & Trim(cmbmonth.ListIndex + 1) & "' and yr='" & Trim(txtsrchyr) & "')order by prjdate")
rs.MoveFirst
Do Until rs.EOF
cn.Execute "insert into temp2 values('" & rs.Fields(0) & "','" & rs.Fields(1) & "','" & rs.Fields(2) & "','" & rs.Fields(3) & "'," & rs.Fields(8) & ")"
rs.MoveNext
Loop
cn.Close
DataReport3.Show
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path + "\masterdb.mdb" & ";Persist Security Info=False"
Feb 28 '07 #3

vijaydiwakar
100+
P: 579
I tryied... to reopen.. the connection ,But still have the sme problem...
Wht i do...?
My databse updation done properly... But only the report have the problem.

Thank u for the reply
I expect more ...

I ll post my code with this... Please check...

cn.Execute "delete * from temp2"
cn.Execute "delete * from temp3"
Set rs = cn.Execute("select distinct pjc from empdetails where (id='" & Trim(txtrpid.Text) & "'and mth='" & Trim(cmbmonth.ListIndex + 1) & "' and yr='" & Trim(txtsrchyr) & "')")
If rs.EOF = True And rs.BOF = True Then
MsgBox "Make sure your entry....", vbCritical, "Error"
Exit Sub
End If
rs.MoveFirst
Do Until rs.EOF
cn.Execute "insert into temp3(pjc)values('" & rs.Fields(0) & "')"
rs.MoveNext
Loop
cn.Close
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path + "\masterdb.mdb" & ";Persist Security Info=False"

Set rs = cn.Execute("select * from empdetails where (id='" & Trim(txtrpid.Text) & "'and mth='" & Trim(cmbmonth.ListIndex + 1) & "' and yr='" & Trim(txtsrchyr) & "')order by prjdate")
rs.MoveFirst
Do Until rs.EOF
cn.Execute "insert into temp2 values('" & rs.Fields(0) & "','" & rs.Fields(1) & "','" & rs.Fields(2) & "','" & rs.Fields(3) & "'," & rs.Fields(8) & ")"
rs.MoveNext
Loop
cn.Close
DataReport3.Show
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path + "\masterdb.mdb" & ";Persist Security Info=False"
u've not commited the deletion
commit it first then i think problem will be get solved
Feb 28 '07 #4

P: 9
Please give cod for commit.........

Thank u for the reply.........
Feb 28 '07 #5

P: 9
Commited the transactions..... but ...
Still i have prob..........

In my code where is the mistake........????

Please help me.......
Feb 28 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.