Anyone know SQL/ASP?

Robb G

Baron
I am having the damnedest time trying to get the simplest thing to work on an ASP site I am coding.

The page is connecting to a SQL db via DSN, and that is working fine. I tested the Select string in the query analiser, and that works... but response.write won't list the data.

The data is definitely there because i can see it in SQL management studio.

Code:
<%
    Connect = "DSN=****;UID=****;PWD=****"
    Set rs1 = Server.CreateObject("adodb.recordset")
 
    listall = "select * from clientdata where uid like 2"
    rs1.Open listall, Connect, 2, 3
 
%>
 
<%= rs1.Fields("add1") %>

clientdata is the name of the table.
add1 is a name of a field in the table.
I blanked out the DSN info but it is connecting fine.

and asp works fine because
Code:
<%= "hello world" %>
works fine

thoughts?
 
Update:

on a whim i decided to change the connection string to try the same code using an access database. it works fine. so this has to be something with sql or my inability to code for it correctly.

it's got to be something in the way i am trying to call the data though since it works in access and not in sql. at least i am assuming since it is not throwing errors at me about failing to conenct.

and yeah, i have no problem just posting this stuff talking to myself.. soemtimes it just helps to talk out the problem.
 
yay figured it out. was an issue with the sql 2005 server. runs fine on my 2000 server. fixed the issue, my code works. back to talking to myself now..
 
yeah i would have loved to help but....you said nothing that i really understand...i'm sorry..i just barely held an ipod for the first time last week....i'm not anti tekkie i just...don't know how to use them heheh
 
You know, sometimes I am still in awe of how smart some of our folks are. And we have some people with pretty neato jobs too.
 
yeah we have uber scientists working for us!
 
Back
Top