Connecting Tech Pros Worldwide Forums | Help | Site Map

DataReport not updating at run time in vb6

Newbie
 
Join Date: Feb 2007
Posts: 9
#1: Feb 28 '07
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 ....

vijaydiwakar's Avatar
Site Addict
 
Join Date: Feb 2007
Posts: 579
#2: Feb 28 '07

re: DataReport not updating at run time in vb6


Quote:

Originally Posted by anoopgopal007

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
Newbie
 
Join Date: Feb 2007
Posts: 9
#3: Feb 28 '07

re: DataReport not updating at run time in vb6


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"
vijaydiwakar's Avatar
Site Addict
 
Join Date: Feb 2007
Posts: 579
#4: Feb 28 '07

re: DataReport not updating at run time in vb6


Quote:

Originally Posted by anoopgopal007

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
Newbie
 
Join Date: Feb 2007
Posts: 9
#5: Feb 28 '07

re: DataReport not updating at run time in vb6


Please give cod for commit.........

Thank u for the reply.........
Newbie
 
Join Date: Feb 2007
Posts: 9
#6: Feb 28 '07

re: DataReport not updating at run time in vb6


Commited the transactions..... but ...
Still i have prob..........

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

Please help me.......
Reply


Similar Visual Basic 4 / 5 / 6 bytes