PDA

View Full Version : Using DBFs



Gayani
2013-09-17, 02:13
Hi,

When using DBFs in Lianja, do I hv to add them to the data work space? Can't I use the free tables by using the path of them.

For example,
use "\Med\Data\FundPyee.dbf" --> is this valid in Lianja? When I type the same in console it works fine.

I opened my file in the load event (as above), but errors come for the statement where I selected the file (select FundPyee).

--------------------
Tue 17. Sep 15:53:24 2013
**** Lianja error ****
FundPyee
^
PROPERTY 'FUNDPYEE' not found
Called from program - form1.init() at line 65
Called from program - frmfndpyee.sco at line 78
Called from program - fndmain.dbo at line 47
----------------------

it works fine in VFP but do I hv to do any coding changes after migrating it to Lianga?
Pls note that my DBFs r free tables and they are not attached to any DBC. Currently I'm using RC8. :confused:

barrymavin
2013-09-17, 02:38
You have access to RC9. I've made a few more debugger improvements today based on developer feedback so you should be able to see whats going on much easier now. Wait until tomorrow and download the latest build.

The debugger will let you set breakpoints inside init() or any other method so you can track these things down.

Gayani
2013-09-17, 02:48
That's good. Because I cannot see whts happening inside the method I start using RC8 again. Thank you.

barrymavin
2013-09-17, 03:00
Yes thats what I just fixed. Set a breakpoint inside your INIT() method then you can use LIST STATUS in the console tab to see what alias the table is opened with.

You add files to the debugger by opening them then clicking the "Debug" ToolButton in the HeaderBar. Once you have the files you want to set breakpoints in inside the debugger just click the "Debug" ToolButton at the bottom of the ModeBar (left of the screen).

You can also just place SET STEP ON or DEBUG in the INIT() method and the debugger will popup at the point.

Gayani
2013-09-17, 06:45
Wow thank u so much. I'll check it on tomorrow :D

HankFay
2013-09-17, 08:07
When using DBFs in Lianja,

is that a Fox dbf or a Lianja dbf?

Hank

Gayani
2013-09-18, 01:41
Fox dbf

barrymavin
2013-09-18, 01:53
You have to import these into Lianja. Its a 64-bit database engine. Just drag them onto the tables panel and they will be converted along with their indexes and memo files if they have any.

Gayani
2013-09-24, 23:48
Hi,

Still I got a issue. Wht I did was listed below.
1) create a database
2) import my files to it
3) I opened my database as,open database <database_name>, in my main program

------------------------------
PROCEDURE Load
If !Used("FundPyee")
use Med_data!FundPyee
select 0
Endif

SELECT FundPyee
GO TOP

ENDPROC
PROCEDURE Init
SELECT FundPyee ---> this is the place where error comes
GO TOP

thisform.text1.Value = FundPyee.FundCode
thisform.text2.Value = FundPyee.resrce_id
ENDPROC
------------------------------


------------------------------
Wed Sep 25 09:00:57 2013
**** Lianja error ****
FundPyee
^
PROPERTY 'FUNDPYEE' not found
Called from program - form1.init() at line 67
Called from program - frmfndpyee.sco at line 79
Called from program - fndmain.dbo at line 49
-------------------------------------

Wht should I do?

Also I need to know whether control source on text boxes (which where set in the VFP) works fine when converted to Lianja?

barrymavin
2013-09-25, 00:14
Use the debugger and set a breakpoint then LIST STATUS to see if your table is being opened.

yes controlsource works the same.

Gayani
2013-09-25, 02:58
yes u r correct it is not getting opened. But I execute the same in the console and it works fine.

use Med_data!FundPyee
brow

Can u figure out y this is not when I run the program.

barrymavin
2013-09-25, 03:28
yes u r correct it is not getting opened. But I execute the same in the console and it works fine.

use Med_data!FundPyee
brow

Can u figure out y this is not when I run the program.

Just set a breakpoint in the load() event and the init() event and single step. You can switch to the debugger console and see any errors. You need to check the order of event dispatching. Perhaps in this particular class init() is called before load() for some reason.

Gayani
2013-09-25, 03:37
yes it is. I already put two break points, one in init and one in load. Init fires first. How can that be? Is there any solution for this?

barrymavin
2013-09-25, 03:48
Not in the version that will ship tomorrow no. You will need to move the load() logic into init(). load() is called first on UI components but that is a custom class.