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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Database

Status
Not open for further replies.

PeteWalburn

Programmer
Jan 13, 2004
63
GB
Hello,

I have a report which must UPDATE the database. I have tried this in 2 ways:

In the Fetch Function I call an update function which executes a SQL UPDATE statement. It the executes a COMMIT statement.

The other method I have tried is:

In the Fetch Function I build up arrays of the values that make the record unique. Then in the FinishReport Sub of the report, I execute the same UPDATE and COMMIT staements.

In both cases the tables are updated, but the report fails giving a message that no parameters were set.

I think that I really need to refresh the report once I have done the UPDATE, but am not sure.

Can anyone shed some light on this problem please?

Pete
 
I update the scheduled finishdate for PM workorders. I just use the value stored in the variable when I display it in the report. This is the same value I used in the update statement. Otherwise you'd have to do another select to get the updated information.

Seems like a no brainer to me unless you initilize it prior to printing it in the report.

Wes


 
Hi Wes,

I probably do really need to do another SELECT, but I have managed to fix the problem. I do the update in the FinishReport event. Also, service pack 2 had been installed and so code that used to work no longer does.

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top