Home > Archive > SQL Server JDBC > March 2006 > set ansi_nulls in connection url









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author set ansi_nulls in connection url
jordan_mccall@hotmail.com

2006-03-08, 8:23 pm

I'm a newbie to jdbc, so sorry if this is a dumb question. I've
inherited some code that uses jdbc connections to a sql server through
a config file. I'm trying to figure out if I can set the connection to
connect with ansi_nulls to "off". The config file lists the connection
properties as follows:

<Resource name="jdbc/tdr"
type="javax.sql.DataSource"
driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
password="xxxx"
maxIdle="2"
maxWait="5000"
username="xxxx"

url=" jdbc:microsoft:sqlse
rver://208.152.51. 6:1433;SENDSTRINGPAR
AMETERSASUNICODE=fal
se;DatabaseName=anal
yst_tdr;"
maxActive="40"/>

I've searched high and low for some documentation on how to do this but
have come up short. If anyone can help, it is greatly appreciated!

Green

2006-03-08, 8:23 pm

ANSI_NULLS is the database option and cannot be set using JDBC
connection properties. You will first have to connect to your db and
then issue the set ANSI_NULLS command to it.

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com