If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Insert Dynamic form fields into DB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-16-05, 00:00
bdensmore bdensmore is offline
Registered User
 
Join Date: Dec 2005
Posts: 4
Insert Dynamic form fields into DB

I have a bunch fo dynamic form fields that contain string,numeric and date fields that I need to insert into a database. I'm not sure how I can write my insert and update statements based on these fields to know where to put quotes and where not to put them. Has anyone done something like this?

Any help would be greatly appreciated.

Thanks,
Ben
Reply With Quote
  #2 (permalink)  
Old 12-16-05, 12:15
fredservillon fredservillon is offline
Registered User
 
Join Date: Oct 2005
Posts: 178
You need to get hold of script writing with how-to database book. check my posting about "Web Database"
Reply With Quote
  #3 (permalink)  
Old 12-18-05, 17:30
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
The normal approach with this sort of thing is to use a naming scheme that identifies the type of field you are trying to insert/update...

eg. numHouses, txtAddress1, datToday

You can grab the first three letters of the field name to know what data type it is and from that determine how to structure your sql.

Of course this is assuming you are creating your sql on the file and I don't really recommend that but... it's your call.
Reply With Quote
  #4 (permalink)  
Old 12-20-05, 01:25
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
And www.asp101.com/samples has some short database examples. I believe the method used there is to save a recordset. The other way would be to use an INSERT SQL statement instead of a SELECT...
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On