Home All Groups Group Topic Archive Search About
Author
8 Jan 2007 11:43 AM
MaryA
I am trying to connect to as400 using oledbconnection
the connection is opened but when i try to retreive data i get an error
message
        cn = New OleDb.OleDbConnection(StrAS400)

        cn.Open()

        cmd = New OleDb.OleDbCommand(StrSql, cn)


        dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
StrAS400 is the connection string
Provider=IBMDA400;Data Source=xxxxxx;User Id=xxxxx;Password=xxxxxx;

Can anybody help me?

Author
9 Jan 2007 8:28 AM
Frans Bouma [C# MVP]
MaryA wrote:

Show quote
> I am trying to connect to as400 using oledbconnection
> the connection is opened but when i try to retreive data i get an
> error message
>         cn = New OleDb.OleDbConnection(StrAS400)
>
>         cn.Open()
>
>         cmd = New OleDb.OleDbCommand(StrSql, cn)
>
>
>         dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
> StrAS400 is the connection string
> Provider=IBMDA400;Data Source=xxxxxx;User Id=xxxxx;Password=xxxxxx;
>
> Can anybody help me?

    Let's start by posting the error message, and if available, the
exception stacktrace.

    I also would recommend the ADO.NET provider for eSeries, available in
the latest Client Access client software from IBM.

        FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Author
9 Jan 2007 9:51 AM
MaryA
Thanks Frans Bouma for your reply
i tried the ADO.NET provider for eSeries and it worked fine but i got
another problem
the data i am getting like this
ds_sc10lf.Tables(0).Rows(0).Item ("scccy")
{System.Array}
    (0): 228
    (1): 226
    (2): 196
even so ccy contain data like "usd","lbp" etc

can anyone help?
Author
9 Jan 2007 2:15 PM
Ciaran O''''Donnell
It seems like a byte array so you will need to use the correct text encoding
to convert it to a string.

Show quote
"MaryA" wrote:

> Thanks Frans Bouma for your reply
> i tried the ADO.NET provider for eSeries and it worked fine but i got
> another problem
> the data i am getting like this
> ds_sc10lf.Tables(0).Rows(0).Item ("scccy")
> {System.Array}
>     (0): 228
>     (1): 226
>     (2): 196
> even so ccy contain data like "usd","lbp" etc
>
> can anyone help?

AddThis Social Bookmark Button