Thanks, I'll take a look at TDBGrid... I just wish there were more code snippets floating around online.
I guess I've been spoiled with vb.net, having MSDN, stackoverflow.com, sundry forums and blogs - so many people chipping in to the public knowledgebase. I hope more Laz/FPC/OP code examples get onto the net for people to crib from.
For instance, in vb.net I can connect to an MS-SQL server and show a SQL query results table as easily as this, having added a DataGridView control to the form :
Dim sqlConnection As New SqlClient.SqlConnection("server=TESTSERVER; database=TESTDB; Integrated Security=SSPI")
Dim sqlAdapter As New SqlClient.SqlDataAdapter("SELECT * from TestTable", sqlConnection)
Dim sqlDataTable As New DataTable
sqlAdapter.Fill(sqlDataTable)
' fill in the grid and tweak some appearances ...
DataGridView1.DataSource = sqlDataTable
DataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.Lavender
DataGridView1.Columns(2).DefaultCellStyle.Format = "dd.MM.yyyy"I found all that from online searches, and verified for myself that it worked, well within one working day.
With Lazarus, I'm still searching and scratching my head!
Would anyone
please care to be a star and translate the above into Lazarus-speak?
