| Author |
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 19-12-2009 20:32 |
|
|
Hello,
I have some doubts about LimnorStudio...
I'm using LimnorStudio to fill an Access table with data from another table:
Table Instruments
InstrumentID ---- InstrumentName ---- Decimals
---- 1 ----------------- EURUSD -------------- 5 -----
---- 2 ----------------- USDJPY -------------- 3 -----
---- 3 ----------------- GBPUSD -------------- 5 -----
Table ClosedTrades
Id ----- DateTimeOpen ---------- DateTimeClose -------- Instrument ...
1 ----- 31-12-2009 11:01:05 --- 31-12-2009 13:24:45 ----- 2 ---
2 ----- 31-12-2009 14:21:30 --- 31-12-2009 16:01:43 ----- 1 ---
The Instrument field from table ClosedTrades is linked to InstrumentID from table Instruments.
How can I use a listbox to show the InstrumentNames so users can select one of them and clicking a button the correct InstumentID will be inserted in Instrument field from ClosedTrades table?
How can I use a DateTimePicker for date and another DateTimePicker for time to insert both values together into one record of DateTimeOpen field?
Cheers
Francisco |
|
| Author |
RE: Filling database table field from ListBoxes |
yw
Administrator
Posts: 670
Location: ***
Joined: 23.06.05 |
| Posted on 21-12-2009 13:05 |
|
|
|
Do you mean using EasyGrid to input data? |
|
| 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 21-12-2009 14:30 |
|
|
I'd rather not to give the users the grid to fill, I was thinking in a window with an Add Record Button and:
4 datetimepickers to input date and time to DateTimeOpen and DateTimeClose columns
(two datetimepickers per column 1 for date another for time)
1 listbox to allow the user to select from the values in the 2nd column from Instruments Table and send to the instrument column from ClosedTrades Table the InstrumentID referred
Table Instruments
InstrumentID ---- InstrumentName ---- Decimals
---- 1 ----------------- EURUSD -------------- 5 -----
---- 2 ----------------- USDJPY -------------- 3 -----
---- 3 ----------------- GBPUSD -------------- 5 -----
Table ClosedTrades
Id ----- DateTimeOpen ---------- DateTimeClose -------- Instrument ...
1 ----- 31-12-2009 11:01:05 --- 31-12-2009 13:24:45 ----- 2 ---
2 ----- 31-12-2009 14:21:30 --- 31-12-2009 16:01:43 ----- 1 ---
Ie: if the user selects USDJPY from the listbox, then the InstrumentID 2 would be input in the Instrument column from the ClosedTrades Table.
But even if I use the EasyGrid , can I offer predefined values to the users to select from them? How?
Cheers
Francisco
Edited by frangonve on 22-12-2009 09:22 |
|
| Author |
RE: Filling database table field from ListBoxes |
yw
Administrator
Posts: 670
Location: ***
Joined: 23.06.05 |
| Posted on 22-12-2009 13:06 |
|
|
|
I'll try to do what you described and let you know... |
|
| 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 23-12-2009 15:10 |
|
|
|
Thanks a lot... |
|
| Author |
RE: Filling database table field from ListBoxes |
yw
Administrator
Posts: 670
Location: ***
Joined: 23.06.05 |
| Posted on 29-12-2009 02:54 |
|
|
A new version of Limnor Studio (beta) has been uploaded. http://www.limnor.com/Studio/LimnorStudioSetup.msi.
A major addition was to use a centralized database connection management system for database programming. It makes both development and deployment of database applications much easier.
For the topic of data input, a sample is provided using data grid with field-editors. It shows the use of a database lookup for the data input as described by frangonve. See http://www.limnor.com/Studio/slide_DataInputUsingGrid.zip and http://www.limnor.com/Studio/prj_DataInputUsingGrid.zip.
I will do the same lookup data input not using data grid and let you know when it is done... |
|
| 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 29-12-2009 11:09 |
|
|
Hi, I'm trying to open the prj_DataInputUsingGrid solution in the updated beta environment, but Limnor Studio can't find part of the information:

Can I know the path structure expected by Limnor Studio to open it?
Currently I have:
In C:\...\documents\LimnorMain\prj_DataInputUsingGrid\
DataInputUsingGrid.LimnorMain_sln
school1.mdb
In C:\...\documents\LimnorMain\prj_DataInputUsingGrid\prj_DataInputUsingGrid\
DataInputUsingGrid.lrproj
DataInputUsingGrid.lrproj.vob
Form1.limnor
Form1.limnor.aux
WinApp.limnor
Cheers
Francisco |
|
| Author |
RE: Filling database table field from ListBoxes |
yw
Administrator
Posts: 670
Location: ***
Joined: 23.06.05 |
| Posted on 29-12-2009 12:47 |
|
|
When the sample was created DataInputUsingGrid.LimnorMain_sln was in the same folder as the rest of the files.
If you do not want DataInputUsingGrid.LimnorMain_sln to be in the same folder as the rest of the files then you may open DataInputUsingGrid.lrproj with Limnor Studio and choose Build menu to compile the project. It will re-create DataInputUsingGrid.LimnorMain_sln and ask you where to save DataInputUsingGrid.LimnorMain_sln. |
|
| 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 29-12-2009 22:07 |
|
|
|
Thanks a lot for your help! |
|
| Author |
RE: Filling database table field from ListBoxes |
yw
Administrator
Posts: 670
Location: ***
Joined: 23.06.05 |
| Posted on 31-12-2009 01:02 |
|
|
Please download a new beta from http://www.limnor.com/Studio/LimnorStudioSetup.msi.
A new sample was uploaded showing data input using a form, not a grid. It shows using a ComboBox to do lookup for the type of data entry frangonve described. The slides for the sample are at http://www.limnor.com/Studio/slide_DataEntryWithLookup.zip. The project for the sample is at http://www.limnor.com/Studio/prj_DataEntryWithLookup.zip. |
|
| 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 01-01-2010 13:39 |
|
|
Hello,
I'm writing a small program:

