Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form online to add MDB data entries?

Status
Not open for further replies.

tyleri

Programmer
Jan 2, 2001
173
US
I'm having the damndest time trying to figure out how to get a form online to send data into an Access table already running on my server.

Right now I have to resort to opening the Access file, then filling in the info into the table, and then uploading the 300kb file to my server.

Does any one have examples or a website that will give me step by step instructions on how to do this?

PS - I am also going to eventually need to know how to create an EDIT form online as well.

Thanks a lot!

 
Hi ...
you have so much work to do.
you can read the older posts.
but for a brief:
you can have two ASP files.
ASP 1, your form :

firstasp.asp

<form name=&quot;myform&quot; action=&quot;secondasp.asp&quot; method=&quot;post&quot;>
<input type=&quot;text&quot; name=&quot;myinput&quot;>
</form>

ASP 2, the DB part:
secondasp.asp

<%
Set objConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
strDBcnn = &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=myDB.mdb;Persist Security Info=False&quot;

objConn.Open strDBcnn

Set objRS = Server.CreateObject(&quot;ADODB.RecordSet&quot;)
objRS.Open &quot;MyTable&quot;, objConn, 3, 3
objRS.AddNew ()

objRS(&quot;MyField&quot;) = Request.Form(&quot;myinput&quot;)

objRS.Update()
objRS.Close()
Set objRS = Nothing
objConn.Close()
Set objConn = Nothing

Response.Redirec &quot;Someotherasp.asp&quot;
%>

this was a simple sample.
you can expand it as your need.
----
TNX.
E.T.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top