sql server 2008 - Half of Classic ASP page works great, 2nd half gives SQL connection error -


please help!

i moving classic asp & asp.net website 1 server another, , 1 of reports works fine on old server partially working on new server.

can please tell me:

  • if there might preventing successful connection sql server.

  • if there else involved in than:

    • connection string
    • asp page
    • dll

my server environment:

  • windows server 2008 r2

  • sql express 2008

  • iis7

connection details:

the classic asp pages of website connect using sql connection string located in registry. other classic asp pages on website working fine....and first half of report working fine.

i have tested connection string individually, , connects properly.

report structure details:

the first half of report (that working correctly) loads data directly table in database display each item in list format. uses employees table populate employee name each item in list.

the second half of report (that not working) loads data same table first half. however, groups them manager (manager details stored in employees table).

so, both half of reports accessing same tables information....the difference how displayed.

error details

microsoft ole db provider sql server->dll.shape_db.shapecmdwithrs(shape {select * employees username in (select mgr_username employees empid in (select empid time_off_requests mgr_code=0)) order last_name, first_name} append ([select time_off_requests_view.*, employees.mgr_username username time_off_requests_view inner join employees on employees.empid = time_off_requests_view.empid mgr_code=0} relate username username) timeoff, ...)@websitename[version 4.0.480] error '80004005'

[dbnetlib][connectionopen (connect()).]sql server not exist or access denied.

code details

here classic asp code part of website does work:

set time_off_requests = dll.timeoffadminpending() %> <center>  <% if time_off_requests.eof %> <font class="headernobold">no pending time off requests<br>  <%  else %>  <font class="headernobold">pending time off requests</font> <table cellspacing="0" cellpadding="3" width="500" align=center border=0 bordercolorlight=#000000 bordercolordark=#000000> <tr bgcolor=#ffffcc>     <td width=33% align=center><b>date</b></td>     <td width=33% align=center><nobr><b>requested by</b></nobr></td>     <td width=33% align=center><nobr><b>type</b></nobr></td> </tr> <%  dim thedate while not time_off_requests.eof  if (time_off_requests.absoluteposition mod 2) = 0 %>             <tr bgcolor=#ffffcc>         <% else %>             <tr bgcolor=#ffffff>         <% end if %>         <td class="smalltext" align=center>             <a href="time_off_request_details.asp?timeoffreq_id=<% = time_off_requests("timeoffreq_id") %>">             <% = time_off_requests("dt_created") %>             </a>         </td>         <td class="smalltext" align=center><% = time_off_requests("last_name") %>,&nbsp;<% = time_off_requests("first_name") %></td>         <td class="smalltext" align=center><% = time_off_requests("time_off_type") %></td> </tr> <%           time_off_requests.movenext     loop %> </table> <%  end if %> 

details dll

function timeoffadminpending() adodb.recordset  timeoffadminpending = runcmdwithrs("select * time_off_request_view mgr_code =0 , empid in (select empid employees mgr_username = '" & username & "')")  end function 

here classic asp code part does not work:

<%  set managers = dll.pendingtimeoffmgr() if not managers.eof %> <font class="headernobold">pending manager time off approvals</font> <table cellspacing="0" cellpadding="3" width="500" align=center border=0 bordercolorlight=#000000 bordercolordark=#000000> <tr bgcolor=#ffffcc>     <td width=33% align=center><b>date</b></td>     <td width=33% align=center><nobr><b>requested by</b></nobr></td>     <td width=33% align=center><nobr><b>type</b></nobr></td> </tr> <%  while not managers.eof     set time_requests = managers.fields("timeoff").value %> <tr><td colspan=3>         <% = managers("last_name") %>, <% = managers("first_name") %> </td><tr> <%  while not timeoff_requests.eof  if (timeoff_requests.absoluteposition mod 2) = 0 %>             <tr bgcolor=#ffffcc>         <% else %>             <tr bgcolor=#ffffff>         <% end if %>         <td class="smalltext" align=center>             <% = timeoff_requests("dt_created") %>         </td>         <td class="smalltext" align=center><% = timeoff_requests("last_name") %>,&nbsp;<% = timeoff_requests("first_name") %></td>         <td class="smalltext" align=center><% = timeoff_requests("timeoff_type") %></td> </tr> <%     timeoff_requests.movenext     loop     managers.movenext     loop %> </table> <%  end if %> 

details dll

pendingtimeoffmgr() adodb.recordset  pendingtimeoffmgr = shapecmdwithrs("shape {select * employees username in (select mgr_username employees empid in (select empid time_off_requests mgr_code = 0)) order last_name, first_name} append ({select time_off_requests_view.*, employees.mgr_username username time_off_requests_view inner join employees on employees.empid=time_off_requests_view.empid mgr_code = 0} relate username username) timeoff")  end function 


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -