Hi. I need to pass a rowid column (multiple rows) to a sql stored procedure from MSAccess form code. I've only ever excuted sql stored procedures that did not need a parameter. I'm sure this is much simpler than it looks to me in many code samples i've looked at. I just don't have the time to learn more about this myself and I also need this to be efficient.
I have a MS Access database (running mdb in msaccess 2007, 2000 compatibility mode). I have a table I'll call MyMSAtbl with one column named RowID. This table may have a few thousand records at once.
I have a Sql Server table (2008 r2) and stored procedure that deletes the records in the sql table for the RowID #'s in my ms access table.
Everything is in place except I do not know how to set and pass my table recid's to the stored procedure.
Here is the Vendors Sql Stored Procedure:
CREATE PROCEDURE spExp_Delete
DELETE FROM MySqlTbl
WHERE ExpDataRowID = @ExpDataRowID
Here is my code to execute the stored proc.:
Private Sub ClearExp_Click()
Dim iReturnVal As Integer
Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another.
Base the dependent combo on a query for its row source:
Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string.
Specify the first argument, which is the expression to be returned:
Specify the second argument, which …