|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
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? MaryA wrote:
Show quote > I am trying to connect to as400 using oledbconnection Let's start by posting the error message, and if available, the> 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? 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#) ------------------------------------------------------------------------ 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? 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? |
|||||||||||||||||||||||