I figured it out. While there is no table-valued parameter (TVP) object available in ADO, you can execute raw SQL statements on a SQL Server connection. The solution is to:
- Build a SQL statement that uses a TVP
- Execute the SQL statement on the ADO connection.
For example:
Dim cnSQLServer As ADODB.Connection
Dim rst As ADODB.Recordset
Dim strSQL As String
Set cnSQLServer = New ADODB.Connection
cnSQLServer.Open "Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;Integrated Security = SSPI"
' Build a SQL statement that uses a TVP
strSQL = "DECLARE @ReturnMessage nvarchar(255) " + _
"DECLARE @catType CategoryTableType " + _
"INSERT INTO @catType" + _
"EXEC ('" + _
"SELECT ''Organic'', ''Organically grown produce and grains'' " + _
"SELECT ''Conventional'', ''Non-organically grown produce and grains'' " + _
"SELECT ''Irish'', ''Mrs. O''''Leary''''s creamery products'' " + _
"') " + _
"EXEC dbo.usp_InsertCategory @catType, @ReturnMessage OUTPUT; " + _
"SELECT @ReturnMessage as ReturnMessage'"
' Execute the SQL statement on the ADO connection.
Set rst = cnSQLServer.Execute(strSQL)
The solution is described in more detail in an article about calling TVPs from MS Access: Using SQL Server 2008 Table-valued Parameters in Access 2007
Using a TVP gave me a nice performance boost. Hope this helps someone else. Cheers.