FindViewByName etc

Answered

Comments

4 comments

  • I don't know your database structure: if it support schemas or databases. but if any of them aren't supported by youd database server, you can leave corresponding parameters blank, it's allowed.

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    We are mostly using MSSQL so schemas are supported but we don't use them

    If dbo is always the correct value then I could hard code this but I suspect it won;t always be

    I did try leaving the schema blank but it did not find the table

    0
    Comment actions Permalink
  • This method finds specific database object in the Metadata Container (with specific database, schema and object name), so you should specify all parameters correctly in order to find an object.

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    Now that DefaultSchemas.Count etc work then I guess all I can do is loop though these calling FindViewByName until I find a match.

    I suspect in most cases there will only be the dbo schema

    0
    Comment actions Permalink

Please sign in to leave a comment.