Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Stored Procedure Question
Message
De
08/07/2006 19:35:51
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01134722
Message ID:
01134731
Vues:
17
>I want to write a VFP stored procedure to add and update a record.
>
>My concern is that there are lots of fields in the table, and to write a SQL UPDATE
>command in a stored procedure would require a parameter for each field.
>
>Is there a simpler way to do this?

You could send a single object to your stored procedure where object has members for the ones you want to update. ie:
use customer
cursorsetprop("buffering",5,"customer")
go 5

oRec = CREATEOBJECT("empty")
ADDPROPERTY(oRec,"Company","My Company")
ADDPROPERTY(oRec,"Contact","My Contact")

gather name oRec
go 7
gather name oRec
browse
tablerevert(.t.,"customer")
use
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform