G
Gina L. Hernandez
Hello:
I am creating an application in .NET (Visual .NET) and I need to connect a
PC to a AS/400. I wrote my code and compile, but when I am executing the
programs I have problems trying to reach the data stored in my
oledbdatadapter da.fill(dataset). If I use a recordset it says ""ERRORValue
cannot be null parameter dataset". If I use a New dataset it says
"ERROROleDbDataAdapter internal error: invalid rowset accessor: Ordinal=3
Status=UNSUPPORTEDCONVERSION."
This is the syntax I am using
Dim oOleDbConnection As New OleDbConnection
Dim sConnString As String = "Provider=IBMDA400;" & _
"Password=password;" & _
"User ID=userid;" & _
"Data Source=as/400;" & _
"Transport Product=Client Access;" & _
"SSL=DEFAULT"
oOleDbConnection = New OleDb.OleDbConnection(sConnString)
oOleDbConnection.Open()
Try
Dim myQuery As String = "SELECT ZAITEM, ZALOC,ZAQTY,ZAWET FROM
PRDAURF3.INP77U0B " & "WHERE ZABAR = '" & Trim(vIncoming) & "'"
Dim da As New OleDb.OleDbDataAdapter '(myQuery, oOleDbConnection)
'sConnString)
da.SelectCommand() = New OleDbCommand(myQuery, oOleDbConnection)
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim mytable As DataTable
Dim mydataset As New DataSet
Dim myrow As DataRow
Dim t_messtext As StringBuilder = New StringBuilder
Dim temp As Decimal
Dim SQL As String
Dim result As String
Dim mySQLDA As New SqlDataAdapter
Dim mySQLDS As New DataSet
Dim mySqlCmd1 As New SqlCommand
da.Fill(mydataset)
mytable = mydataset.Tables(0)
myrow = mytable.Rows(0)
Does somebody have and idea about what the problem is and can help me to
solve this??
Thanks
I am creating an application in .NET (Visual .NET) and I need to connect a
PC to a AS/400. I wrote my code and compile, but when I am executing the
programs I have problems trying to reach the data stored in my
oledbdatadapter da.fill(dataset). If I use a recordset it says ""ERRORValue
cannot be null parameter dataset". If I use a New dataset it says
"ERROROleDbDataAdapter internal error: invalid rowset accessor: Ordinal=3
Status=UNSUPPORTEDCONVERSION."
This is the syntax I am using
Dim oOleDbConnection As New OleDbConnection
Dim sConnString As String = "Provider=IBMDA400;" & _
"Password=password;" & _
"User ID=userid;" & _
"Data Source=as/400;" & _
"Transport Product=Client Access;" & _
"SSL=DEFAULT"
oOleDbConnection = New OleDb.OleDbConnection(sConnString)
oOleDbConnection.Open()
Try
Dim myQuery As String = "SELECT ZAITEM, ZALOC,ZAQTY,ZAWET FROM
PRDAURF3.INP77U0B " & "WHERE ZABAR = '" & Trim(vIncoming) & "'"
Dim da As New OleDb.OleDbDataAdapter '(myQuery, oOleDbConnection)
'sConnString)
da.SelectCommand() = New OleDbCommand(myQuery, oOleDbConnection)
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim mytable As DataTable
Dim mydataset As New DataSet
Dim myrow As DataRow
Dim t_messtext As StringBuilder = New StringBuilder
Dim temp As Decimal
Dim SQL As String
Dim result As String
Dim mySQLDA As New SqlDataAdapter
Dim mySQLDS As New DataSet
Dim mySqlCmd1 As New SqlCommand
da.Fill(mydataset)
mytable = mydataset.Tables(0)
myrow = mytable.Rows(0)
Does somebody have and idea about what the problem is and can help me to
solve this??
Thanks