HighDots Forums  

Insert Date into Database

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Insert Date into Database in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
cwwilly
 
Posts: n/a

Default Insert Date into Database - 09-01-2004 , 01:33 PM






Hello,

I have three dropdowns on a form: Month, Day, Year. I want to
combine the three and insert them into one database field.

BirthDate = Request.Form("Year") + "/" + Request.Form("Month") + "/" +
Request.Form("Day")

How do I pass the BirthDate string into the MM_fieldsStr ? What I
have below doesn't currently work.

Thanks !

Code:

If (CStr(Request("MM_insert")) = "PatientDemographics") Then

BirthDate = Request.Form("Year") + "/" + Request.Form("Month") + "/" +
Request.Form("Day")

MM_editConnection = MM_CTDB_Secure_STRING
MM_editTable = "dbo.tblPatientDemographics"
MM_fieldsStr = "" + BirthDate +
"|value|PatientID|value|SubmittedBy|value|Submitte dDTS|value|ModBy|value|ModDTS|value|Age|value|Sex| value|Height|value|Weight|value|Race|value|Race_Ot her|value"
MM_columnsStr = "BirthDate|',none,DEFAULT|FK_PatientID|',none,''|S ubmittedBy|',none,''|SubmittedDTS|',none,NULL|ModB y|',none,''|ModDTS|',none,NULL|Age|none,none,NULL| Sex|',none,''|Height|none,none,NULL|Weight|none,no ne,NULL|Race|',none,''|RaceOther|',none,''"

Reply With Quote
  #2  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Insert Date into Database - 09-01-2004 , 02:36 PM






.oO(cwwilly)

Quote:
I have three dropdowns on a form: Month, Day, Year.
That's bad. Why not do it in a more usable way - a simple input line and
a server-side script for parsing the input? Would make your visitors
very happy ...

Micha


Reply With Quote
  #3  
Old   
jobo_
 
Posts: n/a

Default Re: Insert Date into Database - 11-11-2004 , 12:29 PM



Instead of a server-side script to parse, how about a validation control?

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.