Home All Groups Group Topic Archive Search About
Author
15 Nov 2007 10:02 AM
Claudia Fong
Can someone tell me the diferrence between those two? The second one
does not need a sql command and it only open "ShowActivies"; is it a
store procedure?

strSQL = "Select Description, ActivityId from Activity where
ActivityName = '" + cmbActivities.Text + "'"

With rst
  .CursorLocation = adUseClient
  .Open strSQL, conn.ConnectionString, adOpenStatic,
adLockBatchOptimistic
End With
----------------------------------------------------
With rst
  .CursorLocation = adUseClient
  .Open "ShowActivities", conn.ConnectionString, adOpenStatic,
adLockBatchOptimistic
End With


Cheers!

    Claudi

*** Sent via Developersdex http://www.developersdex.com ***

Author
15 Nov 2007 1:26 PM
Janusz Rychter
No, it is a view built based on a table Activity or it is a table. If
you want to run sp using this particular syntax it should look like
this:
..Open "exec <StoreProcedureName> [parm1, [parm n]]", conn,
adOpenStatic, adLockBatchOptimistic

so if you have a following sp:
CREATE PROCEDURE spShowActivities
  @ActivityName  varchar(100)
  SET NOCOUNT ON
  SELECT Descripion, ActivityID FROM Activity WHERE ActivityName =
@ActivityName
  SET NOCOUNT OFF

your Open statement would look:
..Open "exec spShowActivities " & cmbActivities,Text, conn,
adOpenStatic, adLockBatchOptimistic
Author
15 Nov 2007 3:33 PM
Claudia Fong
It's not a table.. but if is a built view.. what is a built view ?

Cheers!

    Claudi

*** Sent via Developersdex http://www.developersdex.com ***
Author
16 Nov 2007 2:56 PM
Janusz Rychter
On Nov 15, 10:33 am, Claudia Fong <cdolphi***@yahoo.co.uk> wrote:
> It's not a table.. but if is a built view.. what is a built view ?
>
A View or Built View the same thing, just allows you to persist any
SELECT statement (query) in database. In short it is a logical table
based on one or more tables or views. Depends which database you are
using the naming will differ, in MS SQL Server and Oracle use Views,
Access uses Queries, etc. Since we don't know what database you are
using it is hard to give you any specific information.
Author
16 Nov 2007 3:11 PM
David Kerber
In article <b9d9ddd3-4d11-4d1c-a65f-cd2a0ef5f334
@a28g2000hsc.googlegroups.com>, naj***@hotmail.com says...
> On Nov 15, 10:33 am, Claudia Fong <cdolphi***@yahoo.co.uk> wrote:
> > It's not a table.. but if is a built view.. what is a built view ?
> >
> A View or Built View the same thing, just allows you to persist any
> SELECT statement (query) in database. In short it is a logical table
> based on one or more tables or views. Depends which database you are
> using the naming will differ, in MS SQL Server and Oracle use Views,
> Access uses Queries, etc. Since we don't know what database you are
> using it is hard to give you any specific information.

And then there are "materialized views", which are a different variation
on the theme, in that they are not generated at call time like regular
views are, but are created and stored in the .db as the tables they are
built on change.

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).

AddThis Social Bookmark Button