V
Vayse
Is it possible to read the size of a field from the schema?
For examle, I am running a query
Dim stSQL As String = "UPDATE Assets SET StatusID = ? WHERE AssetCode = ?"
Dim commandAsset As New OleDbCommand(stSQL, connAsset)
commandAsset.Parameters.Add("@AssetCode", OleDbType.VarChar, 6).Value =
stAssetCode
commandAsset.Parameters.Add("@StatusID", OleDbType.VarChar, 1).Value =
conSTATUS_DISPOSED
Now, instead of using 6 and 1 as the field size, I'd like to read it from
the schema. AssetsDataSet.xsd is the schema and Assets is the table.
The AssetCode will be used a lot, so I was thinking I could read its size
once at the start, then use it throughout the project. Store in a global
variable or My.Settings, or something like that.
Thanks
Vayse
For examle, I am running a query
Dim stSQL As String = "UPDATE Assets SET StatusID = ? WHERE AssetCode = ?"
Dim commandAsset As New OleDbCommand(stSQL, connAsset)
commandAsset.Parameters.Add("@AssetCode", OleDbType.VarChar, 6).Value =
stAssetCode
commandAsset.Parameters.Add("@StatusID", OleDbType.VarChar, 1).Value =
conSTATUS_DISPOSED
Now, instead of using 6 and 1 as the field size, I'd like to read it from
the schema. AssetsDataSet.xsd is the schema and Assets is the table.
The AssetCode will be used a lot, so I was thinking I could read its size
once at the start, then use it throughout the project. Store in a global
variable or My.Settings, or something like that.
Thanks
Vayse