MobiLink Synchronization User's Guide
Writing Synchronization Scripts in .NET
MobiLink .NET API Reference
public class DBParameter
Member of iAnywhere.MobiLink.Script
Represents a bound ODBC parameter.
DBParameter is required to execute commands with parameters. All parameters must be in place before the command is executed.
For example, the following C# code uses DBCommand to execute an update with parameters:
DBCommand cstmt = conn.CreateCommand();
cstmt.CommandText = "call myProc( ?,?,? )";
cstmt.Prepare();
DBParameter param = new DBParameter(); param.DbType = SQLType.SQL_CHAR; param.Value = "10000"; cstmt.Parameters.Add( param );
param = new DBParameter(); param.DbType = SQLType.SQL_INTEGER; param.Value = 20000; cstmt.Parameters.Add( param );
param = new DBParameter(); param.DbType = SQLType.SQL_DECIMAL; param.Precision = 5; param.Value = new Decimal( 30000 ); cstmt.Parameters.Add( param );
// Execute update DBRowReader rset = cstmt.ExecuteNonQuery(); cstmt.Close();
public SQLTYPE dbType
The value is the SQLType of this parameter.
Default: SQLType.SQL_TYPE_NULL.
public System.Data.ParameterDirection Direction
The value is the Input/Output direction of this parameter.
Default: ParameterDirection.Input.
public bool IsNullable
The value Indicates whether this parameter can be NULL.
Default: false.
public string ParameterName
The value is the name of this parameter.
Default: null.
public uint Precision
The value is the decimal precision of this parameter. Only used for SQLType.SQL_NUMERIC and SQLType.SQL_DECIMAL parameters.
Default: 0.
public short Scale
The value is the resolvable digits of this parameter. Only used for SQLType.SQL_NUMERIC and SQLType.SQL_DECIMAL parameters.
Default: 0.
public uint Size
The value is the size in bytes of this parameter.
Default: Inferred from DbType.
public object Value
The value is the value of this parameter.
Default: null.