JDBC Properties setting for ANSI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lawardy
    New Member
    • Sep 2007
    • 5

    JDBC Properties setting for ANSI

    Hi ,

    I am using Microsoft SQL Server 2005 JDBC Driver to connect to my SQL Database from my Java Midtier.

    By Default JDBC Driver set the ANSI_PADDING to ON.

    I know I can override this on per session level by doing something like this:

    con.prepareStat ement("set ANSI_PADDING OFF exec RDB_WD2PerfGetI ncomeExpense ?,?,? ");

    It works but means that I have to set it for every one of my sql statements, which are everywhere, around 1000 all ups.

    My Question is, Is there a way to set it up on JDBC Driver level for the whole Java Apps. Any suggestion is appriciated. Please help.

    Regards,

    Lawardy
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Not sure if this helpful, but have a look here:Product Support Forums • View topic - Using ANSI nulls, padding and warnings

    Also, perhaps you should write more stored procedures for your app. If you have a lot of statements in your app, it may be difficult to debug. Stored procedures would allow you to tackle at the back-end level of things:-)
    Last edited by Dököll; Dec 17 '08, 02:55 AM. Reason: have for ahve ;-)

    Comment

    Working...