I'm thinking of passing a table variable to a stored procedure instead of code like the following and the number of columns could be more than shown here.
The table variable would have all of the required fields and have only one record.
This would eliminate passing the variables one by one, but I worry that this is might really slow it down.
Speed is not real important for this app, but don't want it to be slow either.
Also it's a real pain to drop and recreate all of the procedures that use the table variable every time I change the table variable.
Any guidance would be appreciated.
Auguy
Sylvania/Toledo Ohio
Code:
@invoicenbr varchar(10)
,@invoicedate smalldatetime
,@duedate smalldatetime
,@invoicestatus int
,@leasemasterfk int
...
UPDATE dbo.InvoiceMaster SET
invoicenbr = @invoicenbr
,invoicedate = @invoicedate
,duedate = @duedate
,invoicestatus = @invoicestatus
,leasemasterfk = @leasemasterfk
...
This would eliminate passing the variables one by one, but I worry that this is might really slow it down.
Speed is not real important for this app, but don't want it to be slow either.
Also it's a real pain to drop and recreate all of the procedures that use the table variable every time I change the table variable.
Any guidance would be appreciated.
Auguy
Sylvania/Toledo Ohio