Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing An Image In A SQL Table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01234808
Message ID:
01234848
Vues:
21
It is an Image, in SQL

>What is the type of ImageFile field? I suspect it is General, isn't it?
>
>
>>Still getting 'Data Type Mismatch'
>>
>>
>>
>>>>Ok, I'm getting a 'Data Type Mismatch' on the APPEND MEMO line
>>>>
>>>>OPEN DATABASE ImageLoad
>>>>
>>>>IF USED("v_ImageTest")
>>>>	USE IN v_ImageTest
>>>>ENDIF
>>>>
>>>>SELECT 0
>>>>USE v_ImageTest
>>>>
>>>>nImageTestKey = 1
>>>>cImageName = SYS(2015)
>>>>cImageFile = "d:\graphics\test_image.bmp"
>>>>
>>>>INSERT INTO v_ImageTest;
>>>>	(ImageTestKey, ImageName);
>>>>	VALUES;
>>>>	(nImageTestKey, cImageName)
>>>>
>>>>APPEND MEMO ImageFile FROM &cImageFile OVERWRITE
>>>>
>>>>RETURN
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Create SQL-table with Image field. Create VFP remote view (updatable) to this table. Add image to the view (use APPEND MEMO command) and you made it.
>>>>>
>>>>>>Ok, I looked at Rick's article, and I'm thoroughly lost.
>>>>>>
>>>>>>Is there a SIMPLE way to store an image to a SQL table and then
>>>>>>retrieve it back to an image on the file system?
>>>>>>
>>>>>>An example would be great.
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>How to I store an image in a SQL table?
>>>>>>>
>>>>>>>Use the image data type.
>>>>>>>Here is an artice from Code Project to get you started:
>>>>>>>http://www.codeproject.com/aspnet/PicManager.asp
>>>>>>>Ooops I just noticed that this is the VFP forum (better get my flame suit on)
>>>>>>>
>>>>>>>Here is a VFP artice by non other than Rick Strahl:
>>>>>>>http://west-wind.com/WebLog/posts/6861.aspx
>>>>>>>
>>>>>>>Einar
>>>
>>>
>>>Change
>>>
>>>APPEND MEMO ImageFile FROM &cImageFile OVERWRITE
>>>to
>>>REPLACE ImageFile WITH FILETOSTR(cImageFile)
>>>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform