Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

VB 6 With SQL SERVER 2000 using a query again as query to select reco

Hi,
I am using VB 6 With SQL SERVER 2000. In MS Access i used createQueryDef to create a query. then this query i again used in select statement .
In SQL Server there are functions and stored procedure.which can be called in Vb.One stored procedure can be called in other stored procedure.

But is it possible we can use Stored procedure or Function again in select statement.mean same as we use select statement to select records from table.so that from that we can query the records we need.
With VB i am using ADO for database connectivity.

thanks

shahbaz

Comments

  • GenjuroGenjuro Posts: 913Member
    : Hi,
    : I am using VB 6 With SQL SERVER 2000. In MS Access i used createQueryDef to create a query. then this query i again used in select statement .
    : In SQL Server there are functions and stored procedure.which can be called in Vb.One stored procedure can be called in other stored procedure.
    :
    : But is it possible we can use Stored procedure or Function again in select statement.mean same as we use select statement to select records from table.so that from that we can query the records we need.
    : With VB i am using ADO for database connectivity.
    :
    : thanks
    :
    : shahbaz
    :

    You might consider the Data Shape ADO provider, and ADO's "SHAPE" SQL instruction, which will allow for "nested recordset". While this won't probably work on most of the other databases (but again, it might), this allows you to get a recordset in which some of the fields in the records are actually other recordsets generated from a "temporary" stored procedure (which requires that a parameter is part of the SELECT statement inside the query), and retrieved when you move the cursor of your main recordset.
    But it's quite some time since I used it, so I can't remember the syntax. I'll just point you at it and see if the help files can give you a better explaination than I can give you right now ;)
Sign In or Register to comment.