Link to home
Start Free TrialLog in
Avatar of ailin_dinsin
ailin_dinsin

asked on

Page cannot be displayed when there is a record

Hi,

I have problem to retrieve the data when using the following SQL statement. I cannot figure out which part went wrong.

select distinct(b.USR_ACCT_NO) from docsadm.profile b where (b.USR_ACCT_NO is not NULL and b.USR_ACCT_NO<>'') and b.USR_CUST_STATUS='C' and b.USR_ACCT_NO not in (select a.accountcode from USR_EDMS_DOC_SCAN_STATUS a where a.accountcode=b.USR_ACCT_NO and a.status = 'C' and a.updateStatus = '0') and convert(varchar(10),b.CREATION_DATE,120)=(select convert(varchar(10),getDate(),120))

This statement been used in asp code. Please help.
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

does actually the SQL fail, or the code that displays the results?
as angelIII said you need to tell us if the SQL Query fails to retrieve data and if so what error it gives. If not then it must certainly throw certain error to get troubleshooting started...
Avatar of ailin_dinsin
ailin_dinsin

ASKER

I placed my asp code in inetpub\wwwroot\<myfolder>. So, i test this code by run this URL http://<myServerName>/<myFolder>/aspCode. When there is no record then i won't see this "page cannot be displayed" problem. Else, i will see that problem. Under "The page cannot be displayed" heading, it read "There is a problem with the page you are trying to reach and it cannot be displayed". I supposed to get a record from database A and update a table in database B.  
Ok do one small favor....

If you are using INTERNET EXPLORER Then GOTO TOOLS(In top Menus) then go to INTERNET OPTIONS then ADVANCED(Tab) and then uncheck SHOW FRIENDSLY HTTP ERROR MESSAGES.

Now refresh the page and tell us the error.
so, you have an error somewhere in your code, which eventually ignores an error that could happen in some lines of the code.
do you know about ON ERROR RESUME NEXT in asp/vbscript? and displaying any error checking err.number and err.description?
also, call your code on the server for testing with localhost/myfolder/aspcode.asp
Also add this following line of code once you have done execution of the code using your recordset object

<%
If objRS.EOF Then

response.write "NO RECORD FOUND"

Else

response.write objRs(0)

End If

%>
After applied solution ID: 19590202, below is the message returned:


Microsoft OLEDB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/MyFolder/include/usr_integration.inc, line 132
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial