> >
> > Since you don't know the number of records in the child table, it would be difficult to put this in a procedure. Why don't you put this in a BEGIN TRANSACTION/END TRANSACTION.
> >
> > Regards
> > Tushar
>
> yes i do put in begin/end begin. my question is
> that i call the procedure let us say "master" what is does
> insert a row having information about that voucher and mid (master id)
> than another procedure that put as many rows in the voucher in the detail
> table along with mid (master id). but it all happens by calling the procedure
> each time for each line. question is how to avoid calling procedure of detail
> many time. i need to know how to get rows from cursor and insert these rows all
> to gather in detail table at once.
> hope i could clear the question.
>
> Regards,
> Abdul Aqeel
You can take a look at OPENROWSET function available in SQL.
you can save you cursor as table in your disk and then open that table by using openRowSet() function in SQL stored procedure.
you can access all the records from this table on sql at once with openRowset()
http://fox.wikis.com/wc.dll?Wiki~VisualFoxProDataFromSQLServer~VFPhttp://support.microsoft.com/kb/207595you can search google for more details.
-----------------------------------------------------------------------------------------------
Regards
Surinder Singh
Email:
sur200@indiatimes.comCheck my blog for details:
http://weblogs.foxite.com/sur200----------------------------------------------------------------------------------------
*If you understand what you're doing, then you're not learning anything.