Results 1 to 2 of 2

Thread: How to figure out a field type on a table

  1. #1
    Join Date
    Mar 2012
    Posts
    1

    Default How to figure out a field type on a table

    Hello,
    My question is about jdbcTemplate and table fields.
    Is there any way to know the field type from a table using jdbcTemplate?. My goal is to know the field type and then insert its value specifying that type. I was seeking for an answer through the web but it was hard to find something useful.
    Thanks in advance.

    Héctor.

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,795

    Default

    Hello

    My goal is to know the field type and then insert its value specifying that type.
    I think is not possible and has no sense.

    Read carefully the JdbcTemplate API

    You should know before the table's types fields to then you can create the POJO specifying the properties type according with the table's type fields, Spring should do the mapping or conversion when you work with JdbcTemplate around your POJO

    BTW Even if you will get a solution, why do you want resolve such situation?
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Tags for this Thread

Posting Permissions

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