Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_IHget_colinfo

  No additional text.


Syntax


-- Name:
--          sp_IHget_colinfo

-- Description:
--          Retrieve column properties for specific col in a specific article

-- Security:
--          Internal
-- Requires Certificate signature for catalog access

-- Returns:
--          Success/failure
--			Output - column name, column type

-- Owner:
--          

create procedure sys.sp_IHget_colinfo
(
	@objid				int,
	@colid				int,
	@artid				int,
	@bGetTextImageInfo	tinyint = 0,			-- for returning text/image info
	@colname			sysname output,
	@ccoltype			sysname = null output
)
as
begin
	declare @isset        int

    if (@artid is not NULL)
	begin
	    -- this code path for synctran procs
	    exec @isset = sys.sp_IHisarticlecolbitset @colid, @artid
	end
	else
	begin
	    -- this code path for synctran triggers
		select @isset = 1
	end

    if @isset != 0
    begin
		select	@colname	= c.name,
				@ccoltype	= t.name
		from	IHsyscolumns c,
				sys.types t
		where	c.id	= @objid
		  and	c.colid	= @colid
		  and	c.xtype	= t.user_type_id

		-- when checking replicated columns, text/image datatypes cannot be declared or used locally
		if (@bGetTextImageInfo = 0) and (@ccoltype in (N'text',N'ntext',N'image'))
			return 1
	end
    else
    begin
        select @colname = null, @ccoltype = null
		return 1
    end

    return 0
end

 
Last revision 2008RTM
See also

  sp_MSdrop_replcom (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash