Subject | Re: What BLOB to use for RTF data |
---|---|
Author | Namit Nathwani |
Post date | 2004-10-13T11:18:05Z |
Hi Dorin
Thanks for lending a helping hand again.
At 01:13 pm 13/10/2004, you wrote:
blob. The code for which are below:
Form.AfterSave()
LPARAMETERS tnRetVal
THISFORM.cRTFacv = v_tCA1.acv
wait window "prop " + iif(isnull(THISFORM.cRTFacv), "nul", "value") + " at
aftersave"
wait window "fld " + iif(isnull(v_tca1.acv), "nul", "value") + " at aftersave"
tnRetVal = DODEFAULT(tnRetVal)
RETURN tnRetVal
BizObj.AfterPointerMove()
LPARAMETERS tnFileStatus
THISFORM.cRTFacv = v_tCA1.acv
wait window "prop " + iif(isnull(THISFORM.cRTFacv), "nul", "value") + " at
afterpointermove"
wait window "fld " + iif(isnull(v_tca1.acv), "nul", "value") + " at
afterpointermove"
RETURN DODEFAULT(tnFileStatus)
RTFControl.LostFocus()
DODEFAULT()
wait window "prop " + iif(isnull(THISFORM.cRTFacv), "nul", "value") + " at
lostfocus"
wait window "fld " + iif(isnull(v_tca1.acv), "nul", "value") + " at lostfocus"
IF NOT THISFORM.cRTFacv == v_tCA1.acv
REPLACE v_tCA1.acv WITH THISFORM.cRTFacv IN v_tCA1
ENDIF
IF GETFLDSTATE("acv", "v_tCA1") = 2
THISFORM.ViewStatus(1)
ENDIF
What I have noticed if that the NULL is creating problems and esp. in the
code IF NOT THISFORM.cRTFacv == v_tCA1.acv the condition will never get
true with a null in place, so the replace will never occure, so I will ask
a question on the forum.
The following is the corrected stuff
Form.AfterSave()
LPARAMETERS tnRetVal
THISFORM.cRTFacv = IIF(ISNULL(v_tCA1.acv), "", v_tCA1.acv)
tnRetVal = DODEFAULT(tnRetVal)
RETURN tnRetVal
BizObj.AfterPointerMove()
LPARAMETERS tnFileStatus
THISFORM.cRTFacv = IIF(ISNULL(v_tCA1.acv), "", v_tCA1.acv)
RETURN DODEFAULT(tnFileStatus)
RTFControl.LostFocus()
DODEFAULT()
IF (NOT THISFORM.cRTFacv == v_tCA1.acv) OR ISNULL(v_tCA1.acv)
REPLACE v_tCA1.acv WITH THISFORM.cRTFacv IN v_tCA1
ENDIF
IF GETFLDSTATE("acv", "v_tCA1") = 2
THISFORM.ViewStatus(1)
ENDIF
The view defination follows:
CREATE SQL VIEW RV_TCA1 REMOTE CONNECTION C10_VSO3Data_FB AS ;
SELECT TCA1.*, ;
MCLIENTS.CNAME, ;
MCLIENTS.CCITY, ;
OFFICER.CNAME AS COFFICER, ;
OFFICER.MADDRESS AS COFFICERADDRESS, ;
OFFICER.CNAME AS CNOTICESTO, ;
OFFICER.MADDRESS AS CNOTICETOADDRESS, ;
STAYOFFICER.CNAME AS CSTAYOFFICER, ;
STAYOFFICER.MADDRESS AS CSTAYOFFICERADDRESS, ;
RESPONDANT.CNAME AS CRESPONDANT, ;
RESPONDANT.MADDRESS AS CRESPONDANTADDRESS ;
FROM TCA1 TCA1 ;
LEFT JOIN MCLIENTS MCLIENTS ;
ON TCA1.IAPPEALLANTID = MCLIENTS.IID ;
LEFT JOIN MCUSTOMSOFFICE OFFICER ;
ON TCA1.IOFFICERID = OFFICER.IID ;
LEFT JOIN MCUSTOMSOFFICE NOTICESTO ;
ON TCA1.IOFFICERID = NOTICESTO.IID ;
LEFT JOIN MCUSTOMSOFFICE STAYOFFICER ;
ON TCA1.ISTAYSYNOPID = STAYOFFICER.IID ;
LEFT JOIN MCUSTOMSOFFICE RESPONDANT ;
ON TCA1.IRESPONDANTID = RESPONDANT.IID ;
ORDER BY TCA1.ICA1NO
* View Properties
DBSetProp("RV_TCA1", 'View', 'UpdateType',1)
DBSetProp("RV_TCA1", 'View', 'WhereType',1)
DBSetProp("RV_TCA1", 'View', 'FetchMemo',.T.)
DBSetProp("RV_TCA1", 'View', 'SendUpdates',.T.)
DBSetProp("RV_TCA1", 'View', 'UseMemoSize',255)
DBSetProp("RV_TCA1", 'View', 'FetchSize',100)
DBSetProp("RV_TCA1", 'View', 'MaxRecords',-1)
DBSetProp("RV_TCA1", 'View', 'Tables',[TCA1])
DBSetProp("RV_TCA1", 'View', 'Comment',[])
DBSetProp("RV_TCA1", 'View', 'BatchUpdateCount',1)
DBSetProp("RV_TCA1", 'View', 'ShareConnection',.F.)
DBSetProp("RV_TCA1", 'View', 'Prepared',.F.)
DBSetProp("RV_TCA1", 'View', 'CompareMemo',.T.)
DBSetProp("RV_TCA1", 'View', 'FetchAsNeeded',.F.)
DBSetProp("RV_TCA1", 'View', 'RuleExpression',[])
DBSetProp("RV_TCA1", 'View', 'RuleText',[])
DBSetProp("RV_TCA1", 'View', 'ParameterList',[vp_ipid,'N'])
* View Field Properties
DBSetProp("RV_TCA1.IID",'Field','KeyField',.T.)
DBSetProp("RV_TCA1.IID",'Field','Updatable',.T.)
DBSetProp("RV_TCA1.IID",'Field','UpdateName',[TCA1.IID])
DBSetProp("RV_TCA1.IID",'Field','DataType',[I])
DBSetProp("RV_TCA1.IID",'Field','Caption',[Unique ID])
DBSetProp("RV_TCA1.IID",'Field','Comment',[The Unique ID of this C.A. 1])
DBSetProp("RV_TCA1.IID",'Field','DefaultValue',[0])
DBSetProp("RV_TCA1.IID",'Field','DisplayClass',[])
DBSetProp("RV_TCA1.IID",'Field','DisplayClassLibrary',[])
DBSetProp("RV_TCA1.IID",'Field','Format',[])
DBSetProp("RV_TCA1.IID",'Field','InputMask',[])
DBSetProp("RV_TCA1.IID",'Field','RuleExpression',[])
DBSetProp("RV_TCA1.IID",'Field','RuleText',[])
DBSetProp("RV_TCA1.IPID",'Field','KeyField',.F.)
DBSetProp("RV_TCA1.IPID",'Field','Updatable',.T.)
DBSetProp("RV_TCA1.IPID",'Field','UpdateName',[TCA1.IPID])
DBSetProp("RV_TCA1.IPID",'Field','DataType',[I])
DBSetProp("RV_TCA1.IPID",'Field','Caption',[Parent's ID])
DBSetProp("RV_TCA1.IPID",'Field','Comment',[The Parent record's ID for this
C.A. 1])
DBSetProp("RV_TCA1.IPID",'Field','DefaultValue',[0])
DBSetProp("RV_TCA1.IPID",'Field','DisplayClass',[])
DBSetProp("RV_TCA1.IPID",'Field','DisplayClassLibrary',[])
DBSetProp("RV_TCA1.IPID",'Field','Format',[])
DBSetProp("RV_TCA1.IPID",'Field','InputMask',[])
DBSetProp("RV_TCA1.IPID",'Field','RuleExpression',[])
DBSetProp("RV_TCA1.IPID",'Field','RuleText',[])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','KeyField',.F.)
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','Updatable',.T.)
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','UpdateName',[TCA1.IAPPEALLANTID])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','DataType',[I])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','Caption',[Appeallant])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','Comment',[The Name of the
Appeallant for this C.A. 1])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','DefaultValue',[0])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','DisplayClass',[acboautocomplete])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','DisplayClassLibrary',[libs\avsosccontrols.vcx])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','Format',[])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','InputMask',[])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','RuleExpression',[])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','RuleText',[])
*** removed other field definations as it is very long the following is the
one for RTF storage
DBSetProp("RV_TCA1.ACV",'Field','KeyField',.F.)
DBSetProp("RV_TCA1.ACV",'Field','Updatable',.T.)
DBSetProp("RV_TCA1.ACV",'Field','UpdateName',[TCA1.ACV])
DBSetProp("RV_TCA1.ACV",'Field','DataType',[M])
DBSetProp("RV_TCA1.ACV",'Field','Caption',[])
DBSetProp("RV_TCA1.ACV",'Field','Comment',[])
DBSetProp("RV_TCA1.ACV",'Field','DefaultValue',[])
DBSetProp("RV_TCA1.ACV",'Field','DisplayClass',[])
DBSetProp("RV_TCA1.ACV",'Field','DisplayClassLibrary',[])
DBSetProp("RV_TCA1.ACV",'Field','Format',[])
DBSetProp("RV_TCA1.ACV",'Field','InputMask',[])
DBSetProp("RV_TCA1.ACV",'Field','RuleExpression',[])
DBSetProp("RV_TCA1.ACV",'Field','RuleText',[])
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://ahmedabad.sancharnet.in/vso_ad1/
namitbn@...
___________________________________________
----------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.776 / Virus Database: 523 - Release Date: 12/10/2004
[Non-text portions of this message have been removed]
Thanks for lending a helping hand again.
At 01:13 pm 13/10/2004, you wrote:
>I use BLOBs for various validation scripts and/or large descriptions.For text I have not got the hand of it and it is never a problem.
>Works well if data type is mapped as Memo in remote view data
>definition in VFP database. I don't have any troubles.
>Can you post the remote view definition and properties (CompareMemo,Also in the mean time I have been tinkering with the form, rtf control, FB
>FetchMemo, FetchAsNeeded, etc.
blob. The code for which are below:
Form.AfterSave()
LPARAMETERS tnRetVal
THISFORM.cRTFacv = v_tCA1.acv
wait window "prop " + iif(isnull(THISFORM.cRTFacv), "nul", "value") + " at
aftersave"
wait window "fld " + iif(isnull(v_tca1.acv), "nul", "value") + " at aftersave"
tnRetVal = DODEFAULT(tnRetVal)
RETURN tnRetVal
BizObj.AfterPointerMove()
LPARAMETERS tnFileStatus
THISFORM.cRTFacv = v_tCA1.acv
wait window "prop " + iif(isnull(THISFORM.cRTFacv), "nul", "value") + " at
afterpointermove"
wait window "fld " + iif(isnull(v_tca1.acv), "nul", "value") + " at
afterpointermove"
RETURN DODEFAULT(tnFileStatus)
RTFControl.LostFocus()
DODEFAULT()
wait window "prop " + iif(isnull(THISFORM.cRTFacv), "nul", "value") + " at
lostfocus"
wait window "fld " + iif(isnull(v_tca1.acv), "nul", "value") + " at lostfocus"
IF NOT THISFORM.cRTFacv == v_tCA1.acv
REPLACE v_tCA1.acv WITH THISFORM.cRTFacv IN v_tCA1
ENDIF
IF GETFLDSTATE("acv", "v_tCA1") = 2
THISFORM.ViewStatus(1)
ENDIF
What I have noticed if that the NULL is creating problems and esp. in the
code IF NOT THISFORM.cRTFacv == v_tCA1.acv the condition will never get
true with a null in place, so the replace will never occure, so I will ask
a question on the forum.
The following is the corrected stuff
Form.AfterSave()
LPARAMETERS tnRetVal
THISFORM.cRTFacv = IIF(ISNULL(v_tCA1.acv), "", v_tCA1.acv)
tnRetVal = DODEFAULT(tnRetVal)
RETURN tnRetVal
BizObj.AfterPointerMove()
LPARAMETERS tnFileStatus
THISFORM.cRTFacv = IIF(ISNULL(v_tCA1.acv), "", v_tCA1.acv)
RETURN DODEFAULT(tnFileStatus)
RTFControl.LostFocus()
DODEFAULT()
IF (NOT THISFORM.cRTFacv == v_tCA1.acv) OR ISNULL(v_tCA1.acv)
REPLACE v_tCA1.acv WITH THISFORM.cRTFacv IN v_tCA1
ENDIF
IF GETFLDSTATE("acv", "v_tCA1") = 2
THISFORM.ViewStatus(1)
ENDIF
The view defination follows:
CREATE SQL VIEW RV_TCA1 REMOTE CONNECTION C10_VSO3Data_FB AS ;
SELECT TCA1.*, ;
MCLIENTS.CNAME, ;
MCLIENTS.CCITY, ;
OFFICER.CNAME AS COFFICER, ;
OFFICER.MADDRESS AS COFFICERADDRESS, ;
OFFICER.CNAME AS CNOTICESTO, ;
OFFICER.MADDRESS AS CNOTICETOADDRESS, ;
STAYOFFICER.CNAME AS CSTAYOFFICER, ;
STAYOFFICER.MADDRESS AS CSTAYOFFICERADDRESS, ;
RESPONDANT.CNAME AS CRESPONDANT, ;
RESPONDANT.MADDRESS AS CRESPONDANTADDRESS ;
FROM TCA1 TCA1 ;
LEFT JOIN MCLIENTS MCLIENTS ;
ON TCA1.IAPPEALLANTID = MCLIENTS.IID ;
LEFT JOIN MCUSTOMSOFFICE OFFICER ;
ON TCA1.IOFFICERID = OFFICER.IID ;
LEFT JOIN MCUSTOMSOFFICE NOTICESTO ;
ON TCA1.IOFFICERID = NOTICESTO.IID ;
LEFT JOIN MCUSTOMSOFFICE STAYOFFICER ;
ON TCA1.ISTAYSYNOPID = STAYOFFICER.IID ;
LEFT JOIN MCUSTOMSOFFICE RESPONDANT ;
ON TCA1.IRESPONDANTID = RESPONDANT.IID ;
ORDER BY TCA1.ICA1NO
* View Properties
DBSetProp("RV_TCA1", 'View', 'UpdateType',1)
DBSetProp("RV_TCA1", 'View', 'WhereType',1)
DBSetProp("RV_TCA1", 'View', 'FetchMemo',.T.)
DBSetProp("RV_TCA1", 'View', 'SendUpdates',.T.)
DBSetProp("RV_TCA1", 'View', 'UseMemoSize',255)
DBSetProp("RV_TCA1", 'View', 'FetchSize',100)
DBSetProp("RV_TCA1", 'View', 'MaxRecords',-1)
DBSetProp("RV_TCA1", 'View', 'Tables',[TCA1])
DBSetProp("RV_TCA1", 'View', 'Comment',[])
DBSetProp("RV_TCA1", 'View', 'BatchUpdateCount',1)
DBSetProp("RV_TCA1", 'View', 'ShareConnection',.F.)
DBSetProp("RV_TCA1", 'View', 'Prepared',.F.)
DBSetProp("RV_TCA1", 'View', 'CompareMemo',.T.)
DBSetProp("RV_TCA1", 'View', 'FetchAsNeeded',.F.)
DBSetProp("RV_TCA1", 'View', 'RuleExpression',[])
DBSetProp("RV_TCA1", 'View', 'RuleText',[])
DBSetProp("RV_TCA1", 'View', 'ParameterList',[vp_ipid,'N'])
* View Field Properties
DBSetProp("RV_TCA1.IID",'Field','KeyField',.T.)
DBSetProp("RV_TCA1.IID",'Field','Updatable',.T.)
DBSetProp("RV_TCA1.IID",'Field','UpdateName',[TCA1.IID])
DBSetProp("RV_TCA1.IID",'Field','DataType',[I])
DBSetProp("RV_TCA1.IID",'Field','Caption',[Unique ID])
DBSetProp("RV_TCA1.IID",'Field','Comment',[The Unique ID of this C.A. 1])
DBSetProp("RV_TCA1.IID",'Field','DefaultValue',[0])
DBSetProp("RV_TCA1.IID",'Field','DisplayClass',[])
DBSetProp("RV_TCA1.IID",'Field','DisplayClassLibrary',[])
DBSetProp("RV_TCA1.IID",'Field','Format',[])
DBSetProp("RV_TCA1.IID",'Field','InputMask',[])
DBSetProp("RV_TCA1.IID",'Field','RuleExpression',[])
DBSetProp("RV_TCA1.IID",'Field','RuleText',[])
DBSetProp("RV_TCA1.IPID",'Field','KeyField',.F.)
DBSetProp("RV_TCA1.IPID",'Field','Updatable',.T.)
DBSetProp("RV_TCA1.IPID",'Field','UpdateName',[TCA1.IPID])
DBSetProp("RV_TCA1.IPID",'Field','DataType',[I])
DBSetProp("RV_TCA1.IPID",'Field','Caption',[Parent's ID])
DBSetProp("RV_TCA1.IPID",'Field','Comment',[The Parent record's ID for this
C.A. 1])
DBSetProp("RV_TCA1.IPID",'Field','DefaultValue',[0])
DBSetProp("RV_TCA1.IPID",'Field','DisplayClass',[])
DBSetProp("RV_TCA1.IPID",'Field','DisplayClassLibrary',[])
DBSetProp("RV_TCA1.IPID",'Field','Format',[])
DBSetProp("RV_TCA1.IPID",'Field','InputMask',[])
DBSetProp("RV_TCA1.IPID",'Field','RuleExpression',[])
DBSetProp("RV_TCA1.IPID",'Field','RuleText',[])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','KeyField',.F.)
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','Updatable',.T.)
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','UpdateName',[TCA1.IAPPEALLANTID])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','DataType',[I])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','Caption',[Appeallant])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','Comment',[The Name of the
Appeallant for this C.A. 1])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','DefaultValue',[0])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','DisplayClass',[acboautocomplete])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','DisplayClassLibrary',[libs\avsosccontrols.vcx])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','Format',[])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','InputMask',[])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','RuleExpression',[])
DBSetProp("RV_TCA1.IAPPEALLANTID",'Field','RuleText',[])
*** removed other field definations as it is very long the following is the
one for RTF storage
DBSetProp("RV_TCA1.ACV",'Field','KeyField',.F.)
DBSetProp("RV_TCA1.ACV",'Field','Updatable',.T.)
DBSetProp("RV_TCA1.ACV",'Field','UpdateName',[TCA1.ACV])
DBSetProp("RV_TCA1.ACV",'Field','DataType',[M])
DBSetProp("RV_TCA1.ACV",'Field','Caption',[])
DBSetProp("RV_TCA1.ACV",'Field','Comment',[])
DBSetProp("RV_TCA1.ACV",'Field','DefaultValue',[])
DBSetProp("RV_TCA1.ACV",'Field','DisplayClass',[])
DBSetProp("RV_TCA1.ACV",'Field','DisplayClassLibrary',[])
DBSetProp("RV_TCA1.ACV",'Field','Format',[])
DBSetProp("RV_TCA1.ACV",'Field','InputMask',[])
DBSetProp("RV_TCA1.ACV",'Field','RuleExpression',[])
DBSetProp("RV_TCA1.ACV",'Field','RuleText',[])
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://ahmedabad.sancharnet.in/vso_ad1/
namitbn@...
___________________________________________
----------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.776 / Virus Database: 523 - Release Date: 12/10/2004
[Non-text portions of this message have been removed]