I have the following VBA code:
Dim strMonth As String
strMonth = Me.cboOnyxAllocationHistoryMonth.Value
strCnxn = set_connection()
Set cnxn = New ADODB.Connection
cnxn.Open strCnxn
strSQL_Execute = "db
nyx_Allocation_Report_Creation " & strMonth
MsgBox strSQL_Execute
cnxn.Execute strSQL_Execute, , adExecuteNoRecords
The parameter being passed in strMonth is "02/28/2010". When I run the stored procedure in SQL Server 2005 the procedure runs just fine. The error message I get is as follows:
Incorrect syntax near '/'.
This error message is coming from the following line:
cnxn.Execute strSQL_Execute, , adExecuteNoRecords
I have never run into this before and have googled this to death. Any help on this is greatly appreciated. Thanks.
Dave
Dim strMonth As String
strMonth = Me.cboOnyxAllocationHistoryMonth.Value
strCnxn = set_connection()
Set cnxn = New ADODB.Connection
cnxn.Open strCnxn
strSQL_Execute = "db
MsgBox strSQL_Execute
cnxn.Execute strSQL_Execute, , adExecuteNoRecords
The parameter being passed in strMonth is "02/28/2010". When I run the stored procedure in SQL Server 2005 the procedure runs just fine. The error message I get is as follows:
Incorrect syntax near '/'.
This error message is coming from the following line:
cnxn.Execute strSQL_Execute, , adExecuteNoRecords
I have never run into this before and have googled this to death. Any help on this is greatly appreciated. Thanks.
Dave