Dukat
Resident Freddy
- Joined
- Jan 10, 2004
- Messages
- 5,396
Hey all
Just wondering, how do I go about checking if ASP is enabled on a webserver? I'm currently putting together a website and it looks like it may not be enabled, I'm not exactly an expert in this web dev stuff (I've only just left college), but I had imagined that there would be a setting on the server somewhere, cant seem to find it :\
I've got a database on the server and I'm trying to pull data out of it via a DNSless connection and all the code looks ok. I'm putting the data from the database into variables, then putting the variables into text fields using the "Value= <% response.write(variable) %> " code, however all I end up with is a text field with a "<%" in it and an extra ">" immediately after the text field.
I've put "response.write("test")" in the code at several areas, hoping that it will give me an indication of how much of the code is being executed, but none of them appear, furthermore when I hit view source on the page it seems to show the ASP code, I thought this wasnt meant to happen if ASP the code was being run properly?
This, in addition to the "<%" being shown in the text field, leads me to believe that ASP isnt enabled on the server, however as I said, I'm, not very experienced at this sort of thing so I thought I'd ask you lot in the hope that someone can spot what stupid mistake I'm making I've tried the usual workarounds, fiddling with the code, google searching, looking at old projects that work and trying to spot a difference in the current project, all of which has'nt seemed to help.
Here's the code listing, incase this helps to show where I've made a stupid mistake
Any help much appreciated as always
Just wondering, how do I go about checking if ASP is enabled on a webserver? I'm currently putting together a website and it looks like it may not be enabled, I'm not exactly an expert in this web dev stuff (I've only just left college), but I had imagined that there would be a setting on the server somewhere, cant seem to find it :\
I've got a database on the server and I'm trying to pull data out of it via a DNSless connection and all the code looks ok. I'm putting the data from the database into variables, then putting the variables into text fields using the "Value= <% response.write(variable) %> " code, however all I end up with is a text field with a "<%" in it and an extra ">" immediately after the text field.
I've put "response.write("test")" in the code at several areas, hoping that it will give me an indication of how much of the code is being executed, but none of them appear, furthermore when I hit view source on the page it seems to show the ASP code, I thought this wasnt meant to happen if ASP the code was being run properly?
This, in addition to the "<%" being shown in the text field, leads me to believe that ASP isnt enabled on the server, however as I said, I'm, not very experienced at this sort of thing so I thought I'd ask you lot in the hope that someone can spot what stupid mistake I'm making I've tried the usual workarounds, fiddling with the code, google searching, looking at old projects that work and trying to spot a difference in the current project, all of which has'nt seemed to help.
Here's the code listing, incase this helps to show where I've made a stupid mistake
<%
response.write("1") <- this is not being written
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(server.MapPath("../database/DB.mdb"))
set rs=Server.CreateObject("ADODB.recordset")
Dim PRODUCT_CODE
Dim PRODUCT_DESC
Dim PRODUCT_ATTR
Dim PRODUCT_SIZE
Dim PRODUCT_DEPT
Dim PRODUCT_SECT
Dim PRODUCT_LINE
Dim PRODUCT_BRAND
Dim PRODUCT_VAT
Dim PRODUCT_UNIT
Dim PRODUCT_TEXT
Dim PRODUCT_BARCODE
Dim PRODUCT_BINNO
Dim PRODUCT_SUPCODE
Dim PRODUCT_SUPACCREF
Dim PRODUCT_SUPP
Dim PRODUCT_SPRICE
PRODUCT_CODE = Request.Form("TXTCODE")
response.write("2") <- this is not being written
RESULT = "SELECT * FROM ProductListing WHERE ProductCode = '" & PRODUCT_CODE & "'; "
rs.open RESULT, conn
PRODUCT_DESC = rs("Description")
PRODUCT_ATTR = rs("Attirbute")
PRODUCT_SIZE = rs("Size")
PRODUCT_DEPT = rs("Department")
PRODUCT_SECT = rs("Section")
PRODUCT_LINE = rs("ProductLine")
PRODUCT_BRAND = rs("Brand")
PRODUCT_VAT = rs("VAT")
PRODUCT_UNIT = rs("UnitofSale")
PRODUCT_TEXT = rs("Text")
PRODUCT_BARCODE = rs("BarCode")
PRODUCT_BINNO = rs("BinNo")
PRODUCT_SUPCODE = rs("SupplierCode")
PRODUCT_SUPACCREF = rs("SupplierAccountRef")
PRODUCT_SUPP = rs("Supplier")
PRODUCT_SPRICE = rs("SalesPrice")
rs.close
conn.close
%>
</HEAD>
<BODY>
<BR>
<BR>
<FORM>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTCODE>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTDESC VALUE=<% response.write("PRODUCT_DESC") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTATTR VALUE=<% response.write("PRODUCT_ATTR") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTSIZE VALUE=<% response.write("PRODUCT_SIZE") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTDEPT VALUE=<% response.write("PRODUCT_DEPT") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTSECT VALUE=<% response.write("PRODUCT_SECT") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTLINE VALUE=<% response.write("PRODUCT_LINE") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTBRAND VALUE=<% response.write("PRODUCT_BRAND") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTVAT VALUE=<% response.write("PRODUCT_VAT") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTUNIT VALUE=<% response.write("PRODUCT_UNIT") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTTEXT VALUE=<% response.write("PRODUCT_TEXT") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTBARCODE VALUE=<% response.write("PRODUCT_BARCODE") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTBINNO VALUE=<% response.write("PRODUCT_BINNO") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTSUPPCODE VALUE=<% response.write("PRODUCT_SUPPCODE") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTSUPPACCREF VALUE=<% response.write("PRODUCT_SUPPACCREF") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTSUPP VALUE=<% response.write("PRODUCT_SUPP") %>>
<INPUT TYPE=TEXT SIZE=20 NAME=TXTSPRICE VALUE= <% response.write(PRODUCT_SPRICE) %> > <-quotes taken out to see if it helped, didnt make a difference at all
<INPUT TYPE=SUBMIT NAME=BTNSUBMIT VALUE="SUBMIT">
</FORM>
Any help much appreciated as always