Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 17th, 2005, 11:53 AM
Authorized User
 
Join Date: Jun 2005
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

O.K. Vijay,

You know what? You have been a really great help and guess what?
you got it right buddy, the problem was that the CHAR was only length = 1. So I changed its length to 15. And I am only passing one parameter UID. So it is working perfectly now ( I am calling THEFILE instead of PicName). Thanks for bearing with my ignorance. I am beginner on ASP and SQL but you have been a great help. This is the best forums I have ever been.

Great Job.
Thanks Again

 
Old June 17th, 2005, 12:18 PM
Authorized User
 
Join Date: Jun 2005
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello I was wondering if you can help to put a check on the procedure so that If there is no image then I can display a default image or not display any image at all because right now if there is no image at all I am getting an error

*****************************
ADODB.Field error '80020009'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/instantmessage2.asp, line 0
******************************************

I am using the procedure as follows

*******************

<%
Set ConnFM = Server.CreateObject("ADODB.connection")

        ConnFM.open "DSN=name; uid=user; pwd=password"
        FM = "Execute sproc_IMTest '" & UID & "'"
    Set ORsFM = ConnFM.Execute(FM)
%>

******************
I tried some methods but not that effective.
Thanks.

 
Old June 17th, 2005, 04:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

That is because, you havent check for EOF before trying to access it, so in case you get no image for any user, you end up with this error.
Code:
Set ORsFM = ConnFM.Execute(FM)
IF not ORsFM.eof then
    'try to display data
Else
    'No data resulted from the proc, which you can use to display default image or ignore
End IF
Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old June 22nd, 2005, 09:03 AM
Authorized User
 
Join Date: Jun 2005
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a lot Buddy.

Works like a charm now. I really appreciate your help.

 
Old July 6th, 2005, 05:09 AM
Registered User
 
Join Date: Jun 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanx to both of u...i learned a lot from u...





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to load image from sql database to datagrid huyfamily SQL Server ASP 1 April 14th, 2014 11:05 PM
Displaying Database Image into Crystal Reports krishnavaloor Crystal Reports 0 February 23rd, 2008 12:28 AM
Displaying an image from database table Essien Visual Basic 2005 Basics 1 January 4th, 2006 03:40 PM
Problems Displaying an image retrieved from SQL Se jazzcatone ASP.NET 1.x and 2.0 Application Design 2 September 3rd, 2005 09:53 AM
Problem displaying User Status from SQL palvin Classic ASP Databases 0 August 2nd, 2005 03:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.