Database manipulation in code

glenn22

New member
Joined
Jun 9, 2007
Messages
4
Programming Experience
5-10
I am fairly new to visual studio and am finding the interface a bit difficult to understand. I am used to coding in a text editor.

I am making a windows application with database connectivity. What I am trying to do is when the user hits the button I've created the program will connect to the database and get values to update labels on the form.... I can't figure out how to do this. It's so easy to do for web apps, but I can't figure out visual studio.
 
Have you tried Databinding?

Link
 
Also try

(DW2 fron cjard's Sig)
Link
 
I am using databinding already for the dropdown which allows the user to select the database table that I want to use for updating the previous form... but what I'm looking for is a way to select values from a database row using the value of the combobox the user selected, and then set those labels to the database values in code... I know there must be a fairly simple way of doing this, it's super easy in ASP....
 
I know I am totally off base with what I'm doing, but my code looks like the following:

VB.NET:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Form1.rowlabel1.DataBindings.Add("text", CutCountDataSet.DataTable1, "row1", True, DataSourceUpdateMode.OnPropertyChanged)
        Form1.rowlabel1.Refresh()

    End Sub

is this even close to right? it doesn't work, the label remains with the default text...
 
Back
Top