How do YOU do your inserts for multiple records in SQL from vfp9?
Example,
I have invoice screen, which has 2 or 3 cursors,
1 cursor hold customer info
1 cursor hold invoice details
1 cursor hold some other table detail
so, now, i do this:
I know this is doing a single call for insert for every record.. most invocies have 5-10 lines Max, but, i might be needing this for an invoice that has 200-1000 line items (serialized items)...
Ez Logic
Michigan
Example,
I have invoice screen, which has 2 or 3 cursors,
1 cursor hold customer info
1 cursor hold invoice details
1 cursor hold some other table detail
so, now, i do this:
Code:
select curInvoice
scan
&& get the
lcItem = item
lcItmDesc = ItmDesc
lnQty = Qty
etc..
text to lcSQL noshow
insert into ARTran
(item,
itmdesc,
qty,
etc..
)
values
(
?lcItem,
?lcItmDesc,
?lnqty,
?lcetc...
(
goSQL.ExecuteNonQuery(lcSQL)
if SQLError()
exit
endif
endscan
I know this is doing a single call for insert for every record.. most invocies have 5-10 lines Max, but, i might be needing this for an invoice that has 200-1000 line items (serialized items)...
Ez Logic
Michigan