Re: Problems with result sets from stored procedures on a IBM AS400 DB

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"RaBu" <RaBu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6E2A50B1-5CFC-4B7C-B766-61B500F9E834@xxxxxxxxxxxxxxxx
> Hi everybody,
> I got a strange problem while using VB6 and using stored procedures with a
> result set.
>
> I?am using this code to execute a simple sp on a IBM I5 machine:
> ...
> Dim cn As ADODB.Connection
> Dim rs As Recordset
> On Error GoTo errHandler
> Set cn = New ADODB.Connection
> cn.ConnectionString = "Provider=IBMDA400.DataSource.1;Persist Security
> Info=False;User ID=XXXX;Password=XXX;Data Source=XXX;Extended
> Properties=""Default Collection= MDB"""
>
> cn.CursorLocation = adUseClient
> cn.Open
>
> Dim strSQL As String
> strSQL = "call testproc ('param1')"
> Dim cmd As ADODB.Command
> cmd.CommandText = strSQL
>
> Set rs = cmd.Execute
> ...
> I receive no error but the result set is not existing
> If I use a normal query everything is OK
> Strange is :
> If I am using the ODBC-Connection it works ! (So the SP work properly)
> If I am using the VB.Net the ado connection (without the provider in the
> connect string) it works too!
>
> any ideas ?
>
>

I don't see that you actually assign Connection object to the cmd variable.
Unless it exists in your actual code, it can be a reason (at least, the code
is definitely not workable as it is presented)

Dmitriy.


.



Relevant Pages

  • Problem with Datatable Insert
    ... I am experiencing a strange problem when inserting rows in a datatable ... Private Sub Insert_Row(ByVal sender As Object, ... Dim tbl As DataTable = New DataTable ... cell, the cell value reverts back to 0. ...
    (microsoft.public.dotnet.languages.vb)
  • Problem comparing double values
    ... I have a strange problem that I would appreciate any help ... Private Sub CompareNumbers() ... Dim arNumbersAs Double ... Dim dblComparison As Double ...
    (microsoft.public.vb.general.discussion)
  • VB and Progress database with ADO
    ... If the field contains a value ending with a zero, ... I've tried the same things with a C++ program, without this strange problem ... Dim Connection As Object ... Set Connection = CreateObject ...
    (microsoft.public.office.developer.vba)
  • VB, MDAC and progress database problem
    ... If the field contains a value ending with a zero, ... I've tried the same things with a C++ program, without this strange problem ... Dim Connection As Object ... Set Connection = CreateObject ...
    (microsoft.public.vb.database.ado)
  • Re: Convert a mdb Database (accdb) to a previous version database
    ... provider in a DataEnvironment designer in VB6 and it worked fine. ... I make the ADO connection 'Microsoft.ACE.OLEDB.12.0' and set the Database as ... Dim adConect As New ADODB.Connection ...
    (microsoft.public.access.security)