Sybernet / Supplied Procedures Reference
Release 3.00
Dec 18, 2005
backwards forwards

SYBSYSTEMPROCS.SP_SYSCOLUMNS

This procedure is used by Sybernet and Sybercron to determine column and parameter attributes. Sybercron uses this procedure to build your run statement. Sybernet uses this to build input fields dynamically at run time. In addition to all of the columns from syscolums, this procedure also returns datatype from systypes.

Syntax

procedure sp_syscolumns
(
    @procname                      varchar(92)
,   @id                            int               = null output         
,   @number                        smallint          = null output    
,   @colid                         smallint          = null output    
,   @status                        tinyint           = null output     
,   @type                          tinyint           = null output     
,   @length                        int               = null output        
,   @offset                        smallint          = null output    
,   @usertype                      smallint          = null output    
,   @cdefault                      int               = null output        
,   @domain                        int               = null output          
,   @name                          varchar(30)       = null output      
,   @printfmt                      varchar(255)      = null output
,   @prec                          tinyint           = null output     
,   @scale                         tinyint           = null output     
,   @remote_type                   int               = null output        
,   @remote_name                   varchar(30)       = null output 
,   @xstatus                       int               = null output
,   @xtype                         int               = null output
,   @xdbid                         int               = null output
,   @accessrule                    int               = null output
,   @status2                       int               = null output
,   @datatype                      varchar(30)       = null output
)

Parameters

Parameter Description
objectname
 
Object to be examined. This name should be fully qualified if this object resides in another database.
name
 
The name of the column or parameter to be examined.

Example

The following example illustrates how to call SP_SYSCOLUMNS:

declare
    @datatype varchar(30)
begin
    exec sp_syscolumns

        @objectname = 'http.dbo.sp_html_who'
    ,   @name       = '@button'
    ,   @datatype   = @datatype output

    select 'Datatype is ' || @datatype
end


See Also

SP_HTML_CRON
SP_HTML_INPUT
SP_SYSOBJECTS
SP_SYSPROTECTS



Sybernet is a trademark of SRI International.
Copyright © 1996-2008 SRI International. All Rights Reserved.
Denis D. Workman / http://Sybernet.sri.com/