 |
Change the Owner for Stored Procedures
Greg Duffield (9288 views)
Change the Owner for Stored Procedures
This one comes from Tim Page, if you ever need to change the owner of several Store Procedures at the same time then this is the T-SQL for you. And this even supports SQL Sever 2005.
#s#DECLARE
#s# @OldOwner sysname,
#s# @NewOwner sysname
#s#
#s#
|
 |
How to convert a physical computer to Virtual Machine
Greg Duffield (7918 views)
How to convert a physical computer to Virtual Machine
As per Mark's article http://www.geekzilla.co.uk/ViewContent.aspx?contentID=36 here is another solution that does not use Ghost but good ole NT back up.
I had this stored on my machine but unfortunaltey I cannot remember where it came fro
|
 |
Parser Error Message: Ambiguous match found.
Greg Duffield (7309 views)
Parser Error Message: Ambiguous match found.
VS 2005 Only.
This can be an annoying error, but it is usually caused by one thing.
If you add an object to your html source such as
#h#<igtxt:WebDateTimeEdit id="dteStartdate" runat="server" ToolTip="The end Date to use for the report." Edit
|
 |
Convert a DataReader to a DataTable
Greg Duffield (3295 views)
Convert a DataReader to a DataTable
When working with Datareaders one of the problems i sometimes come across is binding these to 3rd party controls. A lot of controls will not bind to a DataReader but nearly all of the alwaays bind to a DataTable. All of the functionlity already exists in the
|
 |
Passing CSV to Stored Procedure
Greg Duffield (1610 views)
Passing CSV to Stored Procedure
There are many occasions when it would be easier to pass an array of values to a Stored Procedure instead of looping.
This can be done and is very simple to use once implemented, all it needs is a new UDF (User Defined Function).
#s#CREATE FUNCTION dbo.CSV
|
 |
WSS 3.0 : Add a Column(Field) to a List (Part 1)
Greg Duffield (1609 views)
WSS 3.0 : Add a Column(Field) to a List (Part 1)
In order to add a Column (Computed) to a List you will need to use the WSS Object Model. As there are no tools to do this currently (however I am currently writing a little tool to help.) you will need to understand the CAML to define a Field.
|
 |
Sending mail using Localhost and .Net 2
Greg Duffield (1524 views)
Sending mail using Localhost and .Net 2
I came across an old favourite today when trying to send email using the SMTP service on Local host. The error was
SMTP 550 5.7.1 Unable to relay for xxxxxx
What you need to do is change the security settings on the SMTP Service to allow your to r
|
 |
Error connecting to undo manager of source file xxxx.aspx.designer.cs
Greg Duffield (1212 views)
Error connecting to undo manager of source file
'''The Problem'''
If you are using the Web Application Project Template (with as the Add On or as part of SP1) you can get this error.
This error can simply appear at any time for no apparent reason. There have been several suggestions on the
|
 |
Change Database Owner Following Restore
Greg Duffield (1126 views)
Change Database Owner Following Restore
I upgraded a SQL 2000 database to SQL 2005 by backing up and restoring.
However when this was done, the database does not have a valid owner and you will not be able to add diagrams etc.
To resolve this you will need to run the following SQL
#s#E
|
 |
SQL Server TABLE Variable
Greg Duffield (1080 views)
SQL Server TABLE Variable
When you need a temporary table in SQL Server 2000 (upwards) many people will implement a standard temporary table i.e.
#s#SELECT
#s# ProductID,
#s# ProductName,
#s# UnitPrice
#s#INTO #tmpTable
#s#FROM
#s# Products
#s#WHERE
#s# UnitsInStock < 40
#s#
#s
|
 |
WSS 3.0 Change Content Type Field Name
Greg Duffield (1074 views)
Change the Field Name for a Content Type
When I created a new Content Type in WSS 3.0 I could not find a way to change the name of the Title Field with out changing the base Item Type.
When you add a Field to a Content Type, you are actually creating FieldLinks, so you need to change the nam
|
 |
Intellisense For SQL Server Query Analyser
Greg Duffield (894 views)
Intellisense For SQL Server Query Analyser
Query Analyser has always been missing something and that something was [intellisense]. Just think about the time this would save you not having to have to look up the column names all the time or how to use a T-SQL function you have not used for some
|
 |
Generic Lists are All You Will Ever Need
Greg Duffield (886 views)
Generic Lists are All You Will Ever Need
Generic lists have reduced the amount of code we have to write for our n-tier applications dramatically. Where they have been most uselful is in the definition of our Strongly Typed Object Collections.
Previously we would have created a class that inh
|
 |
Parameter Order Wrong With ObejctDataSource
Greg Duffield (532 views)
Parameter Order Wrong With ObejctDataSource
http://www.p1tp.com/images/ods%20parameters.gif
This one came up today and I felt in a sharing mood. I had a GridView using and ObjectDataSource (ODS) and this was used for automatic updates via Inplace editing. When updating the GridView this woul
|
 |
Accessing Your resources Through a Static Class
Greg Duffield (480 views)
Accessing Your resources Through a Static Class
Obviously as conscientious developers you will be keeping all of your strings in resource files, but what if you have static classes how do you access your resources.
Using your stanard OOP design and class instances you would do this:
#c#us
|