• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5488
  • 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 CoachmanMIS LiasonCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

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