Connecting ASP to a Access DB

Results 1 to 3 of 3

Thread: Connecting ASP to a Access DB

  1. #1
    Scott Micale Guest

    Default Connecting ASP to a Access DB

    Can some one give me a link or a example of how to tie a ASP page into a Access database. I have created a ASP page that takes info about a person, for example name, address, etc. I would like that info to be passed to an access db. Can anyone give me examples of how to do this?<BR><BR>I created a dsn connection in my ODBC in control panel on my web server. That is where the database resides. I went to the System DSN tab and created a new connection. I called it what it needed to be and then supplied the path to where the database was. Is there anything else that needs to be done? If not then how do I tie the ASP page into the database? Any help will be much appreciated!!<BR><BR>-Scott

  2. #2
    Joel M Guest

    Default RE: Connecting ASP to a Access DB

    you can find many many tutorials on the net for this...but a very short example is this... pretend you just posted Form data over to this page from the page that you collected the info from:<BR>----------------------<BR><BR>&#060;%<BR>dim Name, Phone<BR><BR>Name = request.form("name")<BR>Phone = request.form("phone")<BR><BR>set conn = Server.CreateObject("ADODB.Connection")<BR>conn.op en("dsn=DSNNAME")<BR><BR>sql = "INSERT INTO table (empName, empPhone) VALUES (&#039"& Name &"&#039,"& Phone &")"<BR><BR>conn.execute(sql)<BR>%&#062;<BR><BR >-------------------<BR>Hope it helps<BR><BR>Joel<BR>

  3. #3
    Scott Micale Guest

    Default RE: Connecting ASP to a Access DB

    Thanks I will give it a shot. Can you also point me to some sites that would explain it in depth more?<BR><BR><BR>Thanks for your help!

Posting Permissions

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