I need to pass a table from Access to SQL-server and execute a stored-procedure.
I'm using pass-through queries in Access to do this.
My pass-through query:
DECLARE @MyVar TABLE { .....<variables> }
INSERT INTO @MyVar SELECT *
FROM [MyTable]
EXEC sproc_test @Myvar
My stored-procedure:
ALTER PROCEDURE [dbo].[sproc_test]
@MyVar TABLE(....<variables>)
AS ...<the rest of the sproc>
Should this work? I'm getting an "Incorrect syntax near TABLE" error in the stored-procecure.