Avalados por :
Hi Experts,
I got the error:
Unable to cast object of type 'System.Data.DataSet' to type 'System.Data.IDataReader
after running an application to export data from mysql database table and to import the data in the hana schema table. Both tables have set to have same field codes and data types. Both tables have the same table name, i.e. Billing_Data. The schema name in hana is Staging_Db. The schema name in mysql is mysqlstg_db
My application is developed using vb.net 2010. The sap hana version is 1.0 for SAP Business One Hana. I did not use SAP B1H DI API.
#Region "Common Variable"
Private ComDset As New DataSet
#End Region
#Region "daily work"
Private Sub trfbilldata(ByVal DBSAddOn As String, ByVal TrfNum As String, ByRef sAccumErrMsg As String)
Dim...
Dim..
Me.Cursor = Cursors.WaitCursor
myconn = New MySqlConnection
myconn.ConnectionString = "server=" + sDBOrigin + ";" _
& "user id=" + sDBUserName + ";" _
& "password=" + sDBUserPassword + ";" _
& "database=" + sDBName + ";"
Try
myconn.Open()
SQL = "SELECT * FROM BILLING_DATA where " & _
" coalesce(RULE1,'')='' and coalesce(TrfNum ,'') = ''"
myCommand.Connection = myconn
myCommand.CommandText = SQL
myAdapter.SelectCommand = myCommand
myAdapter.Fill(myData)
myconn.Close()
Catch myerror As MySqlException
MessageBox.Show("Error: " & myerror.Message)
Finally
myconn.Dispose()
End Try
Dim filename As String
Dim col, row As Integer
Dim adp2 As New MySqlDataAdapter(SQL, myconn)
Try
ComDset.Reset()
adp2.Fill(ComDset, "TTbl")
If ComDset.Tables.Count <
contacto@primeinstitute.com
(+51) 1641 9379
(+57) 1489 6964
© 2024 Copyright. Todos los derechos reservados.
Desarrollado por Prime Institute