SIFWorks ADK 2.0
SQLField Class
NamespacesEdustructures.SifWorks.Tools.QuerySQLField

[This is preliminary documentation and is subject to change.]

Encapsulates a field name and type from a DbType
Declaration Syntax
C#Visual BasicVisual C++
public class SQLField
Public Class SQLField
public ref class SQLField
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
SQLFieldSQLFieldNew(String, DbType)
Constructor

DbType
Name
Render(String)
Render a field value given the System.Data.DbType enum value passed to the constructor

RenderDate(String)
Render a field value as a date

RenderGuid(String)
Render a field value as a date

RenderNumeric(String)
Render a field value as a number

RenderString(String)
Render a field value as a string

RenderTime(String)
Render a field value as a time

Remarks
When preparing a dictionary to be passed to the SQLQueryFormatter.format method, the caller must map ElementDef constants to instances of SQLField. The DbType enum value is used to render the field according to its data type (e.g. strings are quoted with a single quote, numeric fields are rendered as-is, etc.)
Examples
For example,
CopyC#
IDictionary m = new Hashtable();
m[ SIFDTD.STUDENTPERSONAL_REFID ] =
new SQLField( "Students.Foreign_ID", DbType.String ) ;
m[ SIFDTD.NAME_LASTNAME ],
new SQLField( "Students.Last_Name",  DbType.String ) ;
m[ SIFDTD.NAME_FIRSTNAME ],
new SQLField( "First_Name", DbType.String ) ;
m[ SIFDTD.DEMOGRAPHICS_CITIZENSHIPSTATUS ],
new SQLField( "Students.US_Citizen_Bool{04=1,=0}", DbType.Int32 ) ;
The above example might result in a string such as "( Students.US_Citizen_Bool = 0 )" or "( Students.Foreign_ID = '898' ) OR ( Students.Last_Name = 'Cortez' AND First_Name = 'Robert' )"
Inheritance Hierarchy
Object
SQLField

Assembly: Edustructures.SifWorks.Adk (Module: Edustructures.SifWorks.Adk) Version: 2.0.0.10