Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

asp

Posted on 1998-08-31
2
Medium Priority
?
195 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 400 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

715 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