Re: question on sql

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




"ken" <ken@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DD1922C8-2915-41B1-834D-DB17BC8020CD@xxxxxxxxxxxxxxxx
> Dear all
> 1.)How can i save the stored procedure in sql 2005 server, into server and
> NOT in file location
--Do you want to just create a Stored Procedure via Code and not have to
read it in from a file, and then be able to retrieve it? If so, you can
just set your commandtext property of your command object to the stored proc
code, and you can use sp_helptext '[ @objname = ] 'name' [ , [ @columnname
= ] computed_column_name ] to retrieve the text afterward. If you use a
datareader for instance, you'd just set the CommandType to to
CommandType.StoredProcedure. Then you'd add the @objname parameter which
would be the name of the proc you just wrote. You can use a dataReader and
then use SqlDataReader dr = MyCommandName.ExecuteReader(and a
commandbehavior here as you normally would).

Then while(dr.Read()){
Debug.WriteLine(dr[0].ToString());
}//Or however you want the text, I'm just using WriteLine for illustrative
purposes
>
> 2.)How can create folder in stored procedure to separate categories?
--I'm not sure I follow you here. Are you looking for some sort of folder
structure with Management Studio? If so, I don't know of a way to
accomplish that (note though that I'm not saying it can't be done, I'm just
personally unaware of such a feature - but would like to know the answer as
well).
>
> 3.)How can view the created date and modify date of stored pro
--I believe you can check the system catalog and look at Sysobjects for
instance - looking at the crdate field. There is probably a new management
view as well that has this, I don't happen to know of one off the top of my
head. You may want to run this by the Sql Server NG group as well in that
there is probably a newer more elegant way to get at this data, I'm not
sure.

HTH,

Bill
>
>
>
>


.



Relevant Pages

  • Re: SQL/ADO (2.8) Timeout Error - Cant resolve
    ... > Server 2000 back end. ... > timeout limit. ... And I’ve used SQL Query Analyzer to run the ... I am running a stored procedure that will backup a SQL Server ...
    (microsoft.public.sqlserver.clients)
  • Re: How to test a custom conflict resolver procedure
    ... once I set my stored procedure as a custom resolver? ... Here is an example of a custom resolver I wrote which might help you ... --creating the stored procedure conflict resolver ... Looking for a SQL Server replication book? ...
    (microsoft.public.sqlserver.replication)
  • Re: quality of service
    ... company that hosts my company's web site and connected SQL Server database. ... The same stored procedure is called from a number of different web pages ... The company that hosts my web site and connected SQL ... this clustering is indicative of slowed or failed SQL Server responses due ...
    (microsoft.public.sqlserver.server)
  • Re: Error: Executing Stored Procedures-- Cannot Pass TimeStamp Values From sqlCommand Object Parame
    ... The @RowV Values when it reaches the stored procedure on SQL server always gets reset to 0x00 No matter what value I set it to. ... I am using timestamps to determine if the row has been updated on the server before I apply the new updates. ... @ProviderID smallint, ... @RowOut timestamp OUTPUT ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Problem using SP as record source with Access2002 & SQL Server 7
    ... I've installed a brand new copy of SQL Server 2000 with the original ... I've created the folowing stored procedure for the resync ... Resync Command: ALL_CUSTOMERS_RESYNC? ... I need to upgrade to a newer version of Microsoft SQL ...
    (microsoft.public.access.adp.sqlserver)