putting data into a database using a form

Results 1 to 3 of 3

Thread: putting data into a database using a form

  1. #1
    Join Date
    Dec 1969

    Default putting data into a database using a form

    Okay, I know this is a stupid question but I read my whole ASP book and now I am looking back at it to do a form that puts data into a database. I built the form with the code for posting the data like this (in general):<BR><BR>&#060;FORM ACTION = "Calendar.asp" METHOD=POST&#062;<BR><BR>&#060;P&#062;Please type name:&#060;/P&#062;<BR><BR>&#060;P&#062;&#060;INPUT TYPE="TEXT" NAME="Last Name"&#062;&#060;/P&#062;<BR><BR>&#060;P&#062;INPUT TYPE="SUBMIT" VALUE="Submit"&#062;&#060;/P&#062;<BR><BR>&#060;/FORM&#062;<BR><BR>but then I don&#039;t know what to do to put the data from the form into the database. My book skips around and I could use a clue. I guess I would open a connection to the database, like:<BR><BR>objConn.Open "Provider...(this would be the connection string)<BR><BR>but then what do I say to put it into the database? I forgot and if someone could just tell me in general I would really appreciate it!

  2. #2
    Join Date
    Dec 1969

    Default RE: putting data into a database using a form

    1. don&#039;t allow spaces in the name="" attribute of a form. it&#039;s a clumsy error. It&#039;d blow netscape up.<BR><BR>2. the field (assuming you&#039;ve renamed it) is available in calendar.asp as Request.Form("lastname") - from there you should be able to work it out.<BR><BR>j

  3. #3
    Join Date
    Dec 1969

    Default http://www.LearnASP.com

    Look at the "Database" lessons, especially the "Full Cycle" lessons, where he show the whole process of adding a record and then showing and/or editing it.<BR><BR>What book do you have that doesn&#039;t make this lightning clear? Maybe you should toss it and get Scott&#039;s?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts