Click here to Skip to main content
15,892,059 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionpdf to html Pin
karthidheena8-Oct-07 19:38
karthidheena8-Oct-07 19:38 
AnswerRe: pdf to html Pin
Dave Kreskowiak9-Oct-07 1:49
mveDave Kreskowiak9-Oct-07 1:49 
Questionhow can I convert lower case into upper case alphabats in textboxes for web applications Pin
Ashish Kumar Vyas8-Oct-07 18:55
Ashish Kumar Vyas8-Oct-07 18:55 
AnswerRe: how can I convert lower case into upper case alphabats in textboxes for web applications Pin
nishkarsh_k8-Oct-07 19:58
nishkarsh_k8-Oct-07 19:58 
AnswerRe: how can I convert lower case into upper case alphabats in textboxes for web applications Pin
Dave Kreskowiak9-Oct-07 1:53
mveDave Kreskowiak9-Oct-07 1:53 
QuestionLicense of MsFlexGrid ocx in Vb 5005 Pin
nishkarsh_k8-Oct-07 18:35
nishkarsh_k8-Oct-07 18:35 
AnswerRe: License of MsFlexGrid ocx in Vb 5005 Pin
Dave Kreskowiak9-Oct-07 1:50
mveDave Kreskowiak9-Oct-07 1:50 
QuestionPlease Help.. Update MS Access using DataGridView in VB2005 Pin
vbDigger'z8-Oct-07 17:51
vbDigger'z8-Oct-07 17:51 
Please Help.. Update MS Access using DataGridView in VB2005

I've seen so many post and tutorial about this subject.. and they are all most the same code logic and many of them appreciate it because it works for them?.. on form load the records load smoothly and it works but when everytime datagridview/datasets committ changes and i tyr to update the record and i always got an ERROR like this..

System.InvalidOperationException: Update requires a valid UpdateCommand when passed DataRow collection with modified rows.
at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet)
at Employee_System.Form1.btnUpdate_Click(Object sender, EventArgs e) in C:\Employee_System\Form1.vb:line 31


****************
Here's my Code just like most of the forum i've visited
Please anyone who had a good heart to help me with this difficulties..
Please...
********************

Imports System.Data.OleDb

Public Class Form1

Dim theOleDbCommand As New OleDbCommand()

Dim theOleDbDataAdapter As New OleDbDataAdapter(theOleDbCommand)

Dim theDataSet As New DataSet()

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Me.theOleDbCommand = New OleDbCommand("SELECT * FROM SampleTable", New OleDbConnection(dbConnectionString))
Me.theOleDbDataAdapter = New OleDbDataAdapter(Me.theOleDbCommand)
Me.theDataSet = New DataSet()

Me.theOleDbCommand.Connection.Open()
Me.theOleDbDataAdapter.Fill(Me.theDataSet)
Me.theOleDbCommand.Connection.Close()

Me.DataGridView1.DataSource = Me.theDataSet.Tables(0).DefaultView
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Sub

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Try
Me.theOleDbCommand.Connection.Open()

Me.theOleDbDataAdapter.Update(Me.theDataSet)

Me.theOleDbCommand.Connection.Close()

Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Sub
End Class
AnswerRe: Please Help.. Update MS Access using DataGridView in VB2005 Pin
Dave Kreskowiak8-Oct-07 17:58
mveDave Kreskowiak8-Oct-07 17:58 
GeneralRe: Please Help.. Update MS Access using DataGridView in VB2005 Pin
vbDigger'z8-Oct-07 18:36
vbDigger'z8-Oct-07 18:36 
GeneralRe: Please Help.. Update MS Access using DataGridView in VB2005 Pin
vbDigger'z8-Oct-07 19:43
vbDigger'z8-Oct-07 19:43 
GeneralRe: Please Help.. Update MS Access using DataGridView in VB2005 Pin
Dave Kreskowiak9-Oct-07 1:51
mveDave Kreskowiak9-Oct-07 1:51 
GeneralRe: Please Help.. Update MS Access using DataGridView in VB2005 Pin
vbDigger'z9-Oct-07 15:57
vbDigger'z9-Oct-07 15:57 
QuestionWant To Make My Software as Trial Version [modified] Pin
aarti838-Oct-07 16:50
aarti838-Oct-07 16:50 
AnswerRe: Want To Make My Software as Trial Version Pin
Dave Kreskowiak8-Oct-07 17:53
mveDave Kreskowiak8-Oct-07 17:53 
Questionreport ini vb.net Pin
di3.ny288-Oct-07 15:56
di3.ny288-Oct-07 15:56 
AnswerRe: report ini vb.net Pin
Dave Kreskowiak8-Oct-07 17:50
mveDave Kreskowiak8-Oct-07 17:50 
Questionretrieve the length of an mp3 file? Pin
Mr Oizo8-Oct-07 8:04
Mr Oizo8-Oct-07 8:04 
AnswerRe: retrieve the length of an mp3 file? Pin
JamesS[C1]8-Oct-07 8:24
JamesS[C1]8-Oct-07 8:24 
GeneralRe: retrieve the length of an mp3 file? Pin
Mr Oizo8-Oct-07 10:44
Mr Oizo8-Oct-07 10:44 
GeneralRe: retrieve the length of an mp3 file? Pin
Christian Graus8-Oct-07 13:41
protectorChristian Graus8-Oct-07 13:41 
AnswerRe: retrieve the length of an mp3 file? Pin
Christian Graus8-Oct-07 13:40
protectorChristian Graus8-Oct-07 13:40 
QuestionEnquiry Pin
TheSpiritSong8-Oct-07 7:03
TheSpiritSong8-Oct-07 7:03 
AnswerRe: Enquiry Pin
Ajay.k_Singh8-Oct-07 7:42
Ajay.k_Singh8-Oct-07 7:42 
GeneralRe: Enquiry Pin
TheSpiritSong9-Oct-07 8:01
TheSpiritSong9-Oct-07 8:01 

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.