VB6 ADO Recordset Field Append adVarChar adLongVarChar

Posted on 2009-02-12
Last Modified: 2012-06-27
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
do not make it clear.
Question by:WayneGary
    LVL 74

    Expert Comment

    by:Jeffrey Coachman

    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-->SQL Server
    Then see here for "All" of the storage size conversions (Access, SQL Server, MySQL, Access...ect:



    Accepted Solution

    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"

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
    A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now