Re: How to create views with SQL-NS

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 03/10/05


Date: Thu, 10 Mar 2005 18:06:31 +0100

Assuming you have an ADO.NET connection, just execute "sp_helptext 'viewname'" and you have the
source code for the view.

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
<Eric> wrote in message news:OUJN3OYJFHA.3960@TK2MSFTNGP09.phx.gbl...
> The Wizard will be in C#.  (Limited VB.NET as well, depending on whoever has
> the time to help me).
>
> Yes, I'm taking your advice and scrapping the NS components, along with all
> the other bells and whistles.  By making the solution purely .NET, it cuts
> my [estimated] development time by about half.  Also, the logic is quite
> simple now.
>
> You've got me curious, though, Mary.  You said that views could be saved
> externally as a text file.  Do you mean this as a manual process, or can it
> be done programmatically?  If programmatically, are you talking about using
> SQL-DMO to gen the CREATE statement, then saving it to the file?  Or is
> there a simpler way?
>
> Once again, thank you, Mary.  You've helped greatly!
>
> Eric
>
>
> "Mary Chipman [MSFT]" <mchip@online.microsoft.com> wrote in message
> news:t0iu219q9ese2hpmft62tkc3eb3pt8fe2a@4ax.com...
>> What programming language are you using for your Wizard? A view can be
>> saved externally as a text file, so you may want to look at tackling
>> the problem from that angle by examining the text for invalid strings,
>> etc. Even if it worked, I don't think NS would deliver what you are
>> looking for since it only delivers chunks of UI.
>>
>> --Mary
>>
>> On Tue, 8 Mar 2005 14:52:53 -0600, <Eric> wrote:
>>
>> >Thank you for the reply, Mary.
>> >
>> >Currently, all of our developers have EM and QA.  The main goal of this
>> >project is to streamline [automate] and standardize business/security
> rule
>> >creation within our security model that sits atop SQL Server.
>> >
>> >Basically, I'll be developing a wizard that abstracts the complexities of
>> >our security model from the developers.  The only part of the application
>> >that cannot be coded generically is the creation of a single view that
>> >defines an important piece of the rule.
>> >
>> >Unfortunately, it's a hoop worth jumping through.  :-)
>> >
>> >Thanks again,
>> >
>> >Eric
>> >
>> >
>> >"Mary Chipman [MSFT]" <mchip@online.microsoft.com> wrote in message
>> >news:vmsr21lm7qpurst0d0v9i225igif755jl3@4ax.com...
>> >> Instead of jumping through hoops to try to build your own visual
>> >> tools, why not just purchase the Developer edition for your developers
>> >> and let them use the tools in SEM and QA to build database objects?
>> >> See http://www.microsoft.com/sql/howtobuy/development.asp for more
>> >> info. Bear in mind that for $49 you can't use this edition as a
>> >> production server.
>> >>
>> >> --Mary
>> >>
>> >> On Tue, 8 Mar 2005 09:58:13 -0600, <Eric> wrote:
>> >>
>> >> >I am doing research into how to best allow developers to visually add
>> >views
>> >> >to a database using our in-house system (.NET Windows apps + SQL
> Server
>> >back
>> >> >end).
>> >> >
>> >> >Since Enterprise Manager's Access-like "New View" component is easy to
>> >use,
>> >> >I thought that might be nice to integrate into our system.  Naturally,
>> >> >SQL-NS (NameSpace) comes to mind.
>> >> >
>> >> >I walked through the MSDN example (http://tinyurl.com/6fwuo) to
> display
>> >the
>> >> >User Properties window just fine, but there seems to be no way to
> display
>> >> >the New View window.
>> >> >
>> >> >I tried these statements (where myObj is a SQLNamespaceObject):
>> >> >myObj = objSQLNS.GetSQLNamespaceObject _
>> >> >        (objSQLNS.GetFirstChildItem(hDatabase, _
>> >> >        SQLNSOBJECTTYPE_DATABASE_VIEWS))
>> >> >myObj.ExecuteCommandByID(SQLNS_CmdID_NEW_VIEW)
>> >> >
>> >> >The above statement fails because there are no commands for the views
>> >(i.e.,
>> >> >no command ID).  But notice the enumeration I used:
>> >SQLNS_CmdID_NEW_VIEW.
>> >> >This is obviously a command ID enum for creating a view, supplied by
> the
>> >> >SQLNS DLL.  (By the way, I found this same limitation for tables.)
>> >> >
>> >> >Now, MY QUESTION: is there really a way to create views with SQL-NS
>> >(since
>> >> >the functionality is obviously in there somewhere)?  If not, what is
> the
>> >> >point of making NS available in the first place?  (I'm not ranting; I
>> >really
>> >> >would like to know. :-)
>> >> >
>> >> >Thank you,
>> >> >
>> >> >Eric
>> >> >
>> >> >
>> >>
>> >
>>
>
> 


Relevant Pages

  • Re: Question on conversion to ADP
    ... parameters through VBA/pass-through queries. ... help/guidance coming from Microsoft for Access developers trying to ... Microsoft Access or SQL Server 2005: ...
    (microsoft.public.access.adp.sqlserver)
  • Re: How to create views with SQL-NS
    ... > What programming language are you using for your Wizard? ... all of our developers have EM and QA. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Future of ADPs
    ... "Developers", that really started in Access and continued with Access ... Ms Access ADPs and SQL Server 2005 Express ... SQL Server 2005 Express and ASP.Net, ... Reports to design your reports. ...
    (microsoft.public.access.adp.sqlserver)
  • RE: MS SQL Farm
    ... Regards ... > infrastructure that will help us leverage MS Sql server. ... > implementation and design will be done by us developers. ... > development/test and production servers with stand by servers. ...
    (microsoft.public.sqlserver.clustering)
  • Re: DAO vs ADO
    ... In the past I have had my differences with Joe as he comes from the SQL side ... I am not sure if SQL Server 2005 has blown it or not, ... Access is a wonderful front end development tool for database developers ... maybe we could let all the programmers go and use whatever the latest ...
    (microsoft.public.access.adp.sqlserver)