473,385 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Display Image in array from the folder

Hi Guys,

I am trying to display an image from the folder which correspond to my database record.

Here's the code:

Expand|Select|Wrap|Line Numbers
  1. Dim i
  2. connection
  3.     rs.Open "select * from tbl_user", con, 3, 3
  4.  
  5.  
  6.       For i = 0 To rs.RecordCount
  7.  
  8.          Image1(0).Picture = LoadPicture(App.Path + "\profile_pic\" & rs("img"))
  9.  
  10.         If i Then
  11.  
  12.             'New Image            
  13.             Load Image1(i)
  14.             Image1(i).Visible = True
  15.  
  16.         End If
  17.         'position start
  18.         Image1(i).Move (i Mod 13) * 1500, (i \ 13) * 2100
  19.  
  20.         Next i
  21. rs.Close: Set rs = Nothing
  22. con.Close: Set con = Nothing
  23.  
  24.  



I have only 3 records in the table but 4 image display instead of 3.
What should I do to display 3 images only by corresponding to recordCount with the column rs("img")?

Please help me guys!

Very much appreciated.

Thanks,

-kiad-
Mar 21 '14 #1
0 949

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Philipp Lenssen | last post by:
I created Search.CSS which grabs Google results (using the Web API), displays as XHTML1.0 Strict + CSS, and recently also adds Thumbnails....
0
by: Qindong Zhang | last post by:
My asp.net application send image to web browser. The browser begin to display image before download finished. (In Slow Network). How can I force brower to display image after the image downloaded? ...
1
by: Tan | last post by:
Hi I am desperate for any help with display image in Gridview I have a gridview contain surname , forename ..... and image. I could not display image as my database store the column image as...
2
by: David | last post by:
I am trying to get an image to appear on all Mondays within the calendar control. I also want that image to be a link. How can I do this?
3
by: den 2005 | last post by:
Hi everyone, Here is code working on..Trying to insert record with a column with Image or VarBinary datatype in sql database from a existing jpeg image file, then retrieve this image from...
3
by: Ladislav Andel | last post by:
Hi, I'm trying to display image through my cgi script in HTML page via <img src="image.cgi"> Can you give me an example, please? What should be in the cgi script to display it? Here is what...
7
by: alexseow | last post by:
Query.asp <%@ LANGUAGE="VBSCRIPT" %> <!-- #include file="../../includes/dbconn.asp"--> <% dim MyRs, sqlstr, MyConn Response.Expires = 0 Response.Buffer = TRUE Response.Clear
0
by: dbdb | last post by:
hi, i work with ms. access 2003 i want to display image from a folder to the report. i have read thread in http://bytes.com/topic/access/answers/191611-pictures-access-reports but that's...
1
by: zak200 | last post by:
Hi, I am trying to display image , but its not working. #!C:/Perl64/bin/perl.exe print "Content-type: image/gif\n\n"; print <<EOF; <HTML> <HEAD> <TITLE> Coding Page </TITLE> </Head>
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.