OleDbDataAdapter and OleDbType.LongVarWChar

What do I specify for the length when I use OleDbType.LongVarWChar as the datatype?

  OleAdp.InsertCommand.Parameters.Add("@customer_desc", OleDbType.LongVarWChar, ???, "customer_desc")
LVL 1
HLRosenbergerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Robberbaron (robr)Connect With a Mentor Commented:
https://msdn.microsoft.com/en-us/library/xy9dbyk1(v=vs.110).aspx

Remarks
The Size is inferred from the value of the dataType parameter if it is not explicitly set in the size parameter.

so for fields that have defined sizes such as Date, Boolean etc, no length is required.

    Dim parameter As New OleDbParameter("Description", OleDbType.VarChar, 88)
    parameter.Direction = ParameterDirection.Output

the example shows for a varchar, the length should match the field length or the max size you will allow to be saved to the database.
0
 
HLRosenbergerAuthor Commented:
Same question for OleDbType.Date.
0
 
HLRosenbergerAuthor Commented:
Same question for OleDbType.Boolean
0
 
HLRosenbergerAuthor Commented:
Thanks!
0
All Courses

From novice to tech pro — start learning today.