jin29_neci
New member
- Joined
- Oct 4, 2008
- Messages
- 3
- Programming Experience
- 1-3
help with these guys... im stock... here's the error message "INVALIDOPERATIONEXCEPTION; numeration operation might not execute" , I also attached a pic for the exact error..
any post would be appreciated ... thanks....
any post would be appreciated ... thanks....
VB.NET:
Public Sub SaveData()
Dim jinObjection As SqlConnection = GetConnection()
Dim jinNewRss As New Rss
Try
Dim strQueryChannels As String = "SELECT * FROM tbl_channel"
Dim jinDataAdapter = New SqlClient.SqlDataAdapter(strQueryChannels, jinObjection)
Dim jinDataSet As New DataSet
Dim strInsertQuery As String = "INSERT INTO tbl_channel (Title,Description,URL,Lastupdated,TitleID) VALUES (@Title,@Description,@URL,@LastUpdated,@TitleID)"
jinDataAdapter.Fill(jinDataSet, "tbl_channel")
Dim jinDataRows As DataRow = jinDataSet.Tables(0).NewRow
Dim jinDataSetFilltitles As DataSet = fillTitles(cmbTitles.Text)
Try
jinObjection.Open()
jinDataAdapter.InsertCommand = New SqlCommand(strInsertQuery, jinObjection)
jinDataAdapter.InsertCommand.Parameters.Add("@Title", SqlDbType.Text, 18, "Title")
jinDataAdapter.InsertCommand.Parameters.Add("@Description", SqlDbType.Text, 18, "Description")
jinDataAdapter.InsertCommand.Parameters.Add("@URL", SqlDbType.Text, 18, "URL")
jinDataAdapter.InsertCommand.Parameters.Add("@LastUpdated", SqlDbType.DateTime, 4, "LastUpdated")
jinDataAdapter.InsertCommand.Parameters.Add("@TitleID", SqlDbType.BigInt, 10, "TitleID")
Finally
Dim jinResult_XML As ArrayList
jinResult_XML = Rss.rssreader(txtURL.Text)
'Dim intCounter2 As Integer = 0
For Each jinDataRows In jinDataSet.Tables(0).Rows
For Each jinNewRss In jinResult_XML
jinDataRows = jinDataSet.Tables(0).NewRow
jinDataRows("Title") = jinNewRss.title
jinDataRows("Description") = jinNewRss.description
jinDataRows("URL") = jinNewRss.URL
jinDataRows("LastUpdated") = DateTime.Now
jinDataRows("TitleID") = intTitle
'update rows s
jinDataSet.Tables(0).Rows.Add(jinDataRows)
jinDataAdapter.Update(jinDataSet, "tbl_channel")
jinDataSet.AcceptChanges()
Next
Next
jinDataAdapter.Dispose()
End Try
Finally
jinObjection.Close()
jinObjection.Dispose()
End Try
End Sub