This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > August 2004 > Syntax for INSERT command





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Syntax for INSERT command
GeorgeKing

2004-08-26, 12:18 pm

HI,

Could someone help me correct the syntax of the following. Varying problems
with the VALUES part of the insert statement I think.

commInsert.Execute("INSERT INTO ComputerHW(Make, Model, Serial, PurchaseDate,
Location, StaffID, Notes, Memory2, Processor2) VALUES (Request("txtmake") +
"," + Request("txtmodel") + "," + Request("txtserial") + "," +
Request("txtdate") + "," + Request("txtlocation") + "," +
Request("selectstaff") + "," + Request("memonotes") + "," +
Request("txtmemory") + "," + Request("txtprocessor"));")

I always seem to be missing a " or ' or ) somewhere......

Thanks very much.
George King

Julian Roberts

2004-08-26, 12:18 pm

You seem to have most of the logic in place. Apply the same way of thinking
to Request("txtmake")

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004


cmbergin

2004-08-26, 12:18 pm

You're missing ' just about everywhere. Every text value needs to be surrounded by ' to be inserted. Every field in your table (except perhaps StaffID) will need to be set off by '.
GeorgeKing

2004-08-26, 12:18 pm

Hi,

I know what I am missing I just don't know how it should be formatted>

e.g. to turn

......VALUES('George', 'King');")

to the form

.....VALUES( Request("firstname"), Request("Lastname");") with the proper
syntax.

Thanks
GK

Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews