Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Refresh Header-Good, Items-Bad
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00984056
Message ID:
00984151
Views:
28
Did You issue this SQL every time You add or modify record? If so I think You shuold Create an Updatatble View or CursorAdapter. Then You can Add, Delete Modify record directly in it. I think that is faster thenAfter You add a record You do SELECT ......

BTW I see You ommited CONTINUE in DO WHILE FOUND() cycle.




>Thanks for the reply.
>
>I'm retrieving and showing the data with a SQL-Select statement. The SQL-Select statement calls a UDF which retrieves a comma delimited list of the inventory #'s as such:
>
>Select sohead.sonum,custmast.company,padr(soitemlistbysonum(sohead.sonum),20) as inventorylist ;
> from invhead ;
> left outer join custmast ;
> on sohead.custid=custmast.custid ;
> where sohead.date=date() ;
> order by sohead.sonum ;
> into cursor c_soheadwitemlist
>
>The soitemlistbysonum UDF looks like this:
>lparameter lnSONum
>local lnSelect,lcItemList
>lnSelect=select()
>lcItemList=''
>select soitems
>locate for sonum=lnSONum
>do while found()
> lcItemList=lcItemList+iif(!empty(lcItemList),',','')+alltrim(str(sonum.itemnum))
>enddo
>select (lnSelect)
>return lcItemList
>
>I am using FLUSH after adding the records. By the way I use INSERT-SQL rather than append blank.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform