Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Location
    In cousin's house
    Posts
    303

    Unanswered: View on sqlserver

    hi,
    How would I knew if the view has already exist from vb6? also i would like knew when is the right time to use view from sql?

    Popskie

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    you could search for it using ADOX i.e.

    Code:
    Sub test()
        Dim cat As ADOX.Catalog
        Dim mview As ADOX.view
        
        Dim strCon As String
        Set cat = New ADOX.Catalog
        
        strCon = "your connection string"
        cat.ActiveConnection = strCon
        
        For Each mview In cat.Views
            Debug.Print mview.Name
        Next mview
        
    End Sub
    Quote Originally Posted by popskie
    also i would like knew when is the right time to use view from sql?
    depends are you talking about views vs stored procedures or are you just wanting to get a subset of your data, if your happy with Access then think of a SQL Server View as being equivalent to an access query

Posting Permissions

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