469,575 Members | 1,668 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

DataReport not updating at run time in vb6

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
5 2995
vijaydiwakar
579 512MB
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
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
579 512MB
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
Please give cod for commit.........

Thank u for the reply.........
Feb 28 '07 #5
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.

Similar topics

2 posts views Thread by berthelot samuel | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.