Click here to Skip to main content
15,887,683 members
Home / Discussions / Database
   

Database

 
QuestionHow to serialize the database (SQL Server) Pin
oohungoo26-Feb-05 15:18
oohungoo26-Feb-05 15:18 
QuestionCan I create an Access type database from ADO/C# .NET? Pin
MitchellBaldwin26-Feb-05 6:07
MitchellBaldwin26-Feb-05 6:07 
AnswerRe: Can I create an Access type database from ADO/C# .NET? Pin
Mike Ellison26-Feb-05 8:09
Mike Ellison26-Feb-05 8:09 
AnswerRe: Can I create an Access type database from ADO/C# .NET? Pin
Mike Ellison26-Feb-05 8:13
Mike Ellison26-Feb-05 8:13 
GeneralRe: Can I create an Access type database from ADO/C# .NET? Pin
MitchellBaldwin26-Feb-05 10:53
MitchellBaldwin26-Feb-05 10:53 
GeneralPopulating textbox(s) from Column(s) Pin
WindSailor25-Feb-05 14:04
WindSailor25-Feb-05 14:04 
GeneralRe: Populating textbox(s) from Column(s) Pin
numbrel26-Feb-05 4:20
numbrel26-Feb-05 4:20 
GeneralRe: Populating textbox(s) from Column(s) Pin
WindSailor28-Feb-05 23:38
WindSailor28-Feb-05 23:38 
Thanks!
DataSet2 was a lookup table for DataSet1 or for the form I was working on, I actually have 17 different lookup tables integrated into this form. Busy, yes.

I included your suggestions and made changes on some of the items...
I needed to change the DataBindings to retrieve the value of the LookUp Column and then save that value to the original Table and Column that the form was built on.

In your code:
1) Dim bmbName As BindingManagerBase 'before the Form Designer generated code

2) bmbName = Me.BindingContext(DsName1, "TableName") 'after the dataset's been filled

2a) NOTE: I actually changed it to:
bmbName = Me.BindingContext(YourLookUpDataSet,"YourLookUpTableName")
'after the DataSet's been filled

3) Private Sub cboName_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboName.SelectedIndexChanged

Dim ThisVariable1 As Double

Me.TextBox2.DataBindings.Clear()'Databinding was originally done on the _
'property settings of TextBox2 so I could scroll through records.

bmbName.Position = cboName.SelectedIndex

Me.TextBox2.DataBindings.Add(New Binding _
("Text",YourLookUpDataSet, "YourLookUpTableName.YourLookUpColumnName"))

ThisVariable1 = Me.TextBox2.Text

Me.TextBox2.DataBindings.Clear()

Me.TextBox2.DataBindings.Add(New Binding _
("Text", YourOriginalDataSet, "OriginalTable.OriginalColumn"))
'reset to your original DataBinding.

Me.TextBox2.Text = ThisVariable1

ThisVariable1 = 1 'Setting default value for that column

Me.BindingContext(YourDataSetName, "YourTable").EndCurrentEdit()
YourDataAdapter.Update(YourDataSetName, "YourTable")

End Sub

This does work for me, I hope this is what you were talking about... if not please expand on it.

Thanks again,
Windsailor
GeneralRe: Populating textbox(s) from Column(s) Pin
numbrel1-Mar-05 3:53
numbrel1-Mar-05 3:53 
GeneralDatabase paging Pin
grea faflj25-Feb-05 5:49
grea faflj25-Feb-05 5:49 
GeneralRe: Database paging Pin
Jon Sagara25-Feb-05 7:02
Jon Sagara25-Feb-05 7:02 
GeneralSQL2000 RS Clarification Pin
mysorian25-Feb-05 3:28
professionalmysorian25-Feb-05 3:28 
GeneralADO.NET dataset w/o database Pin
scion780925-Feb-05 3:17
scion780925-Feb-05 3:17 
GeneralRe: ADO.NET dataset w/o database Pin
MitchellBaldwin25-Feb-05 9:52
MitchellBaldwin25-Feb-05 9:52 
GeneralRe: ADO.NET dataset w/o database Pin
Anonymous28-Feb-05 4:44
Anonymous28-Feb-05 4:44 
GeneralSUM evaluating to NULL Pin
Rhys Gravell25-Feb-05 2:37
professionalRhys Gravell25-Feb-05 2:37 
GeneralRe: SUM evaluating to NULL Pin
Rhys Gravell25-Feb-05 3:26
professionalRhys Gravell25-Feb-05 3:26 
GeneralRe: SUM evaluating to NULL Pin
Anonymous25-Feb-05 14:29
Anonymous25-Feb-05 14:29 
GeneralRe: SUM evaluating to NULL Pin
Anonymous25-Feb-05 20:50
Anonymous25-Feb-05 20:50 
GeneralRe: SUM evaluating to NULL Pin
keepsmile25-Feb-05 23:12
keepsmile25-Feb-05 23:12 
GeneralSQL server problem (authetication) Pin
Anonymous24-Feb-05 23:40
Anonymous24-Feb-05 23:40 
Questionexec @SqlString ???? Pin
boruu24-Feb-05 21:19
boruu24-Feb-05 21:19 
AnswerRe: exec @SqlString ???? Pin
Colin Angus Mackay24-Feb-05 22:40
Colin Angus Mackay24-Feb-05 22:40 
GeneralRe: exec @SqlString ???? Pin
boruu24-Feb-05 22:59
boruu24-Feb-05 22:59 
GeneralData Access Design Pattern: OR Mapping tools Pin
devvvy24-Feb-05 20:14
devvvy24-Feb-05 20:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.