Need help...

I want to refresh ny adodc connection but it seems to refresh faster than the update can take place.

Here is the code
Set rstemp = New ADODB.Recordset
rstemp.Open "Select * from Temperatures;", cn1, adOpenDynamic, adLockOptimistic
rstemp.AddNew
rstemp!RecipeName = txt_RecpName.Text
rstemp!step1 = txt_TempS1.Text
rstemp!step2 = txt_TempS2.Text
rstemp!step3 = txt_TempS3.Text
rstemp.Update
'need something here tp wait for update completion then refresh


Adodc1.Refresh

Hi,
Use
DoEvents with a for loop

For i=1 to 100
DoEvents
Next

Regards
Veena

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.