Recent

Author Topic: [solved] Data-aware help /tutorial  (Read 2337 times)

Pascaluvr

  • Full Member
  • ***
  • Posts: 216
[solved] Data-aware help /tutorial
« on: April 01, 2013, 04:22:35 am »
Still a newbie  ...  but i have managed to create my own sqlite database and tables  - using dbgrid as a data-aware component to display the contents  ........   I am impressed   ... lol  ...   with Lazarus capabilities   .. and the fact i managed to do this  -   the lazarus DB tutorials were great.

My application would ideally display data retrieved from the web (and stored in a DB), mostly in statictext, listview(for tables) and a few calculated fields.  But I'm not looking for update capability.

Is there a tutorial that would lead me thru including the data-aware components in a form?


Thanks in advance


(ooohhh   generic question....   but: Windows 7, Lazarus 1.0.6





« Last Edit: April 04, 2013, 07:08:58 am by Pascaluvr »
Windows 7, Lazarus 1.0.8, FPC 2.6.2, SQLite 3

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Data-aware help /tutorial
« Reply #1 on: April 03, 2013, 08:14:22 am »
If you want through sqldb tutorial1 and 2, what new tutorial would you need?

Just add the db aware components you need to the form and set their datasource property.

Or am I missing something in your question? Could you be a bit more precise?

PS: Thanks for mentioning your versions ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Pascaluvr

  • Full Member
  • ***
  • Posts: 216
Re: Data-aware help /tutorial
« Reply #2 on: April 03, 2013, 10:31:29 am »
ok .....  and thanks big chimp....   i think its more some concepts i am missing...

with my first project (following Tuts 1 & 2) i managed to link a dbgrid and display the results of a 'select'.  That was great.

Problem i have is that i have many tables - and maybe because of the display of some tables...  i will want to select additional info in other tables and expand the display with that info.  It seems that I cant keep multiple datasources .. or am i missing something?   so how do i (easy example) display say, customer info, and then click 'orders' - without losing the cust info details? and then click - say - invoice details ....  and still retain customer info.   

Is it an sql function i'm missing, or something in Lazarus.

Without Data-aware , i can do this .. its HOW to do it WITH data aware 

Thanks for any suggestions
Windows 7, Lazarus 1.0.8, FPC 2.6.2, SQLite 3

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Data-aware help /tutorial
« Reply #3 on: April 03, 2013, 11:19:54 am »
Problem i have is that i have many tables - and maybe because of the display of some tables...  i will want to select additional info in other tables and expand the display with that info.  It seems that I cant keep multiple datasources .. or am i missing something?   

You can have multiple datasources. Bind each datasource to a different query.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Pascaluvr

  • Full Member
  • ***
  • Posts: 216
Re: Data-aware help /tutorial
« Reply #4 on: April 04, 2013, 07:08:25 am »
thanks Big Chimp....  i feel like an idiot...   the penny finally dropped.

I think i was looking for a complicated solution when the easy one was right there.

thank you
Windows 7, Lazarus 1.0.8, FPC 2.6.2, SQLite 3