Results 1 to 2 of 2

Thread: Ms Access Data Types

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Location
    South Africa
    Posts
    123

    Question Ms Access Data Types

    Hi Guys,

    How can a get the data types for fields in a MS Access database.
    I need to know what data type the field acceppts,so there is'nt any Type Mismatch errors when inserting.

    Any Suggestions?
    Beware of the Dog

  2. #2
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655
    Assuming you already have the recordset using ADO, you can get the field type like this:

    VB Code:
    1. Dim Fld As ADODB.Field
    2.  
    3. For Each Fld In rs.Fields
    4.     debug.print Fld.Type
    5. Next

    Keep in mind that this returns an integer value corresponding to a constant in the DataTypeEnum.
    www.RealisticGraphics.net

    Running VS.Net Enterprise & VB 6

    Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML

    MSN Messenger: kmsheff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width