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!

Doevents - after db.execute is not performing as I expected

Status
Not open for further replies.

chequi

IS-IT--Management
Apr 24, 2000
24
0
0
PR
Hello:

In VB6 I am using code as follows:


gsdatabase = "C:\Program Files\OEGReport\oegdb.mdb"

connstr = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & gsdatabase & ";" _
& "Persist Security Info=False;User Id = ADMIN;password=''"



Set db = New ADODB.Connection
db.CursorLocation = adUseClient
db.ConnectionString = connstr

db.Open

' here comes the action

ssql = "Insert into AdicionaldataX Select * from Adicionaldata " & WHEREFRA

db.execute ssql
doevents
'previous commands to place data in the access table where
'the CR report was set to look data for.

' makepause '(this is a do nothing loop)
cyrstalreport1.action =1 ' I was expecting this line to be executed after execute line was finished.

'the report appears but the data is not there yet
'if I uncomment the makepause line then the report shows ok
' but what I was expecting was that the Doevents would do
' the pause action for me.

Am I misusing the Doevents command or is there a problem expecting it to work with the db.execute command?

Note that what I am doing is moving data from one access table to another in the same database; prior to display the report.

Any suggestions?. I will appreciate it very much.

Chequi.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top