|
For recorded rows, the best way is to add automatically numbered fields when designing the database
Text1.Text = ado1.recordset.fields("Auto-numbered fields")
Also, if you want to get the value of the selected record,
Text1.Text = DBGrid1.Columns(0)
Text2.Text = DBGrid1.Columns(1)
Connected to the database, that's it
Text1.Text = ado1.recordset.fields("Fields")
PS: Don't use the old things like DBGrid... how troublesome, there are so many problems
It is better to use datagrid, if possible, change to other ones.... |
|