PDA

View Full Version : long data type in ADO recordset



rrrprogramer
08-05-2009, 07:21 AM
in VBA, we use a long data type. I am using ADO recordset where i need to define the fields and the field's data type. I'm looking for a long data type in recordset. Is it adlongvarBinary??

what is difference between adLongVarBinary and adLongVarChar and adLongVarWChcar?

Oorang
08-07-2009, 01:59 PM
1.) MS Access Number/Long fields are adInteger.
2.) MS Access Text fields are adVarWChar
3.) MS Access Memo fields are adLongVarWChar.
4.) The W indicates you want the data stored in unicode format. W stands for "wide", referring to the 2 bytes per character of unicode vs 1 byte per character of the older ASCII. 99.9% of the time you will want to use unicode when working with Access/VB. Everything in Office and VB is implemented in Unicode and not using it can cause all manner of unanticipated consequences.