Solved

asp

Posted on 1998-08-31
2
190 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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

635 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