Connecting a database on the internet

Results 1 to 2 of 2

Thread: Connecting a database on the internet

  1. #1
    Koen Penders Guest

    Default Connecting a database on the internet

    I&#039ve written a simple ASP code to display all the records of the &#039Name&#039 field from an Access database. I executed the file on the Personal Web Server (http://localhost/...) The code worked: the records were perfectly listed.<BR><BR>After this, I&#039d tested the code on the internet (on my free homepage), but I noticed the code didn&#039t work.<BR>When I viewed the source via the menu bar of my browser, the original ASP code was shown (on the Personal Web Server, an HMTL code was shown)<BR><BR>I&#039ve used the following code:<BR>&#060;%<BR>Dim objData<BR>Dim Tabel<BR><BR>Set objData = Server.CreateObject("ADODB.Connection")<BR>Data.Op en("systemdsn=" & Server.MapPath("Data.dsn") & ";DBQ=" & Server.MapPath("Data.mdb") & ";")<BR><BR>set objTable = Data.Execute("SELECT * FROM TestData;")<BR><BR>Table.MoveFirst<BR>Do While Not Tabel.EOF<BR> Response.Write Tabel("Name")<BR>Table.MoveNext<BR>Loop<BR>%&#062; <BR><BR>Do you know what could be wrong???

  2. #2
    Conrad Guest

    Default RE: Connecting a database on the internet

    Does your hosting service have ASP and FrontPage extensions enabled?

Posting Permissions

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