Command Object Insert error


hi, having trouble trying figure out error have dw created command object. error below:

microsoft ole db provider sql server error '80040e14'

incorrect syntax near ')'.

/labeldivision/customer/addcreditcard.asp, line 37

here code:

<%

if(request("nameoncard") <> "") command1__name = request("nameoncard")

%>
<%

set command1 = server.createobject("adodb.command")
command1.activeconnection = mm_aspconn_string
command1.commandtext = "insert dbo.tblcreditcard (nameoncard) values (" + replace(command1__name, "'", "''") + ") "
command1.commandtype = 1
command1.commandtimeout = 0
command1.prepared = true
command1.execute()

%>

i have looked on trying figure out. think must e quotes way dw wrote it.

check database field set accept text.

--
paul whitham
certified dreamweaver mx2004 professional
adobe community expert - dreamweaver

valleybiz internet design
www.valleybiz.net

"xybernaut" <webforumsuser@macromedia.com> wrote in message
news:ee6b9q$r13$1@forums.macromedia.com...
> hi, having trouble trying figure out error have dw
> created
> command object. error below:
>
> microsoft ole db provider sql server error '80040e14'
>
> incorrect syntax near ')'.
>
> /labeldivision/customer/addcreditcard.asp, line 37
>
> here code:
>
> <%
>
> if(request("nameoncard") <> "") command1__name =
> request("nameoncard")
>
> %>
> <%
>
> set command1 = server.createobject("adodb.command")
> command1.activeconnection = mm_aspconn_string
> command1.commandtext = "insert dbo.tblcreditcard (nameoncard) values
> ("
> + replace(command1__name, "'", "''") + ") "
> command1.commandtype = 1
> command1.commandtimeout = 0
> command1.prepared = true
> command1.execute()
>
> %>
>
> have looked on trying figure out. think must e
>
> quotes way dw wrote it.
>
>




More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

Authentication error while password reset - Raspberry Pi Forums

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums