Find actual field size of numeric field


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Find actual field size of numeric field

  1. #1
    bservello Guest

    Find actual field size of numeric field


    Hi
    I need to find actual field size of numeric field

    example

    num1 is defined as 15 in length numeric

    but when i go get the size


    rs.field(i).size comes back with 8 which is max storage, I want the 15 length
    don't know how to get it.

    B. Servello

  2. #2
    Gonzalo Medina Guest

    Re: Find actual field size of numeric field


    "bservello" <bservello@smrtytrek.com> wrote:
    >
    >Hi
    >I need to find actual field size of numeric field
    >
    >example
    >
    >num1 is defined as 15 in length numeric
    >
    >but when i go get the size
    >
    >
    >rs.field(i).size comes back with 8 which is max storage, I want the 15

    length
    >don't know how to get it.
    >
    >B. Servello

    Let see if I undertood. You executed an SQL Statement is returning a numeric
    field and you want to know the length for this value.

    'The Connection and recordet has been declare before.
    rst.Open "SELECT field1 FROM Table1",cnn

    The field1 hold a value of 1970 the lenght is four characters. The following
    line of code will return four:
    Debug.Print Len(CString(rst("Field1").Value))

    Let me know if I'm wrong, we can talk about it

    Have fun :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center