Re: Problems with result sets from stored procedures on a IBM AS400 DB
- From: "Dmitriy Antonov" <antonovdima@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 11 Nov 2005 19:02:17 -0500
"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.
.
- Prev by Date: ado vs. text file (CSV)
- Next by Date: Updating a DataGrid
- Previous by thread: ado vs. text file (CSV)
- Next by thread: Updating a DataGrid
- Index(es):
Relevant Pages
|