Question : pause code in sql2008 through Access07

I do have a code that executes Stored Procedures instructed in Access07 step by step. This all worked fine with SQL2000, but I now would like to have same with SQL2008. the problem now is, that it goes through SP-Executing withouth waiting a SP is finished and therefore, a later SP will be executed withouth having the newest data and will then bring old/wrong results. How can I implement that it waits till SP-executing is finished before executing the next one? Can I implement a pause-code?
thx and merry x-mas
Kongta
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
Me.frmKursupdate_StatusInfo = "Uebertrag in DB...."
Me.FX_Anzeige.ForeColor = RGB(255, 200, 100)
DoEvents

Set c = New ADODB.Connection
c.ConnectionString = "Driver={SQL Server};Server=" & Srv & ";Database=" & DB & ""
c.Open

Set cmd = New ADODB.Command

With cmd
    .ActiveConnection = c
    .CommandText = "sp_DTS_xls_FX"
    .CommandType = adCmdStoredProc
    .CommandTimeout = 0
    
    .Execute
End With

c.Close
Set c = Nothing
Set cmd = Nothing

Me.frmKursupdate_StatusInfo = "....erfolgreich."
Me.FX_Anzeige.ForeColor = RGB(100, 255, 100)
DoEvents
'------------------------------------------------------------------------------

'Uebertraegt tblIndex-------------------------------------

Me.frmKursupdate_StatusInfo = "Uebertrag tblIndex...."
Me.Index_Anzeige.ForeColor = RGB(255, 200, 100)
DoEvents

Set c = New ADODB.Connection
c.ConnectionString = "Driver={SQL Server};Server=" & Srv & ";Database=" & DB & ""
c.Open

Set cmd = New ADODB.Command

With cmd
    .ActiveConnection = c
    .CommandText = "sp_DTS_xls_Index"
    .CommandType = adCmdStoredProc
    .CommandTimeout = 0
    
    .Execute
End With

c.Close
Set c = Nothing
Set cmd = Nothing

Me.frmKursupdate_StatusInfo = "....erfolgreich."
Me.Index_Anzeige.ForeColor = RGB(100, 255, 100)
DoEvents

Answer : pause code in sql2008 through Access07

Random Solutions  
 
programming4us programming4us