using the data environment with recordset returning sql server sproc 
Author Message
 using the data environment with recordset returning sql server sproc

Hi:
I am building an app which connects to an sql server 7 db via commands in a
data environment which call stored procedures in the db.  For instance, I
have a form which uses a data grid control to display some customer
information from one of the stored procedures.  I have another form allowing
the user to add a new customer.  I would like to refresh the data grid on
the aforementioned form after the new customer has been added.  If I use the
requery method of the recordset object returned by the data environment, as
in:
        deTheBank.rscmdSelectStatus.Requery
 I get an oledb error '-2147217904 (80040e10)' "A required parameter is
missing", but my stored procedure requires no input parameters, just a
simple Select* on the table.  If, however, I use this code:
        deTheBank.rscmdSelectStatus.Close
        deTheBank.rscmdSelectStatus.Source = "SelectStatus"
        deTheBank.rscmdSelectStatus.Open
where "SelectStatus" is the name of the sql stored procedure, then things
work fine.
It is as though once the recordset object is created by the command in the
data environment, that it is a disconnected recordset and no longer
associated with the command which created it.  Is this correct?
Thank you for any and all replies


Thu, 05 Aug 2004 05:07:35 GMT  
 using the data environment with recordset returning sql server sproc
Hi
Refer to the link:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q191457

Harinatha Reddy Gorla MCSD,MCDBA
        Software Engineer
Smart Software Technologies,
Hyderabad, India

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Fri, 06 Aug 2004 12:17:32 GMT  
 using the data environment with recordset returning sql server sproc
Thanks for your response, but the requery method of the recordset is what is
returning an error.  I changed the code to close the rs first, then
re-execute the data environment command to refresh the rs, seems to work for
what I need.
Cheers



Quote:
> Hi
> Refer to the link:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;Q191457

> Harinatha Reddy Gorla MCSD,MCDBA
> Software Engineer
> Smart Software Technologies,
> Hyderabad, India

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Fri, 06 Aug 2004 12:38:41 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Error returned from SQL server sproc incorrectly?

2. CancelUpdate or CancelBatch using the Data Environment with SQL Server 2000

3. CancelUpdate or CancelBatch using the Data Environment with SQL Server 2000

4. What's the best settings in Data Environment when using MS SQL Server

5. CancelUpdate or CancelBatch using the Data Environment with SQL Server 2000

6. Returning recordset and output param fails with Data Environment

7. Return Value from command object using Data Environment

8. SQL Query of Recordset not in Data Environment or Database,

9. VB to SQL server needs Data Environment install?

10. Can't view SQL Server 2000 tables in VB6 Data Environment

11. Sql server stored procedures not returning a recordset...?

12. Returning recordset from SQL Server

 

 
Powered by phpBB® Forum Software