Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new aspeer...having a problem here!

Status
Not open for further replies.

jhermiz2

Programmer
Dec 2, 2003
62
US
I tried this...

Code:
<html> 
<body> 
<%   
'---Dim the variables 
Dim Conn 
Dim rs 

Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;) 
Set rs = Server.CreateObject(&quot;ADODB.Recordset&quot;) 


Conn.Open &quot;Driver={SQL Server};&quot; & _ 
&quot;Server=HERCULES;&quot; & _ 
&quot;Database=SPI;&quot; & _ 
&quot;UID=myID;&quot; & _ 
&quot;PWD=myPass;&quot; 

Set rs = Conn.Execute(&quot;SELECT * FROM Logins&quot;) 

If(rs.eof) Then 
   Response.write(&quot;No Records Found&quot;) 
End If 

do until rs.eof 
   Response.write(rs(&quot;Name&quot;)) 
   rs.movenext 
loop 

rs.Close 
Conn.Close 

Set rs = nothing 
Set Conn = nothing 
%> HELLO 
</body> 
</HTML>

With my real ID and password and I get no records on the web page ... I tried calling this file &quot;test.html&quot;, and &quot;test.asp&quot;
both with no luck. The table is there, the records are there, but nothing comes up!!!
I got the IIS package installed locally, and our web server runs IIS ???


Thanks,
Jon
 
i EVEN TRIED THIS:
<html><head><title>Hello World</title></head></html>
<body>
Hello, <%=&quot;Donkey&quot; %>
</body></html>

Nothing...I see hello but thats it! I have IIS installed
Im on a win 2k machine...what else coudl be wrong?

please help,

Jon
 
Hi Jh,

Instead of Conn.Open try this...

<%
Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
Set rs = Server.CreateObject(&quot;ADODB.Recordset&quot;)
cnnstr = &quot;Driver={SQL Server};&quot; & _
&quot;Server=HERCULES;&quot; & _
&quot;Database=SPI;&quot; & _
&quot;UID=myID;&quot; & _
&quot;PWD=myPass;&quot;

Conn.Open cnnstr
sqlstr = &quot;Select * From Logins&quot;

rs.Open sqlstr, Conn, 1, 2

If(rs.eof) Then
Response.write(&quot;No Records Found&quot;)
End If

do until rs.eof
Response.write(rs(&quot;Name&quot;))
rs.movenext
loop

rs.Close
Conn.Close

Set rs = nothing
Set Conn = nothing
%> HELLO
</body>
</HTML>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top