473,372 Members | 886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

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 3309
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

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

Similar topics

2
by: berthelot samuel | last post by:
Hi everyone, I am currently trying to write a report based on a View of SQL Server. Basically, I have 3 tables : Hardware, SoftwareInstalled and Software with SoftwareInstalled that keeps track of...
0
by: Jay | last post by:
It seems that every time I instantiate a new datareport and then call the show method the memory usage on my machine goes up but when I close the form the memory usage does not go down. Then every...
3
by: anoopgopal007 | last post by:
Hi, I am using vb6 and msaccess as back end. i want to display some report using datareport. The report printing at first time only. After i updating my table i can't get the updated...
6
by: pramodrepaka | last post by:
hi this is pramod i am facing a small problem Private Sub Command_Click() Dim a As String a = InputBox("enter empno") If rs.State = 1 Then rs.Close rs.Open "select * from microbiology...
0
by: nishjee | last post by:
Hello friends, i need visual basic 6.0 code to export a datareport to html other than the defult option coming with datareport. I need this very urgently because when i am exporting the datareport...
0
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, If i made some changes to a datareport suppose some updates are made then if i opens the report it is not updated. Datareport is connected to dataenvironment. If i use crystalreports does...
9
smartchap
by: smartchap | last post by:
I have a table having 3 fields viz. SNo, FName and LName. The table has 10 records having SNo from 1 to 10. In DataReport I have 3 labels and 3 textboxes. I want to display all records from 1 to 10...
0
by: Manojthanal | last post by:
Hai I am making a VB Acsess project Via DSN method. How we connect this with Datareport. How we get data to Datareport from the tabe using SQL Qury. I am Working first time with data report. My...
1
by: MaryKJolly | last post by:
I got this sample project from a website. But there is some syntax error in the statement which contains the CDate function. I can't detect the error? Can enybody help me? SUMMARY This article...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.