ASP UPDATE. need help---error '800a01c2' Wrong number of arguments or invalid property assignment (Full Version)

All Forums >> [Web Development] >> ASP, PHP, and Database



Message


watle -> ASP UPDATE. need help---error '800a01c2' Wrong number of arguments or invalid property assignment (7/4/2009 10:05:16)

my asp data don“t work, when i tried to update.
Thx
Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment

/rboggs/wu/wu006/assignment/asp_update.asp, line 239


//Update Statement
sql = "UPDATE registration SET Firstname = '" & firstname & "', Lastname = '" & lastname & "', City = '" & city & "', Street = '" & street & "', PLZ ='" & plz & "', State ='" & state & "', Homephone='"& homephone & "', Cellphone='" & cellphone & "', Age='" & birthdate & "', Gender='" & gender & "', Interested_Prayer='" & prayer & "', Interested_Worship='" & worship_together & "', Interested_Download='" & download & "', Interested_Donation='" & donation & "', Interested_Request='" & request & "', Additional='" & questions & "', Appreciation='" & appreciation & "', Email='" & emailadresse1 & "', WHERE ID = '" & id & "';"

set lrs = conn.Execute(sql)
%>
<h3>Your data was updated sucessfully</h3>
<a href="asp_read.asp" style="color:#FBIFBI;">[<] Back</a>




Spooky -> RE: ASP UPDATE. need help---error '800a01c2' Wrong number of arguments or invalid property assignm (7/4/2009 18:21:44)

sql = "UPDATE registration SET Firstname = '" & firstname & "', Lastname = '" & lastname & "', City = '" & city & "', Street = '" & street & "', PLZ ='" & plz & "', State ='" & state & "', Homephone='"& homephone & "', Cellphone='" & cellphone & "', Age='" & birthdate & "', Gender='" & gender & "', Interested_Prayer='" & prayer & "', Interested_Worship='" & worship_together & "', Interested_Download='" & download & "', Interested_Donation='" & donation & "', Interested_Request='" & request & "', Additional='" & questions & "', Appreciation='" & appreciation & "', Email='" & emailadresse1 & "', WHERE ID = '" & id & "';" 

response.write sql
response.end



What is the SQL string when you view the page?




watle -> RE: ASP UPDATE. need help---error '800a01c2' Wrong number of arguments or invalid property assignm (7/4/2009 20:05:48)

Hi,
i've filled the form-table and i add the code
with <%response.write sql
response.end%>

Result:

UPDATE registration SET Firstname='Patrick', Lastname='Fabolous', City='Frankfurt', Street='Josefschneider', PLZ='98475', State='Bayern', Homephone='0931234857', Cellphone='0171239485904', Age='30', Gender='male', Interested_Prayer='True', Interested_Worship='False', Interested_Download='True', Interested_Donation='True', Interested_Request='True', Additional='test', Appreciation='great', Email='email@address.de', WHERE ID='47';

with <%response.write sql%>

UPDATE registration SET Firstname='Patrick', Lastname='Fabolous', City='Frankfurt', Street='Josefschneider', PLZ='98475', State='Bayern', Homephone='0931234857', Cellphone='0171239485904', Age='30', Gender='male', Interested_Prayer='True', Interested_Worship='False', Interested_Download='True', Interested_Donation='True', Interested_Request='True', Additional='test', Appreciation='great', Email='email@address.de', WHERE ID='47';

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.

/rboggs/wu/wu006/assignment/asp_update.asp, line 243




Spooky -> RE: ASP UPDATE. need help---error '800a01c2' Wrong number of arguments or invalid property assignm (7/4/2009 23:39:53)

See the last comma? shouldnt be there.

quote:

Email='email@address.de', WHERE


Also, if a column is numeric, you do not use quotes




watle -> RE: ASP UPDATE. need help---error '800a01c2' Wrong number of arguments or invalid property assignm (7/5/2009 15:02:28)

Thanks so much,
i move the quotes for numeric columns and the last comma and it works perfectly.
Thanks




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.21875