Database Update Query

M

Mettá

Can someone tell me what's wrong with the following...

<%
myConnString = Application("DBNAME_ConnectionString")
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.Open myConnString
mySQL= "Update Table1 Set
spname='::spname::',ton='::ton::',mess1='::mess1::',valsent='::valsent::'
WHERE ID1='::ID1::' "
myConnection.Execute mySQL
myConnection.Close
Set myConnection = Nothing
%>


It's in a FP2003 site, was working in a DRW but now fails so I thought I
would create a manual update but am not getting very far
Thanks
M
 
R

Ronx

Is ID1 a numeric field?
If so, then

mySQL= "Update Table1 Set
spname='" & request("spname") & "',ton='" & request("ton") &
"',mess1='" & request("mess1") & "',valsent='" & request("valsent") &
"'
WHERE ID1=" & request("ID1")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top