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

Data Report Question

Status
Not open for further replies.

Craftor

Programmer
Feb 1, 2001
420
0
0
NZ
Hi again all

I am using a Data Report in my program. The theory behind it is that the user fills in a whole lot of information on a form (for a quote) - which is written back to a table in SQL. The Data Report is then shown with the information on it returned from SQL.

The problem arises when the user goes back to the form and wants to change information for the quote. The information is saved successfully back to SQL but the update is not reflected on the data report. I am connecting to SQL with a data environment within the project and have done things like changed my SP's properties to Use Server Side Cursors with a Dynamic Cursor but to no avail.

Advice please

The Craftor

:cool:
 
Craftor,
I had the same problem. You have to reset you DataEviroment. You can this on the datareport_terminate event. Here's how I did it:
Code:
Private Sub DataReport_Terminate()
On Error GoTo ErrorTrap
Unload deQA 'Put your DataEnviroment's Name here:This is mine
Exit_ErrorTrap:
    Exit Sub

ErrorTrap:
    MsgBox "This error occurred in the DataReport_Terminate module in the " & Me.Name & " Report" & Chr(13) & "The error number is " & Err() & Chr(13) & "The error description is " & Err.Description & " Please exit back to the Menu and try again"
    Resume Exit_ErrorTrap
End Sub

hth
Scoty ::)
"Learn from others' mistakes. You could not live long enough to make them all yourself."
-- Hyman George Rickover (1900-86),
 
hi..
scotty told u the right thing...


but according to me u should add one more line which is

dataenvironment1.<command name>

before showing the report....

this might be very useful to u...

Good Luck
Varnit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top