that you can download 90 days since this message is posted at
http://rapidshare.com/files/328900315/Overtrading.zip
It's still in an early stage.
The bottom fields in the window are used to save settings in the Setting Table (just one record)
The center grid is used to input trades in the Trades table.
The labels in the top part of the window should show the results of calculations done to the fields in the tables Trades and Settings.
How can I get the current date/time (now()) to select the records in the Trades table that have an OpenTimeDate later than:
now()-PeriodInHours
Comments:
Updating the settings table using the "Save Settings" button works just once per execution, trying to update the table further is not working.
Pips field updating in the EasyGrid is erratic.
The Date/Time editor to input fields in EasyGrid is huge in my screen... How can it size being modified?
As you can see in the picture below, the left area of the Method designer is overcrowded,and so it's difficult to see the elements in it.

Cheers
Francisco
Edited by frangonve on 01-01-2010 15:17 |
|
| Author |
RE: Filling database table field from ListBoxes |
yw
Administrator
Posts: 670
Location: ***
Joined: 23.06.05 |
| Posted on 02-01-2010 15:25 |
|
|
Thank you for your comments. We are working on them...
About using now()-PeriodInHours to select records, you may add a filter in the query such as "... where OpenDateTime > @openTime". The Query Builder has a "Filter" button for adding filter. Or you may check "Show SQL" checkbox and manually append "where OpenDateTime > @openTime" at the end of the SQL query.
Once we have the parameter in the query, we may use SetParameterValue action to give the value of the parameter and then call Query action to select records. The value for the parameter can be a math expression which uses System.DateTime.Now.AddHour to add -PeriodInHours. I will create a sample to show the operations.
|
|
| 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 04-01-2010 05:23 |
|
|
Thanks
A sample will be really useful.
Best regards
Francisco |
|
| Author |
RE: Filling database table field from ListBoxes |
yw
Administrator
Posts: 670
Location: ***
Joined: 23.06.05 |
| Posted on 04-01-2010 20:06 |
|
|
Please download a new beta at http://www.limnor.com/Studio/LimnorStudioSetup.msi
A sample is at http://www.limnor.com/Studio/slide_UseParametersInQuery.zip and http://www.limnor.com/Studio/prj_UseParametersInQuery.zip.
The DateTime picker can be small or large. Large one is for touchscreen kiosk apps.
Method editor may auto-arrange the icons by right-clicking the icon area.
I could not re-produce the problems of updating database in EasyGrid. For updating EasyDataSet, please do not use Query action after Update action. Query action is not needed.
Edited by yw on 04-01-2010 20:27 |
|
| 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 12-01-2010 13:26 |
|
|
After downloading last beta from your post january 4th, I tried to rewrite that sample application and after some work, I'm in a point where I can't delete or edit performers (buttons), when I click with the secondary button in the performer the options Create Set Propety Action and Create Event are greyed so I can use them and if I select the performer in the list and access to its events and the actions, right clicking them only flash very shortly the options Edit Action, Delete Action,... and then they dissappear.
I've recorded a video to show the problem, where i try to right-click the performer and its icon, you can download it from:
http://rapidshare.com/files/334273517/Limnorstudio_20100112.avi
Cheers
Francisco |
|
| Author |
RE: Filling database table field from ListBoxes |
yw
Administrator
Posts: 670
Location: ***
Joined: 23.06.05 |
| Posted on 13-01-2010 18:14 |
|
|
|
It is indeed a strange behaviour. I could not re-produce it on my machine. Could you please send me your project files? |
|
| 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 14-01-2010 01:50 |
|
|
Hi,
you can get the project files here:
http://rapidshare.com/files/335022907/Overtrading.zip
cheers
Francisco |
|
| Author |
RE: Filling database table field from ListBoxes |
yw
Administrator
Posts: 670
Location: ***
Joined: 23.06.05 |
| Posted on 14-01-2010 17:23 |
|
|
|
I am still trying to download from rapidshare. For free user, it needs several hours to download, depending how luck a download slot becomes available. |
|
| Author |
RE: Filling database table field from ListBoxes |
yw
Administrator
Posts: 670
Location: ***
Joined: 23.06.05 |
| Posted on 14-01-2010 17:47 |
|
|
|
I downloaded your project. It works fine on my computer. Have you tried close Limnor Studio and re-start it? Or re-boot your computer to see if it was caused by some corrupted memory? |
|
| 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 10:19 |
|
|
You are right. After rebooting I can delete/edit performers and actions.  |
|