Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FormSet address in a cursor
Message
From
21/07/2016 19:36:58
 
 
To
21/07/2016 18:30:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01638546
Message ID:
01638548
Views:
63
>I want to create a cursor that will contain values of forms or formsets.
>
>Example
>
>insert into addresses ('Name of formset1', ThisformSet)
>
>In that case the type of the field could be c(16)
>
>What would be the necessary field type for thisformset?

Not sure what you're trying to achieve. AFAIK you can't directly store an object (or even just an object reference) in a cursor. But if you want to do what you're saying in the first line you could do something like this:
CREATE CURSOR ValsCursor ( FSName C( 16 ), PropName C( 16 ), PropType C( 1 ), CharVal C( 100 ), IntVal I, NumVal N( 8, 2 ), LogVal L )

INSERT INTO ValsCursor
  ( FSName ;
  , PropName ;
  , PropType ;
  , CharVal ) ;
  VALUES ;
    ( "MyFormSet" ;
    , "Name" ;
    , "C" ;
    , MyFormSet.Name )

INSERT INTO ValsCursor
  ( FSName ;
  , PropName ;
  , PropType ;
  , IntVal ) ;
  VALUES ;
    ( "MyFormSet" ;
    , "FormCount" ;
    , "I" ;
    , MyFormSet.FormCount )

INSERT INTO ValsCursor
  ( FSName ;
  , PropName ;
  , PropType ;
  , LogVal ) ;
  VALUES ;
    ( "MyFormSet" ;
    , "AutoRelease" ;
    , "L" ;
    , MyFormSet.AutoRelease )
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform