Err in using ADODB Command Object in VB.Net 
Author Message
 Err in using ADODB Command Object in VB.Net

I am working on conversion of some components build in VB6 to VB.Net. We
have decided to keep the data access component as ADODB and not ADO.Net .

I am having some problem using adodb command object for executing a
procedure and returning output parameters in VB.Net . It returns the correct
parameter object object when used before  any insert statement. If used
after any DML statement it doesnt retun anything

This Works
-----------------------------------------
CREATE PROCEDURE [dbo].[test1]

AS

BEGIN

 INSERT INTO TEST ([NAME]) VALUES ('JIT')
END
-----------------------------------------

This Doesn't
-----------------------------------------
CREATE PROCEDURE [dbo].[test1]

AS

BEGIN
 INSERT INTO TEST ([NAME]) VALUES ('JIT')

END
-----------------------------------------

Any help would be appreciated

Thanks,
Jitendra Pal



Fri, 27 Aug 2004 16:30:16 GMT  
 Err in using ADODB Command Object in VB.Net
Hi,

Try to add SET NOCOUNT ON at the beginning of SP and SET
NOCOUNT OFF at the end of it

Val

Quote:
>-----Original Message-----
>I am working on conversion of some components build in
VB6 to VB.Net. We
>have decided to keep the data access component as ADODB
and not ADO.Net .

>I am having some problem using adodb command object for
executing a
>procedure and returning output parameters in VB.Net . It
returns the correct
>parameter object object when used before  any insert
statement. If used
>after any DML statement it doesnt retun anything

>This Works
>-----------------------------------------
>CREATE PROCEDURE [dbo].[test1]

>AS

>BEGIN

> INSERT INTO TEST ([NAME]) VALUES ('JIT')
>END
>-----------------------------------------

>This Doesn't
>-----------------------------------------
>CREATE PROCEDURE [dbo].[test1]

>AS

>BEGIN
> INSERT INTO TEST ([NAME]) VALUES ('JIT')

>END
>-----------------------------------------

>Any help would be appreciated

>Thanks,
>Jitendra Pal

>.



Fri, 27 Aug 2004 20:32:34 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Sending command to a FoxPro database using ADODB.Command Object

2. Using adodb command object with transferspreadsheet

3. Using browser-side ADODB.Command object?

4. Using browser-side ADODB.Command object?

5. Using where IN with a ADODB.Command object...

6. Using browser-side ADODB.Command object?

7. Problem creating ADODB.command object in asp.

8. ADODB command object

9. When to use ADODB.Command Object in ADO Programming

10. ADODB.Command Connection Error in MTS object

11. When to use ADODB.Command Object in ADO Programming

12. ADODB.command Object and RecordCount

 

 
Powered by phpBB® Forum Software