Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Environment question

Status
Not open for further replies.

shannanl

IS-IT--Management
Apr 24, 2003
1,071
0
0
US
I am sending some information to a temporary table and then printing a report from that table. I then am deleting the data in that table, reinserting new data and printing again, etc, etc. My problem is that unless I unload the dataenvironment each time I get carry over data from the previous record. If I unload the dataenvironment and datareport after each record, I get an error saying invalid data source. Is there a good way to "flush" the dataenvironment and datareport after each recordset and get rid of this carry over data from the last record?

Thanks in advance.
 
Do you make a call to the Requery method too?
 
I have tried to requery it like this statement just before my print statement:

DataEnvironment1.rsCommand1.Requery

I have also tried this code:

with dataenvironment1
if .connection2.state <> 0 then .connection2.close
do events
.connection2.open
end with

Neither seem to work


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top