Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / May 2007



Tip: Looking for answers? Try searching our database.

Displaying images

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
d9839742 - 02 May 2007 12:22 GMT
Here is my problem I am qute new to asp, I have an access database with a
text field pointing to the URL of the images I want to display.

The asp I'm using to try and display the images is below:
<%

Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Provider = "Microsoft.Jet.OLEDB.4.0;"

Conn.Open = "Data Source=" & Server.MapPath ("images.mdb")

Set Rs = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT * FROM Flags"
Response.Write rsRecordset("Image")

Set Rs = nothing
Set Conn = nothing

%>
I keep getting an error with this line Response.Write rsRecordset("Image")
Can any one help me please
Bob Barrows [MVP] - 02 May 2007 12:40 GMT
> Here is my problem I am qute new to asp, I have an access database
> with a text field pointing to the URL of the images I want to display.
[quoted text clipped - 19 lines]
> I keep getting an error with this line Response.Write
> rsRecordset("Image") Can any one help me please

You opened "Rs", but then tried to read "rsRecordset"

Further: congratulations on using the native Jet OLE DB provider rather than
ODBC. However, you should avoid selstar:
http://www.aspfaq.com/show.asp?id=2096

Signature

Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Bob Barrows [MVP] - 02 May 2007 12:44 GMT
> Here is my problem I am qute new to asp, I have an access database
> with a text field pointing to the URL of the images I want to display.
[quoted text clipped - 19 lines]
> I keep getting an error with this line Response.Write
> rsRecordset("Image") Can any one help me please

PS. This case was easy to figure out. In the future however, you should help
us help you by telling us exactly what error you are getting, avoiding
phrases like "getting an error", "not working", etc.
Signature

Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.