Hi Imar,
Yes, I do preview on the localhost and have found that I need to specify port 8500 to get the pages to display in the browser (IE6) as follows: -
http://localhost:8500/barlows/
Also, I have given Everyone full access as you suggested but still no data. The page code is as follows:
<%@LANGUAGE="VBSCRIPT"%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_barlows_STRING
Recordset1.Source = "SELECT * FROM Contacts"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim Recordset1_total
Dim Recordset1_first
Dim Recordset1_last
' set the record count
Recordset1_total = Recordset1.RecordCount
' set the number of rows displayed on this page
If (Recordset1_numRows < 0) Then
Recordset1_numRows = Recordset1_total
Elseif (Recordset1_numRows = 0) Then
Recordset1_numRows = 1
End If
' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1
' if we have the correct record count, check the other stats
If (Recordset1_total <> -1) Then
If (Recordset1_first > Recordset1_total) Then
Recordset1_first = Recordset1_total
End If
If (Recordset1_last > Recordset1_total) Then
Recordset1_last = Recordset1_total
End If
If (Recordset1_numRows > Recordset1_total) Then
Recordset1_numRows = Recordset1_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (Recordset1_total = -1) Then
' count the total records by iterating through the recordset
Recordset1_total=0
While (Not Recordset1.EOF)
Recordset1_total = Recordset1_total + 1
Recordset1.MoveNext
Wend
' reset the cursor to the beginning
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
' set the number of rows displayed on this page
If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then
Recordset1_numRows = Recordset1_total
End If
' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1
If (Recordset1_first > Recordset1_total) Then
Recordset1_first = Recordset1_total
End If
If (Recordset1_last > Recordset1_total) Then
Recordset1_last = Recordset1_total
End If
End If
%><style type="text/css">
<!--
body,td,th,p {
color: #FF0000;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
text-decoration: underline;
}
-->
</style>
<form name="form1" method="post" action="">
<%=(Recordset1.Fields.Item("FirstName").Value)%>
<input name="textfield" type="text" value="<%= Abs((Recordset1.Fields.Item("FirstName").Value)) %>">
</form>
<p> </p>
<p>A Z R </p>
<p>B <%=(Recordset1_total)%> </p>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
Basically, there's just some junk text (so that I can change it to verify that I'm looking at the latest version of the page in my browser), and some fields from my database:- firstname and recordset total. I've also added a dynamic text field (just in case I needed it) as part of my testing process.
My connection string is as follows and is taken from the Connections > barlows.asp file:-
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_barlows_STRING
MM_barlows_STRING = "dsn=barlows;"
%>
My Access 2003 database is called Barlowsdb and is in the Databases folder. Both the folder and the database objects (the database application and the Access.lockfile.9) have Everyone with Full Control authority. The DSN setup says Dreamweaver should connect using local DSN.
Under IIS, I have Default Web Site and then (amongst others) the wwwroot and Databases folders.
Not sure what else you might need to know . . . As mentioned previously, the test DSN connection and view data both work fine within DW, its just that I don't see the data when I go via Preview in Browser or if I just type in the URL manually.
Hope you can help Imar!
Best regards,
Mike