• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

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.
0
ailin_dinsin
Asked:
ailin_dinsin
  • 4
  • 3
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
does actually the SQL fail, or the code that displays the results?
0
 
bugs021997Commented:
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...
0
 
ailin_dinsinAuthor Commented:
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.  
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
bugs021997Commented:
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.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
also, call your code on the server for testing with localhost/myfolder/aspcode.asp
0
 
bugs021997Commented:
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

%>
0
 
ailin_dinsinAuthor Commented:
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
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
that error message means that your connection string specifies a DSN name that is not present on the web server.
please check/fix that.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now