• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5381
  • Last Modified:

VB6 ADO Recordset Field Append adVarChar adLongVarChar

In VB6 ADO Recordset Field Append adVarChar adLongVarChar is the DefinedSize value number of bytes or number of characters (e.g. Chinese characters) . The links http://msdn.microsoft.com/en-us/library/ms675318(VS.85).aspx
and
http://msdn.microsoft.com/en-us/library/ms681564(VS.85).aspx
do not make it clear.
0
WayneGary
Asked:
WayneGary
1 Solution
 
Jeffrey CoachmanCommented:
WayneGary,

The "Values" you see listed there are simply the numeric equivlents of the "Constants".
So instead of using adChar, you could just substitute 129 in the code.

To see what they mght be equel to in SQL or Access Datatypes see here first to see:
ADO-->Access
and...
ADO-->SQL Server
http://www.w3schools.com/ADO/ado_datatypes.asp
Then see here for "All" of the storage size conversions (Access, SQL Server, MySQL, Access...ect:
http://www.w3schools.com/SQL/sql_datatypes.asp

;-)

JeffCoachman
0
 
WayneGaryAuthor Commented:
A very kind person called Ronggang Yu at Microsoft provided me with the perfact answer, which will paraphrase loosely as :

When you use adVarWChar the DefineSize is the number of characters so that :

"You are recommend to declare column as adVarWChar, 50, so that it can populate it with 50 Chinese or Japanese characters. adVarWChar indicates a null-terminated Unicode character string, which is more natural for Chinese or Japanese characters"
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now