Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old September 1st, 2003, 08:41 AM
buckleya1 buckleya1 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 5 buckleya1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sending Information to a Database

Hi All,
I have created a Microsoft Access Database on my PC and also have an online form on my site. I want this information to be sent directly to my database when a person hits the submit button on my page. I have nothing launched yet on the network but it's just temporarily on my pc.
How would I set this up. I have all the fields in the database set up in 1 table and matching the fields in the form.
Would anyone have code for this.
I would be very grateful if someone could help me out.
Cheers

Last edited by buckleya1 : September 4th, 2003 at 06:51 AM.

Reply With Quote
  #2  
Old September 9th, 2003, 03:20 PM
ashi2001 ashi2001 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: USA
Posts: 62 ashi2001 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
I can help you to write the code in ASP. U have to post the column names.

Thanks,
Ashi
http://www.ringvirginia.com
__________________
Ashi Notani
ashinotani@hotmail.com (Email)

Reply With Quote
  #3  
Old September 10th, 2003, 03:11 AM
buckleya1 buckleya1 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 5 buckleya1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi ya,
I have IIS on my machine so hopefully you're code would work.

The name of my text fields are:
patientName
patientEmail
patientDOB
patientTelNo
patient_entry_date

The names of the fields in the Database are:
Patient_Name
Email_Address
DateOfBirthTelephone_Number
DateOfEntry

Thanks very much for helping me out
Alan

Reply With Quote
  #4  
Old September 10th, 2003, 10:21 AM
ashi2001 ashi2001 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: USA
Posts: 62 ashi2001 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
<form name="form1" method="post" action="form2.asp">
<p><strong><font size="4" face="Verdana, Arial, Helvetica, sans-serif">Form: </font></strong></p>
<p>
<input name="patientName" type="text" id="patientName">
</p>
<p>
<input name="patientEmail" type="text" id="patientEmail">
</p>
<p>
<input name="patientDOB" type="text" id="patientDOB">
</p>
<p>
<input name="patientTelNo" type="text" id="patientTelNo">
</p>
<p>
<input name="patient_entry_date" type="text" id="patient_entry_date">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
------------------------------------------------------------------------------
save the above form as form1.asp

Thanks,
Ashi
http://www.ringvirginia.com

Reply With Quote
  #5  
Old September 10th, 2003, 10:23 AM
ashi2001 ashi2001 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: USA
Posts: 62 ashi2001 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
<%

patientName=request.form("patientName")
response.write patientName
patientEmail=request.form("patientEmail")
response.write patientEmail
patientDOB=request.form("patientDOB")
response.write patientDOB
patientTelNo=request.form("patientTelNo")
response.write patientTelNo
patient_entry_date=request.form("patient_entry_date")
response.write patient_entry_date
'response.End

Set cnn = Server.CreateObject("ADODB.Connection")
strConn = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("mdbname.mdb") & ";
cnn.Open strConn
Set rs = Server.CreateObject("ADODB.Recordset")
'rs.open "select * from sform",cnn
cnn.execute "Insert INTO sform(Patient_Name,Email_Address,DateOfBirth,Telep hone_Number,DateOfEntry)values('"&patientName&"','"&patientEmail&"','"&patientDOB&"','"&patientTelNo&"','"&patient_entry_date&"')"

%>

Thanks,
Ashi
http://www.ringvirginia.com

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Sending Information to a Database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway