CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2001
    Posts
    36

    Size of OleDbType Fields

    How do you figure out the different field sizes for OleDbType?

    OleDbType.Integer is 4
    OleDbType.VarChar is whatever the string length is

    but what about the Date, Decimal, Numeric and all the other available types? I tried sizeof() but it only works on classes, not fields. Anyone have any ideas?

  2. #2
    Join Date
    Jun 2002
    Location
    Philadelphia, PA
    Posts
    85

    Re: Size of OleDbType Fields

    Originally posted by dvlpr
    How do you figure out the different field sizes for OleDbType?

    OleDbType.Integer is 4
    OleDbType.VarChar is whatever the string length is

    but what about the Date, Decimal, Numeric and all the other available types? I tried sizeof() but it only works on classes, not fields. Anyone have any ideas?
    Have you tried SizeOf(System.DateTime) for OleDbType.Date? If you read the following link, it tells you what each of various OleDbType's map too.

    http://msdn.microsoft.com/library/de...ClassTopic.asp

    I hope this helps you out.

  3. #3
    Join Date
    Nov 2001
    Location
    Nigeria
    Posts
    12

    Re: Size of OleDbType Fields

    Won't someone come up with an answer to this post. I have the same problem. I cannot find the correct size for the OleDbType.Date. In a few days time, I will have problems with the others.

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

Featured