ADO, SQL Server, VB problem posted to the microsoft.public.data.ado group as well 
Author Message
 ADO, SQL Server, VB problem posted to the microsoft.public.data.ado group as well

Hello,

I am suffering a very strange problem with VB, a DataEnvironment and ADO.

The stored procedure that I am using works fine when executed as a command
in a DataEnvironment.  The trouble is that I want to execute it
asynchronously, which I can't seem to do using the DE and that it behaves
differently when I do my own thing with ADO.

What I've done is to open another connection using the same connection
string as the DataEnvironment one that works and then execute it using my
own command.  Forgetting about asynchronous stuff for a moment, when I run
it synchronously, it appears to work.  No exceptions, the completion event
fires with success, but it has definitely stopped before completion.  I've
got a few 'PRINT' debugging lines in there and they appear in the Errors
collection, but the procedure always stops when I fetch from a cursor.  It
doesn't matter what I'm fetching - I've reduced it to one column and it
still fails - and it's got me really stumped.

The stored procedure works fine from the Query Analyzer and, as I said
before, works by executing the DataEnvironment command that I have created.
I've set up event procedures for everything to try to find out what's going
wrong and I've removed the fetch loops to make sure they are the source of
the problem.  If I just open and close the cursors there is no problem.
I've checked every property of the connection object, to make sure that
there are no differences from the DE version and I can find none.  The
command is not timing out and is not failing by its own standards.

If someone else has had this problem, particularly if it's in the top ten of
things that confuse ignorant VB programmers, please let me know.  Even if
you know a way to execute DE commands asynchronously, that would help.  I'm
really under pressure to sort this out and I haven't been able to in over a
week, so I would be very grateful.

Thanks,

Adam Sewell



Fri, 19 Mar 2004 06:52:34 GMT  
 ADO, SQL Server, VB problem posted to the microsoft.public.data.ado group as well
In your stored procedure (at the top), try SET NOCOUNT ON.

HTH,
Tore.


Quote:
> Hello,

> I am suffering a very strange problem with VB, a DataEnvironment and ADO.

> The stored procedure that I am using works fine when executed as a command
> in a DataEnvironment.  The trouble is that I want to execute it
> asynchronously, which I can't seem to do using the DE and that it behaves
> differently when I do my own thing with ADO.

> What I've done is to open another connection using the same connection
> string as the DataEnvironment one that works and then execute it using my
> own command.  Forgetting about asynchronous stuff for a moment, when I run
> it synchronously, it appears to work.  No exceptions, the completion event
> fires with success, but it has definitely stopped before completion.  I've
> got a few 'PRINT' debugging lines in there and they appear in the Errors
> collection, but the procedure always stops when I fetch from a cursor.  It
> doesn't matter what I'm fetching - I've reduced it to one column and it
> still fails - and it's got me really stumped.

> The stored procedure works fine from the Query Analyzer and, as I said
> before, works by executing the DataEnvironment command that I have
created.
> I've set up event procedures for everything to try to find out what's
going
> wrong and I've removed the fetch loops to make sure they are the source of
> the problem.  If I just open and close the cursors there is no problem.
> I've checked every property of the connection object, to make sure that
> there are no differences from the DE version and I can find none.  The
> command is not timing out and is not failing by its own standards.

> If someone else has had this problem, particularly if it's in the top ten
of
> things that confuse ignorant VB programmers, please let me know.  Even if
> you know a way to execute DE commands asynchronously, that would help.
I'm
> really under pressure to sort this out and I haven't been able to in over
a
> week, so I would be very grateful.

> Thanks,

> Adam Sewell



Sun, 21 Mar 2004 22:46:02 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB Sql Server Via ADO Problem: [Microsoft][ODBC Sql Server Driver]

2. sql server, ado and data binding problem

3. microsoft.public.vb.general.discussion, microsoft.public.vb.enterprise

4. copy data between sql servers using ADO VB visual basic

5. copy data between sql servers using ADO VB visual basic

6. Passing parameter from VB 6 ADO Data Control to SQL Server Stored Procedure

7. VB 5 / ADO / SQL Server Problem

8. VB 5 - ADO adOpenKeySet cursor problem with SQL Server stored procedures using Variables

9. Problem creating an SQL Server trigger from ADO connection in VB

10. VB 5 - ADO adOpenKeySet cursor problem with SQL Server stored procedures using Variables

11. VB ActiveX DLL ADO and SQL Server problem

12. Problem returning SQL Server Error to VB 6 with ADO

 

 
Powered by phpBB® Forum Software