![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I am having trouble trying to figure out an error I have with DW created Command Object. The error is below: Microsoft OLE DB Provider for SQL Server error '80040e14' Incorrect syntax near ')'. /labeldivision/Customer/AddCreditCard.asp, line 37 Here is the code: % if(request("NameOnCard") <> "") then Command1__Name = request("NameOnCard") % % set Command1 = Server.CreateObject("ADODB.Command") Command1.ActiveConnection = MM_ASPConn_STRING Command1.CommandText = "INSERT INTO dbo.TblCreditCard (NameOnCard) VALUES (" + Replace(Command1__Name, "'", "''") + ") " Command1.CommandType = 1 Command1.CommandTimeout = 0 Command1.Prepared = true Command1.Execute() % I have looked all over trying to figure this out. I think it must e something to do with the quotes but this is exactly the way that DW wrote it. |
![]() |
| Thread Tools | |
| Display Modes | |
| |