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:
  #1  
Old September 1st, 2003, 09: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 07:51 AM.

Reply With Quote
  #2  
Old September 9th, 2003, 04: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: 7
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, 04: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, 11: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: 7
<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, 11: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: 7
<%

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





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek