Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image as a data type

Status
Not open for further replies.

kafka

Programmer
Oct 17, 2000
27
US
I would like to use a .gif. or .bmp as a data type for my database. Essentially on my site, a user would selecting a path for a .gif or .bmp file from their own directory. How do I set up my field to accept that image as a record for that field.

I have never done this so I am a bit hazy on how to proceed, so a thorough explnation would be greatly appreciated. [sig][/sig]
 
Hi Kafka,

IMO, you might be better served to save the image into a directory on your server, and store the path of the image in your database, instead of the actual image.

If you insist that the object be stored in your database, take a peek at the APPEND GENERAL command and GENERAL field type in the VFP Help file. [sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>The World Is Headed For Mutiny.....When All We Want Is Unity. - Creed[/sig]
 
Kafka

I fully support John in saying that you should save the image files in their native graphics format

One deficiency of a general field is that there is no COPY GENERAL TO command, so you cannot copy the general field to a file and edit it with an external graphics editor of your choice.

You need to check how you use the path\filename.

One way is :-

lcFileName = SYS(5)+SYS(2003)+[\]+TABLE.filename

where TABLE.filename = [graphics\image1.gif]

or if the graphics files will always be in the same folder,

lcFileName = SYS(5)+SYS(2003)+[\graphics\]+TABLE.filename

where TABLE.filename = [image1.gif]

You might need to change SYS(5) and/or SYS(2003) depending where the users might be located.

Chris
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top