Source language: Translate to:

input pictures that are stored on other folders

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

input pictures that are stored on other folders

Postby WinMacLyn » Wed Mar 18, 2009 6:38 am

Hi everybody,

I am making an application that stores pictures in an access database. When I enter a picture for example from “My Documents” folder everything works ok and the address of the picture pointing “My Documents” folder is recorded and saved in the database. But when I input pictures that are stored on other folders and other sub folders the address of that picture is not saved in the database. Why is this?
User avatar
WinMacLyn
 
Posts: 110
Joined: Wed Jan 17, 2007 7:30 pm

Postby Neosoft Support » Wed Mar 18, 2009 9:58 am

I can't think of any reason why it would matter where the image files are stored. I would really need to know more about how your database is structured and how you're adding the images. Are you using a picture field? How are you importing the images?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby WinMacLyn » Wed Mar 18, 2009 2:51 pm

Hi Neosoft Support,

I am using a “Picture Object” and on the “Image File” input box I am placing this:
[PhotoBook.Album.Photo2].

If I put all the pictures on “My Documents” folder everything it is ok, but when I try to import pictures from other part of the hard drive the picture/s doesn’t save on the column “Photo2” in the database.
I am using the FileOpenBox command to imput the image file.
With the following code on a Push Button Object actions:
FileOpenBox "[mp_SelectImage]" "[mp_PictureFolder]|*.bmp;*.gif;*.jpg;*.tif;*.png;*.pcx;*.ico" "" "[PhotoName]" ""
If "[FhotoName]" "<>" ""
SetVar "[PhotoBook.Album.Photo2]" "[PhotoName]"
EndIf

I tested it on a Vista home premium OS pc and on a XP OS pc.
User avatar
WinMacLyn
 
Posts: 110
Joined: Wed Jan 17, 2007 7:30 pm

Postby Gaev » Wed Mar 18, 2009 4:21 pm

WinMacLyn:

a) Do you use the same method/script when selecting files from your [MyDocuments] folder ? ... if so, what is the real drive/path of this folder ... if not, please post the other method/script.

b) Try and place an exclamation mark in this command ...
Code: Select all
SetVar "[PhotoBook.Album.Photo2]" "![PhotoName]"
User avatar
Gaev
 
Posts: 3733
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Neosoft Support » Wed Mar 18, 2009 4:21 pm

I don't know if this is the source of your problem or not, but there is a small typo in your code. In the second line you have the following:

If "[FhotoName]" "<>" ""

when it should be:

If "[PhotoName]" "<>" ""

If that's not the problem, please send me a copy of your publication and I'll try running it here.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby WinMacLyn » Wed Mar 18, 2009 6:57 pm

Thank you Gaev and Neosoft Support,

I tried the exclamation mark as Gaev suggest and nothing!
And yes Neosoft Support that is a misspelled typo when I was writing the explanation here in the forum.
The code is working ok but only from My Documents folder.

I want to comment that the database is saving ok the address of the picture (from anywhere in the hard drive) but can not show the picture.

Probably I need to update the NeoBookDBPro version 1.1 to version 1.2
If I own version 1.1 do I need to buy version 1.2?
User avatar
WinMacLyn
 
Posts: 110
Joined: Wed Jan 17, 2007 7:30 pm

Postby Gaev » Thu Mar 19, 2009 5:21 am

WinMacLyn:

a) Try placing an exclamation mark here as well ...
Code: Select all
If "![PhotoName]" "<>" ""

b) Perhaps you need to check if the image files in the other folders are actually readable by the program ... perhaps you can setup a Picture Object (say SelectedPhoto) ... and just after the ...
Code: Select all
SetVar "[PhotoBook.Album.Photo2]" "![PhotoName]"
... insert ...
Code: Select all
SetObjectFileName "SelectedPhoto" "![PhotoBook.Album.Photo2]"
AlertBox "hi" "![PhotoBook.Album.Photo2]"
So you can visually verify that the program is able to read/display the selected image file.

c) Finally, you might describe how you are determining that "the address of that picture is not saved in the database" ... perhaps it is being stored but you are not able to retrieve it correctly.
User avatar
Gaev
 
Posts: 3733
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby WinMacLyn » Thu Mar 19, 2009 7:25 am

Thank you Gaev for your suggestions,

Ok now I see what is happening. The complete address of the picture is not saved in the database column. If it is a long address then it will not appear just because the database doesn’t save the complete address. How can I make the column to handle any address regardless how long is?
User avatar
WinMacLyn
 
Posts: 110
Joined: Wed Jan 17, 2007 7:30 pm

Postby Gaev » Thu Mar 19, 2009 8:00 am

WinMacLyn:
The complete address of the picture is not saved in the database column. If it is a long address then it will not appear just because the database doesn’t save the complete address. How can I make the column to handle any address regardless how long is?
Perhaps you can start by explaining what you observe with some examples of ...

- full name of selected file (e.g. c:\path\subPath\file.ext)
- what is stored in the column
User avatar
Gaev
 
Posts: 3733
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Neosoft Support » Thu Mar 19, 2009 10:29 am

Probably I need to update the NeoBookDBPro version 1.1 to version 1.2
If I own version 1.1 do I need to buy version 1.2?


No, you can download the update for free.

http://www.neosoftware.com/neobook/modules/plugins/singlefile.php?cid=2&lid=75
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby WinMacLyn » Thu Mar 19, 2009 1:05 pm

Gaev this is what I mean,

This is what is stored in the column:
C:\2\bin\images2\Imagenes Web Browser\customized_w

The correct and full address is:
C:\2\bin\images2\Imagenes Web Browser\customized_web_browser.png

You can see that the address stored is not complete.
Some addresses that are shorter are displaying ok
User avatar
WinMacLyn
 
Posts: 110
Joined: Wed Jan 17, 2007 7:30 pm

Postby Wrangler » Thu Mar 19, 2009 1:08 pm

What type of field is this information stored in? If it's a string field, just adjust the field length so it doesn't truncate the string.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Gaev » Thu Mar 19, 2009 1:41 pm

WynMacLyn;

Looks like the current field (Photo2) is defined to have a maximum of about 50 characters ... you could increase it to 255.

OR

Store the (full) file name in a MEMO type field ... it can accomodate upto 64,000 characters.
User avatar
Gaev
 
Posts: 3733
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby WinMacLyn » Thu Mar 19, 2009 3:49 pm

Thank you Gaev, Wrangler and Neosoft Support,
Now it is working ok
User avatar
WinMacLyn
 
Posts: 110
Joined: Wed Jan 17, 2007 7:30 pm


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest