Update Query... (Full Version)

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



Message


alastairwheatcroft -> Update Query... (5/2/2003 9:59:07)

Anyone....

This is the query line ...

fp_sQry= UPDATE Users SET x_firstname = ' ::x_firstname::' , x_lastname = ' ::x_lastname::' , UserName = ' ::UserName::' , x_email = ' ::x_email::' , Password = ' ::Password::' , x_company = ' ::x_company::' , x_address = ' ::x_address::' , x_city = ' ::x_city::' , x_state = ' ::x_state::' , x_zip = ' ::x_zip::' , x_country = ' ::x_country::' , x_phone = ' ::x_phone::' , x_fax = ' ::x_fax::' , x_website = ' ::x_website::' , PrefList = ' ::PrefList::' , Logo = ' ::Logo::' , Description = ' ::Description::' WHERE UserID= ' ::UserID::'

This is an update script to update a customised spooky login database, to allow customers to update their own details.

When the query is run, I get this message...
Technical Information (for support personnel)

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/Smallholder/UpdateCompanyDetails.asp, line 14, column 16
fp_sQry= UPDATE Users SET x_firstname = ' ::x_firstname::' , x_lastname = ' ::x_lastname::' , UserName = ' ::UserName::' , x_email = ' ::x_email::' , Password = ' ::Password::' , AccountExpires = ' ::AccountExpires::' , x_company = ' ::x_company::' , x_address = ' ::x_address::' , x_city = ' ::x_city::' , x_state = ' ::x_state::' , x_zip = ' ::x_zip::' , x_country = ' ::x_country::' , x_phone = ' ::x_phone::' , x_fax = ' ::x_fax::' , x_website = ' ::x_website::' , PrefList = ' ::PrefList::' , Logo = ' ::Logo::' , Description = ' ::Description::' WHERE UserID= ' ::UserID::' ;
---------------^


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Page:
POST 234 bytes to /Smallholder/UpdateCompanyDetails.asp

POST Data:
UserID=139&x_firstname=Test&x_lastname=Test&UserName=Test&x_email=&Password=test&AccountExpires=&x_company=xx&x_address=&x_city=&x_state=&x_zip=&x_country=&x_phone=&x_fax=&x_website=&PrefList=&Logo=&D . . .

Any help greatly appreciated...[8|]




SerenityNet -> RE: Update Query... (5/2/2003 10:11:42)

Is logo a numeric, radio button, or checkbox field? If so then you need to remove the apostrophes. For instance Logo = ::Logo:: instead of Logo = ' ::Logo::'

I have to qualify that this is a guess.

Regards,
Andrew




alastairwheatcroft -> RE: Update Query... (5/2/2003 11:54:38)

[:j]Thanks for replying...

Logo is a Text Field.... The path to the graphic of a company logo goes there...

The Description field is a " memo" field, and Userid is autonumber...

Regards
Alastair




rdouglass -> RE: Update Query... (5/2/2003 13:17:02)

quote:

WHERE UserID= ' ::UserID::'


Yup, that code would be a prob if UserID is autonumber. That' s what S-Net was referring to. Try the same without apostrophes around UserID...

... WHERE UserID= ::UserID::

That should help some...[:)]




alastairwheatcroft -> RE: Update Query... (5/2/2003 13:39:36)

Thanks Again everyone...

I have just tried that... No joy, exactly the same error.

Any more ideas?

I am stuck.....really stuck...[:o]

Alastair




Spooky -> RE: Update Query... (5/2/2003 14:29:18)

quote:

Expected end of statement
?

Can you paste the actual asp code that produces the SQL statement?




rdouglass -> RE: Update Query... (5/2/2003 15:04:45)

quote:

...line 14, column 16


That is the space after UPDATE. Did you by chance diet the DRW and remove the quotes? [:o] I don' t mean to insult your intelligence, but I' ve done stuff like that...[:(] The actual line should look something like this in HTML view:

fp_sQry=" UPDATE Users SET x_firstname = ' ::x_firstname::' , x_lastname = ' ::x_lastname::' , UserName = ' ::UserName::' , x_email = ' ::x_email::' , Password = ' ::Password::' , AccountExpires = ' ::AccountExpires::' , x_company = ' ::x_company::' , x_address = ' ::x_address::' , x_city = ' ::x_city::' , x_state = ' ::x_state::' , x_zip = ' ::x_zip::' , x_country = ' ::x_country::' , x_phone = ' ::x_phone::' , x_fax = ' ::x_fax::' , x_website = ' ::x_website::' , PrefList = ' ::PrefList::' , Logo = ' ::Logo::' , Description = ' ::Description::' WHERE UserID= ::UserID::"




alastairwheatcroft -> RE: Update Query... (5/2/2003 15:22:47)

[:o][8|][:o] .....Yep... I did diet the DRW....[:o]... I can' t try the quotes though....The wifes nicked the laptop for the evening...[:@]...ah welll let you know....[:D]

Thanks in hope...!

Alastair

p.s. why is it always the simple things...




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.109375