Seeking understanding

Seeking understanding

Postby meshael » Wed 18 Jan 2012 19:30

Like one of the other posters here, I am trying to learn how to use the dbExpress driver for SQLite.

I have the TSQLConnection on my form, I have created a database manually called clients with 5 fields per record.

How do I connect this connection to a DataSource or Dataset so that I can link the edit and string list components on the form to the database I have created.

Thanks!

Robert
meshael
 
Posts: 2
Joined: Wed 18 Jan 2012 19:18

Postby AlexP » Thu 19 Jan 2012 11:23

Hello,

For work with DataSet (data editing), you can use the following components binding

SQLConnection<-SimpleDataSet<-DataSource<-DBGrid

or

SQLConnection<-SQLQuery<-DataSetProvider<-ClientDataSet<-DataSource<-DBGrid

You can find the work examples in the ...\Devart\Dbx\SQLite\Demos\ folder
AlexP
Devart Team
 
Posts: 5528
Joined: Tue 10 Aug 2010 11:35

and what about Firemonkey

Postby meshael » Thu 26 Jan 2012 18:40

Thanks Alex for this clear explanation of the connections.

So now, I want to connect my data to Listbox, edit and graphic controls on the form, and this is with Firemonkey.

Can you tell me how this is done? I do not understand the relationship between the datasource and these controls.

Thanks,

Robert
meshael
 
Posts: 2
Joined: Wed 18 Jan 2012 19:18

Postby AlexP » Fri 27 Jan 2012 09:09

Hello,

For mapping data from DataSet in the standart components of the FieMonkey application, you should use LiveBinding. The LiveBinding samples can be find in the folder with demo samples distributed together with Rad Studio.

SQLConnection<-SQLQuery<-DataSetProvider<-ClientDataSet<-DataSource<-TEdit

After correct tunning of connection and DataSet, you can specify the field, from which TEdit will retrieve data with the help of the context menu TEdit->ContextMenu->Link To DB Field->, and choose the necessary field.
The LiveBinding components will be added and tunned automatically
AlexP
Devart Team
 
Posts: 5528
Joined: Tue 10 Aug 2010 11:35


Return to dbExpress driver for SQLite