Database updates (Full Version)

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



Message


mjmtravel -> Database updates (2/2/2008 20:35:05)

I have a question about this code and the database fields. I'm having the customer update their information to a database and I have it working until I get down to the number/text fields.

UPDATE tableName SET (dbfield1 = '::formfield1::', etc. WHERE ID = ::ID::)

Question 1. I have a database with fields listed as dates and numbers, but they are set up as text. On my update page with the above code, do I need to remove the apostraphes on a form field that has a number in it, even if the database list's it as text or can I leave them in because the database fields are all text.

Question 2. Do I have to have the database fields that contain numbers set as a number or date?

The reason I'm asking is because I have quite a large form with lots of dates, phone numbers, text and I'm having a hard time getting it to update correctly.
Thanks




codenamebill26 -> RE: Database updates (2/3/2008 1:57:40)

you can try,


setform = formfield1
setid = ID


UPDATE tableName SET (dbfield1 = "&setform&", etc. WHERE ID = "&setid&")



question 2 = numbers




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.03125