dbTalk Databases Forums  

Re: IBM DB2 UDB for iSeries OLE DB Provider questions

ibm.software.db2.os400 ibm.software.db2.os400


Discuss Re: IBM DB2 UDB for iSeries OLE DB Provider questions in the ibm.software.db2.os400 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
 
Posts: n/a

Default Re: IBM DB2 UDB for iSeries OLE DB Provider questions - 10-30-2005 , 04:14 PM






Dear all,

I am having the same error while trying to invoke a iSeries DB2 stored procedure from VB.Net. Actually the error occured while trying to execute the code such commandName.executeNonQuery. My SP is just a select statement. Following is the VB code:

Dim connection As New Odbc.OdbcConnection
Dim exchCmd As Odbc.OdbcCommand
Dim parmCCY As Odbc.OdbcParameter
Dim parmTOR As Odbc.OdbcParameter
Dim parmBUY As Odbc.OdbcParameter
Dim parmSELL As Odbc.OdbcParameter
Dim sRate As DataSet

Try
connection = Me.OdbcConnection1
exchCmd = New Odbc.OdbcCommand("EXCHANGE(CSD12690)")
exchCmd.Connection = connection
exchCmd.CommandType = CommandType.StoredProcedure
parmCCY = exchCmd.Parameters.Add("PCCY", Odbc.OdbcType.Char, 3)
parmCCY.Direction = ParameterDirection.InputOutput
parmCCY.Value = Currency
parmTOR = exchCmd.Parameters.Add("PTOR", Odbc.OdbcType.Decimal)
parmTOR.Direction = ParameterDirection.Output
parmBUY = exchCmd.Parameters.Add("PBUY", Odbc.OdbcType.Decimal)
parmBUY.Direction = ParameterDirection.Output
parmSELL = exchCmd.Parameters.Add("PSELL", Odbc.OdbcType.Decimal)
parmSELL.Direction = ParameterDirection.Output
connection.Open()

'THE ERROR OCCURED HERE....
exchCmd.ExecuteNonQuery()

sRate= parmCCY.Value & " " & parmTOR.Value & " " & parmBUY.Value & " " & parmSELL.Value
connection.Close()
connection.Dispose()
Catch ex As Exception
sRate = ex.Message
End Try
Return sRate

Reply With Quote
  #2  
Old   
 
Posts: n/a

Default Re: IBM DB2 UDB for iSeries OLE DB Provider questions - 11-10-2005 , 03:56 PM






Have you attempted to use the dotnet data provider from IBM. It should have come with your IBM iSeries Access for Windows and do a Selective Setup.



Reply With Quote
  #3  
Old   
 
Posts: n/a

Default Re: IBM DB2 UDB for iSeries OLE DB Provider questions - 11-28-2005 , 04:35 PM



If you don't want to use journaling, you can use the IBMDASQL provider instead of IBMDA400. IBMDASQL is an SQL-only provider shipped with iSeries Access for Windows starting in v5r3m0.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.