Solved

asp

Posted on 1998-08-31
2
183 Views
Last Modified: 2010-04-09
I have an MS-ACCESS database that I want an access from the internet.  I have NT SERVER 4.0.  I think that is possible to do this by creating an .ASP file with ACCESS.

Can you help me?
0
Comment
Question by:DanielBlais
[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
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
MasseyM earned 200 total points
ID: 1837261
Sure thing,
Put this in the ASP file you have:

<%
Param = Request.QueryString("Param")
Data = Request.QueryString("Data")
CurrentYear = 0
CurrentDate = Date()
%>
<%
If IsObject(Session("YOURDSN_conn")) Then
    Set conn = Session("YOURDSN_conn")
Else
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.open "YOURDSN","",""
    Set Session("YOURDSN_conn") = conn
End If
%>
<%
    sql = "SELECT * FROM YourTable "
    If cstr(Param) <> "" And cstr(Data) <> "" Then
        sql = sql & " WHERE [" & cstr(Param) & "] = " & cstr(Data)
    End If
    sql = sql & "ORDER BY YourTable.Field;"    
    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open sql, conn, 3, 3
%>

<%
On Error Resume Next
rs.MoveFirst
do while Not rs.eof
%>
<% =rs.Fields("FieldName") ' This will print out the field...%>
<%
rs.MoveNext
Loop
%>

Also, make sure you set up a "SYSTEM DSN" in your ODBC control panel item to equal the DB name.


0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1837262
Anymore questions, you can send them to me at masseym@hotmail.com
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JQuery conflicts/syntax issue 4 32
CSS - Centering an image 2 48
Making Table Thru ASP Response.write 5 39
SSL unsecure page mystery 17 47
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

710 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