M
masg0013
I have a few vbscripts that I want to convert to asp pages so I can
use html to format the data better.
1). Do asp pages have to be run from an IIS server or can I just
create them locally and then open them in IE?
2) The following connection strings, accounts and queries work fine in
vbs files but I am getting 0 results when I run them as asp. I don't
know how to debug them to figure out the issue
here is the code
<%@ language="VBSCRIPT" %>
<html>
<head>
<meta name="GENERATOR" content="SAPIEN Technologies PrimalScript 4.0">
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>CFG site</title>
</head>
<body>
<%
Dim objConnection, dsn
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=SQLOLEDB;Data Source=servername;" & _
"Trusted_Connection=Yes;Initial Catalog=edfcm4;" & _
"User ID=user;Password=password;"
Set rs=objConnection.Execute ("SELECT machine_name FROM
ecm_dat_machines")
%>
<table border="1">
<%
Do While Not rs.EOF
%>
<tr>
<td><%= rs.Fields("ecm_dat_machines.machine_name")%></td>
</tr>
<%
rs.MoveNext
Loop
%>
</table>
<%
Set objConnection = Nothing
%>
</body>
</html>
use html to format the data better.
1). Do asp pages have to be run from an IIS server or can I just
create them locally and then open them in IE?
2) The following connection strings, accounts and queries work fine in
vbs files but I am getting 0 results when I run them as asp. I don't
know how to debug them to figure out the issue
here is the code
<%@ language="VBSCRIPT" %>
<html>
<head>
<meta name="GENERATOR" content="SAPIEN Technologies PrimalScript 4.0">
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>CFG site</title>
</head>
<body>
<%
Dim objConnection, dsn
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=SQLOLEDB;Data Source=servername;" & _
"Trusted_Connection=Yes;Initial Catalog=edfcm4;" & _
"User ID=user;Password=password;"
Set rs=objConnection.Execute ("SELECT machine_name FROM
ecm_dat_machines")
%>
<table border="1">
<%
Do While Not rs.EOF
%>
<tr>
<td><%= rs.Fields("ecm_dat_machines.machine_name")%></td>
</tr>
<%
rs.MoveNext
Loop
%>
</table>
<%
Set objConnection = Nothing
%>
</body>
</html>