Need to get data length property of a column by VB code.

How do I get the length of a varchar datatype for a given table and column?

I need a VB function that I can pass the table name and column name as parmeters and return the column lenght for varchar data types. I am working with ADODB connections and Access forms using VB behind events.

Thanks,

DovbermanAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
you can query the INFORMATION_SCHEMA.COLUMNS view:
http://msdn.microsoft.com/en-us/library/ms188348.aspx

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.

All Courses

From novice to tech pro — start learning today.