I am trying to retrieve records from SQL server 200 and everytime that I run the page I get the error
Microsoft OLE DB Provider for SQL Server (0x80040E31)
/demographicsReport/wfla_2004.asp, line 31
line 31 : set rs = conn.execute(sql)
when i run the query on qurey analyzer it gives me the records the problem occurs when I do it thru the ASP, any help, ideas?
thank you so much.
my code ion the page is:
'put the host name here
'put the start here
startDay = "2004-02-27"
endDay = "2004-12-31"
Dim oConn, oRS
set oConn = GetSubscriberConnection
set rs = oConn.execute("hm_newsubs_contest_rslts '" & host & "','" & startDay & "','" & endDay & "'")
Dim conn, sql, rs, colorset, i, numcolors
set conn = server.CreateObject ("ADODB.Connection")
conn.ConnectionTimeout = 0
conn.Open "Provider=SQLOLEDB;Data Source=192.168.5.14; Initial Catalog=myweather_replica; UID=sa; Password=myweather;"
SQL = "SELECT *, a.description as age, o.description as occupation, i.description as income, l.city as city, l.state as state, l.zip as zip FROM subscriber s " & _
"LEFT JOIN ages a on s.ageid = a.orderindex " & _
"LEFT JOIN location l on l.subscriberID = s.subscriberkey " & _
"LEFT JOIN occupations o on s.occupationid = o.id " & _
"LEFT JOIN incomelevels i on s.incomelevelID = i.id " & _
"WHERE host ='" & host &"' ORDER BY s.firstname"
set rs = conn.execute(sql)
if val = true then
elseif val = false then
nz = 2
nz = 0