|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Newbie and 2005 ConcurrecnyHope you all fine? Can I ask you all a quick question? I`ve been trying to get concurrency to work for my project in VB2005. I have the following code, which to be fair i`ve got so lost with but here it is: Private Sub BTADSL_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.MasterDBDataSet.EnforceConstraints = False Me.M_BTAnalogueLinesTableAdapter.Fill(Me.MasterDBDataSet.M_BTAnalogueLines) Me.S_LocationsTableAdapter.Fill(Me.MasterDBDataSet.S_Locations) Me.M_BTADSLTableAdapter.Fill(Me.MasterDBDataSet.M_BTADSL) 'USERS M_BTADSLDataGridView.DataSource = MasterDBDataSet.M_BTADSL BTAnalougeLinesIDcomboBox.DataBindings.Add("TEXT", MasterDBDataSet.M_BTADSL.BTAnalougeLinesIDColumn, "TelephoneNumber") BTAnalougeLinesIDcomboBox.DataSource = MasterDBDataSet.M_BTADSL BTAnalougeLinesIDcomboBox.DisplayMember = "M_BTADSL.S_Locations.TelephoneNumber" BTAnalougeLinesIDcomboBox.ValueMember = "M_BTADSL.BTAnalougeLinesID" LocationsIDcomboBox.DataBindings.Add("TEXT", MasterDBDataSet.M_BTADSL.LocationsIDColumn, "Location") Dim cmBTADSL As CurrencyManager cmBTADSL = Me.BindingContext(MasterDBDataSet, "BTADSL") cmBTADSL = DirectCast(BindingContext(MasterDBDataSet.M_BTADSL), CurrencyManager) 'USER Im so confused with the concurrency thing i just don`t know where to go now. Could anybody have a look and tell me what a mess i`ve made and how to solve it? If poss maybe some links? Many Thanks A very Comfused Newbie Hi,
First you have to know what you are after Concurrency handling is, it is the handling of data which is retrieved from a database in the same time on two places and from which is tried to use them both to update the original database. This checking is done in a disconected datastructure what ADONET is in the update. The Currencymanager handles the current handled datarow in a datatable. Where are you after? Cor Show quoteHide quote "Oh-its-all-gone-wrong" <t***@test.com> schreef in bericht news:%23TwrZyUwGHA.4956@TK2MSFTNGP04.phx.gbl... > Hi All, > > Hope you all fine? Can I ask you all a quick question? I`ve been trying to > get concurrency to work for my project in VB2005. I have the following > code, which to be fair i`ve got so lost with but here it is: > > Private Sub BTADSL_Load(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles MyBase.Load > Me.MasterDBDataSet.EnforceConstraints = False > Me.M_BTAnalogueLinesTableAdapter.Fill(Me.MasterDBDataSet.M_BTAnalogueLines) > Me.S_LocationsTableAdapter.Fill(Me.MasterDBDataSet.S_Locations) > Me.M_BTADSLTableAdapter.Fill(Me.MasterDBDataSet.M_BTADSL) > > 'USERS > M_BTADSLDataGridView.DataSource = MasterDBDataSet.M_BTADSL > BTAnalougeLinesIDcomboBox.DataBindings.Add("TEXT", > MasterDBDataSet.M_BTADSL.BTAnalougeLinesIDColumn, "TelephoneNumber") > BTAnalougeLinesIDcomboBox.DataSource = MasterDBDataSet.M_BTADSL > BTAnalougeLinesIDcomboBox.DisplayMember = > "M_BTADSL.S_Locations.TelephoneNumber" > BTAnalougeLinesIDcomboBox.ValueMember = "M_BTADSL.BTAnalougeLinesID" > LocationsIDcomboBox.DataBindings.Add("TEXT", > MasterDBDataSet.M_BTADSL.LocationsIDColumn, "Location") > Dim cmBTADSL As CurrencyManager > cmBTADSL = Me.BindingContext(MasterDBDataSet, "BTADSL") > cmBTADSL = DirectCast(BindingContext(MasterDBDataSet.M_BTADSL), > CurrencyManager) > 'USER > > Im so confused with the concurrency thing i just don`t know where to go > now. Could anybody have a look and tell me what a mess i`ve made and how > to solve it? If poss maybe some links? > > Many Thanks > A very Comfused Newbie > Hi there Cor,
I have on my form a Datagrid and also a ComboBox. I would like the ComboBox to change to show the right thing from when i select my row in the datagrid, if that makes sense? i.e I have my Locations as: Watford Carlise Edingbrough Chester Leeds When I select a row in my table, i would like the Combo Box to change to the relivant Location. Many Thanks Again Si Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:u2M7p1UwGHA.3420@TK2MSFTNGP06.phx.gbl... > Hi, > > First you have to know what you are after > > Concurrency handling is, it is the handling of data which is retrieved > from a database in the same time on two places and from which is tried to > use them both to update the original database. This checking is done in a > disconected datastructure what ADONET is in the update. > > The Currencymanager handles the current handled datarow in a datatable. > > Where are you after? > > Cor > > "Oh-its-all-gone-wrong" <t***@test.com> schreef in bericht > news:%23TwrZyUwGHA.4956@TK2MSFTNGP04.phx.gbl... >> Hi All, >> >> Hope you all fine? Can I ask you all a quick question? I`ve been trying >> to get concurrency to work for my project in VB2005. I have the following >> code, which to be fair i`ve got so lost with but here it is: >> >> Private Sub BTADSL_Load(ByVal sender As System.Object, ByVal e As >> System.EventArgs) Handles MyBase.Load >> Me.MasterDBDataSet.EnforceConstraints = False >> Me.M_BTAnalogueLinesTableAdapter.Fill(Me.MasterDBDataSet.M_BTAnalogueLines) >> Me.S_LocationsTableAdapter.Fill(Me.MasterDBDataSet.S_Locations) >> Me.M_BTADSLTableAdapter.Fill(Me.MasterDBDataSet.M_BTADSL) >> >> 'USERS >> M_BTADSLDataGridView.DataSource = MasterDBDataSet.M_BTADSL >> BTAnalougeLinesIDcomboBox.DataBindings.Add("TEXT", >> MasterDBDataSet.M_BTADSL.BTAnalougeLinesIDColumn, "TelephoneNumber") >> BTAnalougeLinesIDcomboBox.DataSource = MasterDBDataSet.M_BTADSL >> BTAnalougeLinesIDcomboBox.DisplayMember = >> "M_BTADSL.S_Locations.TelephoneNumber" >> BTAnalougeLinesIDcomboBox.ValueMember = "M_BTADSL.BTAnalougeLinesID" >> LocationsIDcomboBox.DataBindings.Add("TEXT", >> MasterDBDataSet.M_BTADSL.LocationsIDColumn, "Location") >> Dim cmBTADSL As CurrencyManager >> cmBTADSL = Me.BindingContext(MasterDBDataSet, "BTADSL") >> cmBTADSL = DirectCast(BindingContext(MasterDBDataSet.M_BTADSL), >> CurrencyManager) >> 'USER >> >> Im so confused with the concurrency thing i just don`t know where to go >> now. Could anybody have a look and tell me what a mess i`ve made and how >> to solve it? If poss maybe some links? >> >> Many Thanks >> A very Comfused Newbie >> > > Si,
Something as this? It is an old sample, so try it, if it does not work, that reply '\\datagrid sample with combobox outside 'needs a datagrid, a combobox and two buttons on a form 'to start do the button create ds and cancel and a dataset will be created Private Sub Form1_Load(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles MyBase.Load Dim ds As New DataSet("Test") Dim dtName As New DataTable("Names") Dim dcIdName As New DataColumn("IdName") Dim dcName As New DataColumn("Name") Dim dcCountryN As New DataColumn("Country") dtName.Columns.Add(dcIdName) dtName.Columns.Add(dcName) dtName.Columns.Add(dcCountryN) ds.Tables.Add(dtName) dtName.LoadDataRow(New Object() {"0", "Herfried K. Wagner", "Austria"}, True) dtName.LoadDataRow(New Object() {"1", "Cor Ligthert", "Holland"}, True) dtName.LoadDataRow(New Object() {"2", "Armin Zingler", "Germany"}, True) dtName.LoadDataRow(New Object() {"3", "Ken Tucker", "Florida"}, True) dtName.LoadDataRow(New Object() {"4", "Jay B. Harlow", "New York"}, True) dtName.LoadDataRow(New Object() {"5", "Terry Burns", "England"}, True) Dim dtCountry As New DataTable("Countries") dtCountry.Columns.Add("Country") dtCountry.Columns.Add("IdCountry") dtCountry.LoadDataRow(New Object() {"0", "Austria"}, True) dtCountry.LoadDataRow(New Object() {"1", "Germany"}, True) dtCountry.LoadDataRow(New Object() {"2", "Holland"}, True) dtCountry.LoadDataRow(New Object() {"3", "Nevada"}, True) dtCountry.LoadDataRow(New Object() {"4", "Florida"}, True) dtCountry.LoadDataRow(New Object() {"5", "England"}, True) ds.Tables.Add(dtCountry) Dim dv As DataView = New DataView(ds.Tables(0)) dv.AllowNew = False DataGrid1.DataSource = dv ComboBox1.DataSource = ds.Tables(1).DefaultView ComboBox1.ValueMember = "IdCountry" ComboBox1.DisplayMember = "Country" ComboBox1.DataBindings.Add(New Binding("SelectedValue", dv, "Country")) End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender _ As Object, ByVal e As System.EventArgs) _ Handles ComboBox1.SelectedIndexChanged Me.BindingContext(DataGrid1.DataSource).EndCurrentEdit() End Sub End Class /// I hope this helps a little bit? Cor Show quoteHide quote "Oh-its-all-gone-wrong" <t***@test.com> schreef in bericht news:uGnvkWgwGHA.3420@TK2MSFTNGP04.phx.gbl... > Hi there Cor, > > I have on my form a Datagrid and also a ComboBox. I would like the > ComboBox to change to show the right thing from when i select my row in > the datagrid, if that makes sense? > > i.e I have my Locations as: > > Watford > Carlise > Edingbrough > Chester > Leeds > > When I select a row in my table, i would like the Combo Box to change to > the relivant Location. > > Many Thanks Again > Si > > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message > news:u2M7p1UwGHA.3420@TK2MSFTNGP06.phx.gbl... >> Hi, >> >> First you have to know what you are after >> >> Concurrency handling is, it is the handling of data which is retrieved >> from a database in the same time on two places and from which is tried to >> use them both to update the original database. This checking is done in a >> disconected datastructure what ADONET is in the update. >> >> The Currencymanager handles the current handled datarow in a datatable. >> >> Where are you after? >> >> Cor >> >> "Oh-its-all-gone-wrong" <t***@test.com> schreef in bericht >> news:%23TwrZyUwGHA.4956@TK2MSFTNGP04.phx.gbl... >>> Hi All, >>> >>> Hope you all fine? Can I ask you all a quick question? I`ve been trying >>> to get concurrency to work for my project in VB2005. I have the >>> following code, which to be fair i`ve got so lost with but here it is: >>> >>> Private Sub BTADSL_Load(ByVal sender As System.Object, ByVal e As >>> System.EventArgs) Handles MyBase.Load >>> Me.MasterDBDataSet.EnforceConstraints = False >>> Me.M_BTAnalogueLinesTableAdapter.Fill(Me.MasterDBDataSet.M_BTAnalogueLines) >>> Me.S_LocationsTableAdapter.Fill(Me.MasterDBDataSet.S_Locations) >>> Me.M_BTADSLTableAdapter.Fill(Me.MasterDBDataSet.M_BTADSL) >>> >>> 'USERS >>> M_BTADSLDataGridView.DataSource = MasterDBDataSet.M_BTADSL >>> BTAnalougeLinesIDcomboBox.DataBindings.Add("TEXT", >>> MasterDBDataSet.M_BTADSL.BTAnalougeLinesIDColumn, "TelephoneNumber") >>> BTAnalougeLinesIDcomboBox.DataSource = MasterDBDataSet.M_BTADSL >>> BTAnalougeLinesIDcomboBox.DisplayMember = >>> "M_BTADSL.S_Locations.TelephoneNumber" >>> BTAnalougeLinesIDcomboBox.ValueMember = "M_BTADSL.BTAnalougeLinesID" >>> LocationsIDcomboBox.DataBindings.Add("TEXT", >>> MasterDBDataSet.M_BTADSL.LocationsIDColumn, "Location") >>> Dim cmBTADSL As CurrencyManager >>> cmBTADSL = Me.BindingContext(MasterDBDataSet, "BTADSL") >>> cmBTADSL = DirectCast(BindingContext(MasterDBDataSet.M_BTADSL), >>> CurrencyManager) >>> 'USER >>> >>> Im so confused with the concurrency thing i just don`t know where to go >>> now. Could anybody have a look and tell me what a mess i`ve made and how >>> to solve it? If poss maybe some links? >>> >>> Many Thanks >>> A very Comfused Newbie >>> >> >> > >
VB.NET Express speed issue
To overload, or not to overload? ANN: VS.NET 2003 SP1 Memory Usange In VB.NET Serial Port Communuciation in VB with Compact Framework 2.0 Capturing the second column data from a list view box. create a folder useing vb code? Desktop Application Culture Setting Control.Visble = True ERROR Automaticaly Clicking a Checkbox on a webbrowser control |
|||||||||||||||||||||||