Sql compact edition edit records in textbox

RonR

Well-known member
Joined
Nov 23, 2007
Messages
82
Programming Experience
5-10
I can open A Sql Compact Edition database and load a datagrid but I would like to find out how to display records for edit without using the datagrid. could someone point me in the right direction??

I would like to edit the record in textboxes.
 
Are you familiar with/comforatble with writing SQL queries?

I use a listview which I populate with a SQL SELECT query.

Then, when an entry is selected from the listview, I populate textboxes with it. The editing is done in the textboxes.

My save button runs an UPDATE query which saves the changes I've made to the record, then re-runs the initial SELECT query so that my changes also show up in my Listview.
 
I can open A Sql Compact Edition database and load a datagrid but I would like to find out how to display records for edit without using the datagrid. could someone point me in the right direction??

I would like to edit the record in textboxes.

Hopefully the method you go through for getting data into the grid is the one as described in the DW2 link in my signature, section "Creating a Simple Data App"
In summary: you add a dataset, add tables to it, then drag an entry to your form, from the Data Sources window

If this isnt how you do it, go read the DW2 link now that I mentioned above.

After doing this in this way, before you drag from DataSources to the form, drop down the entry that has the grid icon, and change it to [Details]
Now when you drag to the form, VB will create as many text boxes as there are columns, and bind them all properly for you. You can also drag individual ones by expanding the data sources tree further

Here. A picture and an article tells thousands more words then I'll write:

Data Sources Window
 
Are you familiar with/comforatble with writing SQL queries?

I use a listview which I populate with a SQL SELECT query.

Then, when an entry is selected from the listview, I populate textboxes with it. The editing is done in the textboxes.

My save button runs an UPDATE query which saves the changes I've made to the record, then re-runs the initial SELECT query so that my changes also show up in my Listview.

"I remember back in the '80s.."
 
Back
Top