Home · Articles · Downloads · Forums · LinksSeptember 05 2010 21:13:02
Navigation
Home
Articles
Downloads
FAQ
Forums
Contact Me
Links
Photo Gallery
Search
Register
Latest Articles
5GL:Property, Method...
Limnor vs. Computer ...
Codeless vs Coding
Community Conduct
View Thread
Limnor Community Portal | General Limnor Discussion | How to...
Page 2 of 2 < 1 2
Author RE: Filling database table field from ListBoxes
frangonve
Member

Posts: 110
Location: Madrid (Spain) until I can live at the beach
Joined: 18.06.08
Posted on 17-01-2010 11:41
Hi, now I want to modify the text in label28:

EasyDataSet1
Table Settings
First and only Record
Field Period= 0 => Label28 displays "Trades Yesterday"

EasyDataSet1
Table Settings
First and only Record
Field Period = X (not 0) => Label28 displays "Trades in the last X hours"


Being label28 updated whenever the content of Field Period is changed.

Please. Can you give me a hint?

Cheers

Francisco

Edited by frangonve on 17-01-2010 11:43
Author RE: Filling database table field from ListBoxes
yw
Administrator

Posts: 670
Location: ***
Joined: 23.06.05
Posted on 17-01-2010 15:02
Here we need a little help with SQL coding . For the SQL property of EasyDataSet1, add a new calculated field by checking "Show SQL" checkbox and typing needed SQL code, for example:

select {your original field list} , IIF(Period=0, 'Trades Yesterday', 'Trades in the last ' + CStr(Period) + ' hours' ) as TradesPeriod FROM {your original FROM clause}

That is, insert the following SQL code into the original SQL code the Query Builder generates:

, IIF(Period=0, 'Trades Yesterday', 'Trades in the last ' + CStr(Period) + ' hours' ) as TradesPeriod

Now you have a new field named TradesPeriod in EasydataSet1, you can bind the label to this field.
I tried it and it works. But please note the following issues:
1. I am using MS Access database. If you are using other databases then IIF and CStr may not be available and other commands should be used. For example, CASE, CAST, Convert, etc. Let me know what database you are using and I'll find out the correct commands.
2. Current Query Builder has a problem of converting all text into upper case. So, "Trades Yesterday" becomes "TRADES YESTERDAY". We are fixing it.

Edited by yw on 17-01-2010 15:03
Author RE: Filling database table field from ListBoxes
frangonve
Member

Posts: 110
Location: Madrid (Spain) until I can live at the beach
Joined: 18.06.08
Posted on 18-01-2010 17:48
Thanks for your help!!

I tried your solution.
But the label binded to the calculated field TradesPeriod is not updated when a new value is input in the Period field and the EasyDataset.Update action is completed (the label binded to Period field is updated instantly).

Cheers

Francisco
Author RE: Filling database table field from ListBoxes
yw
Administrator

Posts: 670
Location: ***
Joined: 23.06.05
Posted on 18-01-2010 22:58
Yes, the calculated fields are not being refreshed. We will fix it...
Author RE: Filling database table field from ListBoxes
yw
Administrator

Posts: 670
Location: ***
Joined: 23.06.05
Posted on 23-01-2010 19:54
Please download a new version from http://www.limnor.com/Studio/LimnorStudioSetup.msi.
Please modify your application to execute an EasyDataset.FetchData action after calling EasyDataSet.Update action, to let the database engine to recalculate the calculated fields.
Author RE: Filling database table field from ListBoxes
frangonve
Member

Posts: 110
Location: Madrid (Spain) until I can live at the beach
Joined: 18.06.08
Posted on 24-01-2010 16:43
Thanks, I'll do.

Cheers

Francisco
Author RE: Filling database table field from ListBoxes
frangonve
Member

Posts: 110
Location: Madrid (Spain) until I can live at the beach
Joined: 18.06.08
Posted on 31-01-2010 11:09
Hi,

I downloaded the last beta and now when the EasyDataset1.Update action is assigned to a button, the calculated fields are instantly refreshed.

EasyDataset1.Query and EasyDataset1.Fetch actions are now not only redundant but they are stopping the update of the database.


Thanks

