Trying to run SQL Server 2017 stored procedures from MS Access 365. The first 3 SP run, then nothing. Executing them from SQL Server works fine
With CurrentDb.QueryDefs("STOREDPROC")
.SQL = "EXEC dbo.sp_Step1"
.SQL = "EXEC dbo.sp_Step2"
.SQL = "EXEC dbo.sp_Step3"
.SQL = "EXEC dbo.sp_Step4"
.SQL = "EXEC dbo.sp_Step5"
.SQL = "EXEC dbo.sp_Step6"
.ReturnsRecords = False
.Execute
End With
MsgBox ("Import Complete")
1条答案
按热度按时间e4yzc0pl1#
As Access PassThrough query
STOREDPROC
can execute only one SQL instruction, you cannot execute at the same time those stored procedures.You could use a loop like this:
Or if you have rights to create stored prodecure, you can create an All-In-One SP, then call it.