Hello,
I am using Dreamweaver MX to interact with a Microsoft Access Database. My host told me to use ASP VBScript. That is what I used in Dreamweaver. Unfortunately, I do not know any of the supported languages yet, which is probably why I can't solve the following problem.
On my PC, everything seems to work fine. I set up the DSN situation and made a connection. When making a recordset, the test works fine and sorts the records. So I am connected ok. I put a repeating region and some dynamic text on the actual page. When pressing F12, the browser only shows a page full of code. I tried this online and on my PC. Also, I made sure to upload the supporting folder named "connections". But still, I get this in my browser instead of the database info:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim mob_beerlist__MMColParam
mob_beerlist__MMColParam = "1"
If (Request("MM_EmptyValue") <> "") Then
mob_beerlist__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim mob_beerlist
Dim mob_beerlist_numRows
Set mob_beerlist = Server.CreateObject("ADODB.Recordset")
mob_beerlist.ActiveConnection = "dsn=dsn_maxs_beerlist;"
mob_beerlist.Source = "SELECT beer_name, alcohol FROM beer_list WHERE MOB = " + Replace(mob_beerlist__MMColParam, "'", "''") + " ORDER BY beer_name ASC"
mob_beerlist.CursorType = 0
mob_beerlist.CursorLocation = 2
mob_beerlist.LockType = 1
mob_beerlist.Open()
mob_beerlist_numRows = 0
%>
<html>
<head>
<title>Max's Beer Lists</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" border="1" cellspacing="0" cellpadding="10">
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><%=(mob_beerlist.Fields.Item("beer_name").Value)%></td>
<td><%=(mob_beerlist.Fields.Item("alcohol").Value)%></td>
</tr>
</table>
</body>
</html>
<%
mob_beerlist.Close()
Set mob_beerlist = Nothing
%>
It seems like the server isn't processing it or something? Maybe the support tech is wrong about the language support? What is going on? Thanks.
Tony
I am using Dreamweaver MX to interact with a Microsoft Access Database. My host told me to use ASP VBScript. That is what I used in Dreamweaver. Unfortunately, I do not know any of the supported languages yet, which is probably why I can't solve the following problem.
On my PC, everything seems to work fine. I set up the DSN situation and made a connection. When making a recordset, the test works fine and sorts the records. So I am connected ok. I put a repeating region and some dynamic text on the actual page. When pressing F12, the browser only shows a page full of code. I tried this online and on my PC. Also, I made sure to upload the supporting folder named "connections". But still, I get this in my browser instead of the database info:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim mob_beerlist__MMColParam
mob_beerlist__MMColParam = "1"
If (Request("MM_EmptyValue") <> "") Then
mob_beerlist__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim mob_beerlist
Dim mob_beerlist_numRows
Set mob_beerlist = Server.CreateObject("ADODB.Recordset")
mob_beerlist.ActiveConnection = "dsn=dsn_maxs_beerlist;"
mob_beerlist.Source = "SELECT beer_name, alcohol FROM beer_list WHERE MOB = " + Replace(mob_beerlist__MMColParam, "'", "''") + " ORDER BY beer_name ASC"
mob_beerlist.CursorType = 0
mob_beerlist.CursorLocation = 2
mob_beerlist.LockType = 1
mob_beerlist.Open()
mob_beerlist_numRows = 0
%>
<html>
<head>
<title>Max's Beer Lists</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" border="1" cellspacing="0" cellpadding="10">
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><%=(mob_beerlist.Fields.Item("beer_name").Value)%></td>
<td><%=(mob_beerlist.Fields.Item("alcohol").Value)%></td>
</tr>
</table>
</body>
</html>
<%
mob_beerlist.Close()
Set mob_beerlist = Nothing
%>
It seems like the server isn't processing it or something? Maybe the support tech is wrong about the language support? What is going on? Thanks.
Tony