A
Andro Dgebuadze
Hi
I am new to ADP and have trivial question:
How to pass a parameter to a stored procedure?
Here is my SP:
===================================
CREATE PROCEDURE dbo.[COA to Table1]
@RowID INT
AS INSERT INTO dbo.Table1
(Seg2)
SELECT Seg2
FROM dbo.COA
WHERE (ID = @RowID)
GO
====================================
If I run this this procedure it asks me RowID parameter and when I submit a
number it appents 1 record to Table 1.
But how should I do it by Code? I tried DoCmd.OpenStoredProcedure but it has
no option to pass paramater.
I have tried through ADODB.Command but Execute command was failing.
Can you give me a VBA Script to run this procedure with parameter RowID=77
(for example?)
Thanks
Andro
I am new to ADP and have trivial question:
How to pass a parameter to a stored procedure?
Here is my SP:
===================================
CREATE PROCEDURE dbo.[COA to Table1]
@RowID INT
AS INSERT INTO dbo.Table1
(Seg2)
SELECT Seg2
FROM dbo.COA
WHERE (ID = @RowID)
GO
====================================
If I run this this procedure it asks me RowID parameter and when I submit a
number it appents 1 record to Table 1.
But how should I do it by Code? I tried DoCmd.OpenStoredProcedure but it has
no option to pass paramater.
I have tried through ADODB.Command but Execute command was failing.
Can you give me a VBA Script to run this procedure with parameter RowID=77
(for example?)
Thanks
Andro