Click here to Skip to main content
15,889,849 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Label are cut off on some computers Pin
dptalt22-Nov-06 6:55
dptalt22-Nov-06 6:55 
GeneralRe: Label are cut off on some computers Pin
Dave Kreskowiak22-Nov-06 8:21
mveDave Kreskowiak22-Nov-06 8:21 
QuestionHow to know the state of remote computer Pin
farhan6821-Nov-06 2:10
farhan6821-Nov-06 2:10 
AnswerRe: How to know the state of remote computer Pin
Dave Kreskowiak21-Nov-06 4:57
mveDave Kreskowiak21-Nov-06 4:57 
QuestionHow to load the form in a maximized way. Pin
ashwath197921-Nov-06 2:01
ashwath197921-Nov-06 2:01 
AnswerRe: How to load the form in a maximized way. Pin
Tamimi - Code21-Nov-06 2:06
Tamimi - Code21-Nov-06 2:06 
GeneralRe: How to load the form in a maximized way. Pin
ashwath197921-Nov-06 2:25
ashwath197921-Nov-06 2:25 
QuestionHelp on Datasets Pin
Pete Newman20-Nov-06 23:27
Pete Newman20-Nov-06 23:27 
running vb.net 2005 & sql 2005

Ive been trying to add what seemed a simple table to a form ... only three four fields plus an update and cancel button

I managed to ( from samples ) add an OleDbConnection connecton, a OleDbDataAdapter complete with select and update commands and a dataset . From previous samples ( win 2003 dataform ) i have the four text boxex reporting back the data from the dataset ... Stage 1 complete. now here is where i was comming a cropper, when trying to update the table i used the following commands



Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Try
'Attempt to update the datasource.
Me.UpdateDataSet()
MsgBox(" Update sucessful")
Catch eUpdate As System.Exception
'Add your error handling code here.
'Display error message, if any.
System.Windows.Forms.MessageBox.Show(eUpdate.Message)
End Try
End Sub

Public Sub UpdateDataSet()
'Create a new dataset to hold the changes that have been made to the main dataset.
Dim objDataSetChanges As Boss.net.DebBacsFmDestAccs = New Boss.net.DebBacsFmDestAccs
'Stop any current edits.
Me.BindingContext(DebBacsFMDestAccounts1, "DebBacsFmDestAccs").EndCurrentEdit()
'Get the changes that have been made to the main dataset.
objDataSetChanges = CType(DebBacsFMDestAccounts1.GetChanges, Boss.net.DebBacsFmDestAccs)
'Check to see if any changes have been made.
If (Not (objDataSetChanges) Is Nothing) Then
Try
'There are changes that need to be made, so attempt to update the datasource by
'calling the update method and passing the dataset and any parameters.
Me.UpdateDataSource(objDataSetChanges)
DebBacsFMDestAccounts1.Merge(objDataSetChanges)
DebBacsFMDestAccounts1.AcceptChanges()
Catch eUpdate As System.Exception
'Add your error handling code here.
Throw eUpdate
End Try
'Add your code to check the returned dataset for any errors that may have been
'pushed into the row object's error.
End If

End Sub


Public Sub UpdateDataSource(ByVal ChangedRows As Boss.net.DebBacsFmDestAccs)
Try
'The data source only needs to be updated if there are changes pending.
If (Not (ChangedRows) Is Nothing) Then
'Open the connection.
Me.OleDbConnection1.Open()
'Attempt to update the data source.
OleDbDataAdapter1.Update(ChangedRows)
End If
Catch updateException As System.Exception
'Add your error handling code here.
Throw updateException
Finally
'Close the connection whether or not the exception was thrown.
Me.OleDbConnection1.Close()
End Try

End Sub


The eupdate throws the following error
"Child list for field DebBacsFmDestAccs cannot be created"

Im at a loss as to what to do now, please can anybody help


I really do need help..... all this computer stuff is way over my head !!
QuestionHow to BindingData to RadioButton Pin
kindman_nb20-Nov-06 23:17
kindman_nb20-Nov-06 23:17 
AnswerNo one tried to aid me << my project is sopped Pin
kindman_nb21-Nov-06 3:37
kindman_nb21-Nov-06 3:37 
GeneralRe: No one tried to aid me << my project is sopped Pin
Kevin Nicol21-Nov-06 3:46
Kevin Nicol21-Nov-06 3:46 
GeneralRe: No one tried to aid me << my project is sopped Pin
kindman_nb21-Nov-06 3:56
kindman_nb21-Nov-06 3:56 
AnswerRe: No one tried to aid me << my project is sopped Pin
Kevin Nicol21-Nov-06 4:04
Kevin Nicol21-Nov-06 4:04 
GeneralRe: No one tried to aid me << my project is sopped Pin
kindman_nb21-Nov-06 4:11
kindman_nb21-Nov-06 4:11 
AnswerRe: No one tried to aid me << my project is sopped Pin
Kevin Nicol21-Nov-06 7:48
Kevin Nicol21-Nov-06 7:48 
Questionvb.net Pin
saju sandeep samuel20-Nov-06 23:00
saju sandeep samuel20-Nov-06 23:00 
AnswerRe: vb.net Pin
Christian Graus20-Nov-06 23:20
protectorChristian Graus20-Nov-06 23:20 
AnswerRe: vb.net Pin
jsampsonPC22-Nov-06 10:11
jsampsonPC22-Nov-06 10:11 
Questionvb.net Pin
saju sandeep samuel20-Nov-06 22:59
saju sandeep samuel20-Nov-06 22:59 
AnswerRe: vb.net Pin
jsampsonPC21-Nov-06 11:36
jsampsonPC21-Nov-06 11:36 
QuestionChange systemdate in vb.net Pin
kavithapuranik20-Nov-06 22:29
kavithapuranik20-Nov-06 22:29 
AnswerRe: Change systemdate in vb.net Pin
Steven J Jowett22-Nov-06 23:22
Steven J Jowett22-Nov-06 23:22 
Questiontoolbar control in vb 6.0 Pin
bony_baba20-Nov-06 20:58
bony_baba20-Nov-06 20:58 
QuestionMenu Colour Pin
Tj.20-Nov-06 20:48
Tj.20-Nov-06 20:48 
AnswerRe: Menu Colour Pin
jsampsonPC22-Nov-06 10:06
jsampsonPC22-Nov-06 10:06 

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.