Hi all
Just experimenting with person web servers and I am having trouble with "Instant Asp" and Xitami.
I try to run simple adocon connections but I get errors like
Vbscript Runtime error 'ASP 0185 : 3219'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/adotest.asp,line 26
Code:
<% if Request("X") = "" then %>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=adotest.asp?X=1">
<%
Response.write(" <BR>")
Response.write(" <BR>")
Response.write(" <BR>")
Response.write(" <BR>")
Response.write(" <BR>")
Response.write(" <BR>")
Response.write("<CENTER><H3> Loading ADO Properties, please wait....... </H3></CENTER><BR>")
%>
<%Else%>
<% Response.Buffer = True %>
<HTML>
<HEAD><TITLE>ADO Test</TITLE></HEAD>
<BODY BGCOLOR=#FFFFFF>
<H1>ADO Test</H1>
<%
Set C = Server.CreateObject("ADODB.Connection")
'response.write Session("DBConn_ConnectionString")
'C.Open Session("DBConn_ConnectionString")
c.open "DSN=BIBLIO;UID=;PWD=;"
%>
<LI><FONT SIZE=4>Connection Properties</FONT>
<TABLE BORDER=1>
<% For Item = 0 To C.Properties.Count - 1 %>
<TR>
<TD><FONT SIZE=2>
<%= C.Properties(Item).Name %></FONT></TD>
<TD><B><FONT SIZE=2>
<%
' Print something so that the table border gets displayed
If IsEmpty(C.Properties(Item)) Then
Response.Write " "
' Determine if the property is a Boolean
End If
If VarType(C.Properties(Item)) = 11 Then
Response.Write CStr(CBool(C.Properties(Item)))
Else
Response.Write C.Properties(Item)
End If
%>
</FONT></B></TD>
</TR>
<% Next %>
</TABLE>
<P>
<LI><FONT SIZE=4>Resultset Properties</FONT>
<BR>
<% Set RS = C.Execute("SELECT * FROM publishers") %>
<TABLE BORDER=1>
<% For Item = 0 To RS.Properties.Count - 1 %>
<TR>
<TD><FONT SIZE=2><%=RS.Properties(Item).Name%></FONT></TD>
<TD><B><FONT SIZE=2>
<%
' Determine if the property is a Boolean
If VarType(RS.Properties(Item)) = 11 Then
Response.Write CStr(CBool(RS.Properties(Item)))
Else
Response.Write RS.Properties(Item)
End If
%>
</FONT></B></TD>
</TR>
<% Next %>
</TABLE>
<% RS.Close %>
<% C.Close %>
<BR>
<BR>
<% End If %>
</BODY>
</HTML>
This code is used to test the ado command. If I cant get this to work I dont no what I'll do!!
Thanks,
Devin
__________________
"Computer games don't affect kids. I mean, if Pacman affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music..."
|