Re: Create View, Index

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Some of these depend on the library you use to execute the query, i.e. they might work only if executed under ADO (not DAO.)

Here's an exmaple of how to create a view with ADO:
http://allenbrowne.com/func-ADO.html#CreateViewAdo
or with ADOX:
http://allenbrowne.com/func-ADOX.html#CreateViewAdox

Here are some examples of creating indexes and keys with ADOX:
http://allenbrowne.com/func-ADOX.html#CreateIndexesAdox
http://allenbrowne.com/func-ADOX.html#CreateKeyAdox

Finally, you can use the DAO object library to create a query (view or procedure):
http://allenbrowne.com/func-DAO.html#CreateQueryDAO
or indexes:
http://allenbrowne.com/func-DAO.html#CreateIndexesDAO

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Sol" <Sol@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E163237E-8FDB-42DA-8F23-CB7482A2A19F@xxxxxxxxxxxxxxxx
I need help in figuring out how to do the CREATE VIEW, CREATE INDEX function.
Here are some of the exercises I need to do:

Create a view named PenguinBooks. It consists of the book code, book title,
book type, and book price for every book published by Penguin USA. Display
the data in the view.

Create the following indexes.
Create an index named BookIndex1 on the PublisherName field in the
Publisher table.

I followed every rule possible, but came up empty.
An error message pops up rejecting the operation.
Any suggestions?
Sol

.



Relevant Pages

  • Re: Problem with Deletes in code
    ... DoCmd.RunSQL to execute the delete query. ... 'All records in rsSourceProjects will be for the same project, ... problem with ADO interacting with the tables, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Running a query to check data entry
    ... The default version for Access 2000 or less is DAO. ... For ADO, make ... Set rst = New Recordset ... > run a query to find the Latest one. ...
    (microsoft.public.access.formscoding)
  • Re: New Info on Stupid Error Im not Seeing
    ... > I want to do away with DAO altogether because in Access 2003, ... Access 2003 *does* include a default reference set to DAO. ... I want to use ADO not DAO. ... > was written in my code as opposed to an Access Query Design. ...
    (microsoft.public.access.forms)
  • Re: CREATE TABLE...
    ... without changing setting) the Access Query designer uses ... DAO instead of ADO and thus, has the same problem than DAO on some ... Is there any way to just do it using query, ie, just CREATE TABLE... ...
    (microsoft.public.access.queries)
  • Re: Passing parameters via MS Query to Access
    ... If you use ADO, you can use EXECUTE: ... CurrentProject.Connection.Execute "CREATE PROCEDURE thisQueryHasOneParam( ... and then executes the query and uses that value correctly in the ...
    (microsoft.public.access.queries)