Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coding change to MySQL
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00943932
Message ID:
00943938
Views:
16
Hi,

I am a new guy in MySQL, i can connect the Database-Table as below:

Con = SQLCONNECT('yourDSNName','yourusername','youruserpass')

And now, can you tell me some change in :---

**** in .dbf
Question 1
INDEX ON PRO_CODE TAG P_CODE
INDEX ON PRO_NAME TAG P_NAME
INDEX ON SUBS(PRO_CODE,1,3) + STR(PBARCODE) TAG P_BARCODE
SET ORDER TO P_CODE

Question 2
After i can set the order as 'set order to p_code'
How can i coding as 'skip 1', 'skip -1', EOF, BOF
==> What are you trying to do with this commands?

Question 3
How can i coding as 'Flock', 'Rlock', 'Unlock'
==> Flock = This needs for exclusive access to a single table.
e.g. you want change the sell_price on table items to $7.00

You can issue commands like this,,
If Flock()
        Replace all sell_price with 7.00 && You can put condition here-where 
        Unlock && Release File Locks
     ENDIF
for Rlock()

Normally when you lock certain records and its invoke when editing a record..
If Rlock()
        Replace unit_cost with m.yUnit_cost
        Unlock
     Else
         && Inform user if cannot lock records and retry lock for how many sec."
     Endif
Question 4
In my old program, i can to brow a .dbf file (it is oepned at begining program) to get my existing records in it.
Do i need to run the "Select * from Product_file" to get existing records every time. If turn, that will make the system slow ???

===> It depends, normally Inventory With POS open up tables at the main program which can result slower system performance.. On my side I open the tables only I want and close it as soon as I finish the tables im processing.

Hope it can help or give you a tip..
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Previous
Reply
Map
View

Click here to load this message in the networking platform