473,324 Members | 2,581 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,324 software developers and data experts.

photo in vb

82
hi all,
i have stored photo's path in my sql2000 and now in vb i have created a picture box. i want to retrieve the photo in this.
here is my sample code.
(assuming at present my database contains only one record)
dim con as new adodb.connection
dim rs as new adodb.recordset
con.connectionstring= "-----"
rs.open "select * from foto",con,2,3
command_click()
picture1= loadpicture('rs(0)')

the error says cannot find file "C:\....." whatever path i gave in my db.
cd u ppl help me solve this.
Dec 11 '06 #1
5 1239
Killer42
8,435 Expert 8TB
hi all,
i have stored photo's path in my sql2000 and now in vb i have created a picture box. i want to retrieve the photo in this.
here is my sample code.
(assuming at present my database contains only one record)
dim con as new adodb.connection
dim rs as new adodb.recordset
con.connectionstring= "-----"
rs.open "select * from foto",con,2,3
command_click()
picture1= loadpicture('rs(0)')

the error says cannot find file "C:\....." whatever path i gave in my db.
cd u ppl help me solve this.
This might sound silly, but have you checked that the path is correct? The error sounds fairly straightforward.

Another possibility, I suppose, is that it's not a supported image type for the picturebox.
Dec 11 '06 #2
sashi
1,754 Expert 1GB
hi all,
i have stored photo's path in my sql2000 and now in vb i have created a picture box. i want to retrieve the photo in this.
here is my sample code.
(assuming at present my database contains only one record)
dim con as new adodb.connection
dim rs as new adodb.recordset
con.connectionstring= "-----"
rs.open "select * from foto",con,2,3
command_click()
picture1= loadpicture('rs(0)')

the error says cannot find file "C:\....." whatever path i gave in my db.
cd u ppl help me solve this.
Hi there,

What's the format of those pictures? Make sure you are pointing at the correct physical path to be able to view pictures with the LoadPicture function, hope it helps. Good luck & Take care.
Dec 12 '06 #3
aaryan
82
Hi there,

What's the format of those pictures? Make sure you are pointing at the correct physical path to be able to view pictures with the LoadPicture function, hope it helps. Good luck & Take care.
hi all,
the image is in jpeg format. so there should be no doubt whether the picture box supports it or not. i checked the path too. it was correct. by the way is my syntax in making the picture display is correct, namely ....loadpicture('rs(0))?
Dec 14 '06 #4
Killer42
8,435 Expert 8TB
the image is in jpeg format. so there should be no doubt whether the picture box supports it or not. i checked the path too. it was correct. by the way is my syntax in making the picture display is correct, namely ....loadpicture('rs(0))?
Ah! Good point. The syntax is wrong. You are trying to load a picture called "rs(0)", which most likely doesn't exist. Try losing the quotes.
Dec 14 '06 #5
sashi
1,754 Expert 1GB
Ah! Good point. The syntax is wrong. You are trying to load a picture called "rs(0)", which most likely doesn't exist. Try losing the quotes.
Hi Killer,

I hope the case is solved as of this thread :) Take care buddy.
Dec 15 '06 #6

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

Similar topics

1
by: Nick | last post by:
I am building a photo album webpage and am not sure exactly how I should organize the database. Here's where Im at so far... I have one table called 'images' which contains the columns 'albumID',...
5
by: Philip D Heady | last post by:
Ok, here's my code. Can't get it to check file extension properly or file size...had it working before but not sure why it's buggy now. } elseif ($photo) { $ext = strtolower(substr($photo,...
2
by: Eric McDaniel | last post by:
I am trying to read in a bunch of images and manipulate them using Image::Magick, then display them using Tk::Photo. I would like to do this without creating a temp file for each image, since there...
2
by: Tony WONG | last post by:
i am not sure that this subject can be discussed here. i have many photos. they are stored according to the name of the EVENT and YEAR. i will set up a database (sql or access) to store...
1
by: Bill Strass | last post by:
I have a form showing the records of different people. I would like a photo to be displayed in the form, with each person's record. My digital photo > *.jpg type file and I change each photo...
13
by: Viken Karaguesian | last post by:
Hello everyone, Can anyone recommend a good online site to learn PHP? The W3Schools website is quite lacking - leaves much to be desired. I'm sure there are many places, but which ones are good?...
1
by: Neil | last post by:
I am using ShellExecute to open JPG files with the associated application, MS Photo Editor, from within an Access 2000 application. When the code is run the first time (Photo Editor closed),...
1
by: Throw | last post by:
G'day everyone I'm looking for a simple photo gallery script in PHP (or Perl), but not too simple. I have tried several photo gallery scripts in either language and I have found that they are...
3
by: boyet59 | last post by:
VerosMedia.com offers professional, digital retouching and photo restoration services. ** Restoration of treasured, family photographs. ** Portrait and model portfolio retouching. ** Photo...
1
by: cumupkid | last post by:
II am trying to create a form that will allow me to upload photos to a folder in the site root directory and add the information to the mysql db at the same time. I have created two forms, one...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.