Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2005
    Posts
    266

    Unanswered: create view problem

    I cannot create the following view in access 2000

    CREATE VIEW V_TB1 (A, B) AS SELECT TB1.A, Max(TB1.B) AS B FROM TB1 GROUP BY TB1.A, TB1.C HAVING TB1.C > 100


    what is wrong ?

    thank you

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    what is wrong? access doesn't support views

    remove the CREATE VIEW AS part, and just save the query
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Where are you executing this? (HINT - you need to run it through ADO not the access query window) And why are you creating a view rather than a query?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by r937
    access doesn't support views
    Interestingly my version (2003) appears to treat a view just like a query including allowing the addition of parameters. What a queer do.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Dec 2005
    Posts
    266
    r937 of course but I run it from .NET application with Microsoft.Jet.OLEDB.4.0

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    According to this you can only execute this from ADO:http://msdn2.microsoft.com/en-us/lib...ffice.10).aspx
    I don't know if that includes ADO.NET. I would doubt it....
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    441
    I think the syntax is OK, and should work, same as stored procedures http://www.devcity.net/Articles/34/msaccess_sp2.aspx.

    One thing, in Access 2000 views and procedures created this way, will probably not be be visible in the interface, but should be available when connecting through OLE DB.
    Roy-Vidar

  8. #8
    Join Date
    Dec 2005
    Posts
    266
    ok i'll try

    thank you

  9. #9
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    441
    One thing that will help us help you, is if you could give a bit more details about what isn't working. Error messages (if any), what happens that should not happen, what doesn't happen which should happen? Are you able to save this as a query from within the Access interface? Are the field names correct? ...

    Since you're using some .Net platform, you might perhaps get better assistance in fora dedicated to .Net?
    Roy-Vidar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •