Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
database troubles - need basic help
Old 06-04-2004, 06:01 PM database troubles - need basic help
Junior Talker

Posts: 3
Trades: 0
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>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><%=(mob_beerlist.Fields.Item("beer_name").Valu e)%></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
djrez is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-05-2004, 05:18 PM
Extreme Talker

Posts: 160
Trades: 0
You sound like you are viewing your pages through the browser rather than having them run on the server and output to the browser.
Make sure your Web server (ie PWS, IIS) is running.
Type in to your browser address bar http://127.0.0.1 followed by / and the alias for the virtual directory the site is located in, if you have one. If not simply type http://127.0.0.1 and press return. This may get you a directory listing that you can then navigate until you find the file you wish to view.
The server may request a username and password depending on how your server is configured.
ElectricSheep is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to database troubles - need basic help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.34452 seconds with 12 queries