Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Insert Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00621576
Message ID:
00621590
Vues:
10
Hi,

The lenght of the string literal in VFP is limited to 255 characters and you're exeeding it. I would also recomend to use standard end of line instead of "|". It'll allow to parse it easier back using ALINES() function.
lcNL = CHR(13) + CHR(10)
INSERT INTO ReportData ( FISECMFK, FCSETTING, FMSETTING, FLSTATUS, ;
  FLLOCK, FCCREATE, FTCREATE ) VALUES ( 72, [DEFAULT], ;
        [rptanalystcdlist.sppageframe1.page1.optrecordtype.Value=1] + lcNl +  ;
	[rptanalystcdlist.sppageframe1.page1.optshading.Value=1] + lcNl +  ;
	[rptanalystcdlist.sparianalyst1.cbo1.DisplayValue=] + lcNl +  ; 
	[rptanalystcdlist.sparianalyst1.spoptiongroup1.Value=1] + lcNl +  ;
	[rptanalystcdlist.sparianalyst1.cbo2.DisplayValue=] + LCnL, ;
  .T., .F., [asdf], CTOT( '02/18/2002 11:21:58 AM' ) )
>I am trying to insert a value into a memo field using the insert sql command. The following command fails.
>
>INSERT INTO ReportData ( FISECMFK, FCSETTING, FMSETTING, FLSTATUS, FLLOCK, FCCREATE, FTCREATE ) VALUES ( 72, [DEFAULT], [rptanalystcdlist.sppageframe1.page1.optrecordtype.Value=1| rptanalystcdlist.sppageframe1.page1.optshading.Value=1| rptanalystcdlist.sparianalyst1.cbo1.DisplayValue=| rptanalystcdlist.sparianalyst1.spoptiongroup1.Value=1| rptanalystcdlist.sparianalyst1.cbo2.DisplayValue=|], .T., .F., [asdf], CTOT( '02/18/2002 11:21:58 AM' ) )
>
>What I am doing is trying to save the name of a control and the value of the control in a memo field so I can parse them out later and restore the state of a form.
>
>I tried to put a ' character at the begining and end of the value that contains the control names but no luck with that either. The "|" character is in there for me to have something to parse by when I read the value back from the table.
>
>The above line is built dynamically and is executed by macro expansion. It's value is in the varaiable lcsql and I am executing by issuing &lcSql.
>
>Any ideas what the problem may be?
>
>Thanks in advance for your help.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform