0

I connect my script with an MSSQL database using "ADODB.Connection".

Afterwards I'm copying one table to another table (works fine):

Call oDBConnection.Execute("INSERT INTO " & sTargetTable & "SELECT * FROM " & sSourceTable)

afterwards I want to delete all entries of sSourceTable (works also fine):

Call oDBConnection.Execute("DELETE FROM " & sSourceTable )

My question is: Does the second query wait till the first query is completed?

1 Answer 1

1

In General, the Execute call will return when the SQL (the INSERT in this case) is finished.

Call oDBConnection.Execute("INSERT INTO " & sTargetTable & " SELECT * FROM " & sSourceTable)

Hence the second Execute will be called after the first is finished.

Call oDBConnection.Execute("DELETE FROM " & sSourceTable )
Sign up to request clarification or add additional context in comments.

1 Comment

Hi @jsodemann, if this or any answer has solved your question please consider accepting it by clicking the check-mark. This indicates to the wider community that you've found a solution and gives some reputation to both the answerer and yourself. There is no obligation to do this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.