as above
i need to know WHERE to put some code for a button to submit some data captured then transfer to an access database.

any help would be gratefull

Dani AI

Generated

This thread is about Classic ASP + an Access back end, so the simplest and most reliable approach is: keep the form in an HTML section (or a .asp page) and post it to a .asp processing page that runs the server-side code. This keeps markup and server logic clear and avoids trying to "embed" runtime ASP into a static .html file.

A minimal form (form.asp) posts to a processor (save.asp):

<form method="post" action="save.asp">
  <input type="text" name="username">
  <input type="email" name="email">
  <input type="submit" value="Submit">
</form>

Processor example (save.asp) — Classic ASP + ADO with parameterized insert:

<%
Dim conn, cmd, dbPath
dbPath = Server.MapPath("db/mydb.mdb")

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath & ";"

Set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = conn
cmd.CommandText = "INSERT INTO Users (username,email) VALUES (?,?)"
cmd.Prepared = True
cmd.Parameters.Append cmd.CreateParameter("p1", 200, 1, 50, Request.Form("username"))
cmd.Parameters.Append cmd.CreateParameter("p2", 200, 1, 100, Request.Form("email"))
cmd.Execute

conn.Close
Set cmd = Nothing
Set conn = Nothing
Response.Redirect "thanks.asp"
%>

Practical notes and troubleshooting

  • Use Server.MapPath so the connection string points to the correct file path.
  • Grant the IIS process user write permissions on the folder with the .mdb (do not place the .mdb in a publicly browsable folder).
  • For .accdb use the ACE provider (Microsoft.ACE.OLEDB.12.0) and watch 32/64-bit provider issues — JET is 32-bit only, so you may need to enable 32-bit mode on the app pool or install the proper ACE engine.
  • Always use parameterized commands (shown) to avoid injection.
  • Access is fine for low-traffic testing; for concurrent users or payment flows consider moving to a server RDBMS and use HTTPS and proper payment gateway APIs.

This addresses ’s question about where to put the ASP code and expands on platform choices mentioned by and payment/email concerns raised by with concrete Classic ASP steps and deployment cautions.

Recommended Answers

All 2 Replies

hi ,
i really need help i have created two pages first is Where User will create there user id and password ,also they will make payments to subscribe to our services, once they are done with payment and if it get accepted by paypall and they will be generated a userid and password which is actually what they just created for themselves. my question is if its possible ? do i have to email them password and userid. ? if the first option is true how can i do this. I have rented Sqlserver 2000 i mean some spcae created a tabel. PLEASE HELP!!!!!!!!!!many thanx in advance.
Thank You.
Daastan

This is not something you are going to learn overnight my friend!


You are going to need to study ASP.NET to learn how to get the data from the user form, authentication methods and cookies etc..

You are going to need to study SSL to learn how to retreive data SECURELY from the user (you mention payments)

You are going to need to study Webservices to process the payment (I advise finding a host that does this for you, I use pipeten.com)

You are going to need to study ADO.NET to put the data in/get data from your database.

You don't need to send the password in the email but you will want to send a URL with a GUID in the query string for them to click that you saved earlier against their created account in your DB.

You need to study the System.Web.Mail namespace in .NET to learn how to send email with .NET

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.