?
Solved

Microsoft Access and ASP

Posted on 2003-02-21
7
Medium Priority
?
134 Views
Last Modified: 2010-05-01
Situation :
I have done all my project using microsoft access.
Now my boss ask me to change to ASP format, so that everybody in the company be able to access the database.

Question :

1. How do I transfer all my forms in access into ASP format?
I wanna do this because I dont want to redo " design form" again.
2. How do I connect my database (acccess) to ASP ?

Thanks for your help.
0
Comment
Question by:cutemouse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 152 total points
ID: 7995083
sorry, but you will need to re-do the Forms design in ASP.  There is no way to directly convert an Access form to an ASP page.  In addition, the User interaction model with ASP is VERY MUCH different from the User intearction model with a typical Window/Forms-based application.

The Data Access technology used by ASP is ADO.

AW
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 7995108
one additional thing to make note of:  the programming language for the Server-side code is VBScript, which is SIMILAR to VBA, but not the same - for one thing, VBScript is 100% TYPE_LESS - all variables are of Type VARIANT:

dim MyValue

rather than

Dim MyValue as Integer (or String or Date or what-have-you)
0
 

Assisted Solution

by:e-Diddy
e-Diddy earned 148 total points
ID: 7995889
Arthur Wood is correct with the design of the page.

Here is a simple way using asp and ODBC to connect to access and retrieve all records in a 'test' table.

First you must create an ODBC Driver, real easy. Find the ODBC 32 bit driver wizard in the Control Panel. (IF NT/2000 choose Administrative tools).
   Choose the System Tab from the top
   Choose add from the right
   Choose Microsoft Access Driver and click Finish at bottom
   
 

Simply type this into any text editor and save as an .asp file in the wwwroot directory,
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:e-Diddy
ID: 7995890
Arthur Wood is correct with the design of the page.

Here is a simple way using asp and ODBC to connect to access and retrieve all records in a 'test' table.

First you must create an ODBC Driver, real easy. Find the ODBC 32 bit driver wizard in the Control Panel. (IF NT/2000 choose Administrative tools).
   Choose the System Tab from the top
   Choose add from the right
   Choose Microsoft Access Driver and click Finish at bottom
   
 

Simply type this into any text editor and save as an .asp file in the wwwroot directory,
0
 

Expert Comment

by:e-Diddy
ID: 7995936
Arthur Wood is correct with the design of the page.

Here is a simple way using asp and ODBC to connect to access and retrieve all records in a 'test' table. There are a few ways to do this each having there own +/-, this way is one of the easiest and effecient enough :-)

**First you must create an ODBC Driver, real easy. Find the ODBC 32 bit driver wizard in the Control Panel. (IF NT/2000 choose Administrative tools).
  Choose the System Tab from the top
  Choose add from the right
  Choose Microsoft Access Driver and click Finish at bottom
  Next screen give this driver a specific name,remember    this you will reference this in code
  Last step is to point at the physicall .mdb..simply browse to it and then click OK, remember the name you gave it so you can reference it in the asp page

Now...
Simply type this into any text editor and save as an .asp file in the wwwroot directory,
------------------------------------------------------
<%
Option Explicit
Dim conn
Dim rs
Dim record

   Set conn = Server.CreateObject("ADODB.Connection")
   Set rs = Server.CreateObject("ADODB.RecordSet")

'Put the ODBC Name you created here, I used connTest for Example
 Conn.Open connTest; uid=; pw;
 Rs.Open "Select * From Test", Conn

If Not Rs.Eof And Not Rs.Bof Then
   For Each record In Rs.Fields
      Response.Write(record)
   Next
Else
  Response.Write("No Data")
End If

Rs.Close
Set Rs = Nothing
Conn.Close
Set Conn = Nothing
%>
<!--HTML BELOW HERE IF NEEDED -->

-------------------------------------------
hope this basic example helps, I did not run this so if you get a syntax problem let me know
0
 

Expert Comment

by:CleanupPing
ID: 8901303
cutemouse:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8964080
Moderator, my recommended disposition is:

    Split points between: Arthur_Wood and e-Diddy

DanRollins -- EE database cleanup volunteer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question