Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert VFP Memo field to SQL Server Image Field
Message
 
To
12/07/2006 15:03:02
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01135374
Message ID:
01135835
Views:
10
>I have tried all of these suggestions and none seem to work. I was thinking when I use the VFP XMLTOCURSOR() function do I have to run it with specific parameters so that it reads the picture field properly ?
>
>Thanks Again !

Stephen,
What version of VFP you use?
It is at least VFP8 but did you use VFP9?
If you use VFP9 try this:
oForm = CREATEOBJECT([form1])
oForm.Show()
READ EVENTS

**************************************************
*-- Form:            form1 (d:\all_zapl\test.scx)
*-- ParentClass:     form
*-- BaseClass:       form
*-- Time Stamp:      07/12/06 10:16:13 PM
*
DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT image1 AS image WITH ;
		Height = 154, ;
		Left = 34, ;
		Top = 35, ;
		Width = 185, ;
		Name = "Image1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 53, ;
		Left = 233, ;
		Height = 75, ;
		Width = 84, ;
		WordWrap = .T., ;
		Caption = "Show Picture from memo Field", ;
		Name = "Command1"


	PROCEDURE Load
                ** Create Cursor where we will store Picture File
                ** Field is Memo
		CREATE CURSOR CrsTest (MyMemo M)
	ENDPROC



	PROCEDURE command1.Click
              ** Store picture in memo Field
               IF RECCOUNT([CrsTest]) = 0
                  lcPicture = GETPICT()
                  IF NOT EMPTY(lcPicture)
                     INSERT INTO crstest VALUES (FILETOSTR(lcPicture))
                  ELSE
                     RETURN
                  ENDIF
               ENDIF
               thisform.Image1.PictureVal = crstest.MyMemo
	ENDPROC

        PROCEDURE Destroy
             CLEAR EVENTS
        ENDIF
ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform