I have a client who's getting an error that I cannot duplicate.
Error Message:
Code:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Line 1: Incorrect syntax near 's'.
/Private/couponcodesadd2.asp, line 19
'
couponcodesadd2.asp:
Code:
<%
varpromoamount = 0.00
promocode = Request.Form("promocode")
promodesc = Request.Form("promodesc")
promotype = Request.Form("promotype")
varpromoamount = varpromoamount + Request.Form("promoamount")
promoexpiration = Request.Form("promoexpiration")
adCmdText = 1
strInsert = "insert_PromoCodes_1 '" & promocode & "', '" & promodesc & "', '" & promotype & "', '" & CSng(varpromoamount) & "', '" & promoexpiration & "';"
'response.write promotype &" | " &promoamount
set objCmd = Server.CreateObject("ADODB.Command")
set objCmd.ActiveConnection = objConn
objCmd.CommandText = strInsert
objCmd.CommandType = adCmdText
objCmd.Execute 'Line 19
Set objCmd = Nothing
%>
insert_PromoCodes_1:
Code:
ALTER PROCEDURE [dinners_sqladmin].[insert_PromoCodes_1]
(@promocode_1 [varchar](20),
@promodesc_2 [varchar](512),
@promotype_3 [varchar](50),
@promoamount_4 [decimal](18,2),
@promoexpiration_5 [smalldatetime])
AS INSERT INTO [dinners_dbtd].[dinners_sqladmin].[PromoCodes]
([promocode],
[promodesc],
[promotype],
[promoamount],
[promoexpiration])
VALUES
(@promocode_1,
@promodesc_2,
@promotype_3,
@promoamount_4,
@promoexpiration_5)
I've tried executing the insert from the web pages and directly through SQL Mgt Studio and cannot duplicate the error.
Any help is appreciated.