Francisco
Author RE: Filling database table field from ListBoxes
yw
Administrator

Posts: 670
Location: ***
Joined: 23.06.05
Posted on 07-02-2010 02:36
The database support is improved. Please download a new version from http://www.limnor.com/Studio/LimnorStudioSetup.msi. All database samples have been updated. Existing projects need to be adjusted by re-creating data-bindings.
Query and Fetch will not stop update of the database.
Author RE: One step more and more doubts
frangonve
Member

Posts: 110
Location: Madrid (Spain) until I can live at the beach
Joined: 18.06.08
Posted on 07-02-2010 05:44
This post was sent to another thread by mistake...


One step more and more doubts

Now the different labels have to show the correct values and being updated when new fields are added to the trades table and when the settings table is updated and when the system time changes.

Example:

Label17 shows the total number of trades in selected period:

if period=0 -> number of trades today
if period=X -> number of trades in the last X hours

number of trades is the number of records filtered by the >=@Date Where clause (which easyGrid or EasyDataSet property holds the number of records filtered by the Where Clause?)

Label17.SetText action has to be linked to the RowCount of an EasyGrid??? with Where Clause @Date.

@Date = <Today> 00:00 if period=0
@Date = Now.AddHours (-{Form1.DataSet1.Fields.Period}) if period not 0

How can the text in Label17 (and the rest of labels)be refreshed as the system time changes (once per minute)?

Cheers

Francisco
Author RE: Filling database table field from ListBoxes
frangonve
Member

Posts: 110
Location: Madrid (Spain) until I can live at the beach
Joined: 18.06.08
Posted on 07-02-2010 08:53
I think I found the answer to my last question (updating regularly the labels):

I think the Timer element is the answer. Right?

Cheers

Francisco

Edited by frangonve on 06-03-2010 17:52
Author RE: Filling database table field from ListBoxes
yw
Administrator

Posts: 670
Location: ***
Joined: 23.06.05
Posted on 07-02-2010 14:09
In your situation a Timer can be a solution.
Author RE: while loop
vince
Member

Posts: 100
Location:
Joined: 30.01.07
Posted on 22-02-2010 12:43
Hello

i also had difficulty understanding how you would arrive at a FALSE condition to end your while loop...

How would you simply set it's condition to FALSE by using somekind of action in a list.....(the list that that LOOP was actually executing)

a WHILE LOOP is just a repeating IF THEN statement.

There was also a bug in the LOOP WHILE performer which dge may have fixed. You were only able to give the LOOP some actions from it's main properties window....(not from the WHILE DO window)

Vince.
Page 2 of 2 < 1 2
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Shoutbox
You must login to post a message.

yw
16/04/2010 17:25
It is available at http://www.limnor.com/dow
nloads/LimnorPerformerRef
erences.pdf


tangocash
15/04/2010 13:03
Hi limnor performers reference pdf link in rapidshare is down. I really need to download it. aj.soho@gmail.com

yw
28/08/2009 11:31
try set RThreshold = 1

Fredpret
27/08/2009 15:52
I cannot receive via the rs232 performer yet hyper terminal works. Any suggestion or help will be most welcome. Thanks

admin
06/05/2009 14:30
Fredpet - please post your inquiry in the forums so others can comment and benefit from the replies.

Fredpret
06/05/2009 10:46
I cant transfer data to a page variable. i thought it was exrtemely simple but no go. I shall be very grateful for any help

lammies
16/03/2009 10:45
will excel and word performers work with MSP Office 2007?

Raven
27/12/2008 10:48
Limnor Rocks !!!

piyushvishvas
13/07/2008 14:24
Limnor is great tool for developers. piyushvishvas wwww.vishvas.org

SOE
18/12/2007 15:06
Project browser and action list are awesome ways to help program visually. It truly allows you to organize, see the logic involved, and help program. You don't have this view point using traditio

Shoutbox Archive
Forum Threads
Newest Threads
Scraping revisited
TreeviewX change icon
Scraping HTML or CSV...
Treeview help
Old limnor
Hottest Threads
how to make repor... [33]
Filling database ... [31]
my project [31]
Users Management [30]
Possible Bugs Rep... [26]