Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Stored Procedure Question
Message
From
08/07/2006 19:35:51
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01134722
Message ID:
01134731
Views:
16
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform