- #INFORMIX ODBC CAST MONEY HOW TO#
- #INFORMIX ODBC CAST MONEY DRIVER#
- #INFORMIX ODBC CAST MONEY CODE#
- #INFORMIX ODBC CAST MONEY WINDOWS#
#INFORMIX ODBC CAST MONEY DRIVER#
If set to x, the driver retries connection attempts the specified number of times. If set to 0, the driver does not try to reconnect after the initial unsuccessful attempt. Valid values: 0 | x where x is a positive integer. If an application sets a login timeout value (for example, using DataSource.loginTimeout or DriverManager.loginTimeout), and the login timeout expires, the driver ceases connection attempts. The number of times the driver retries connection attempts to the primary database server, and if specified, alternate servers until a successful connection is established.
#INFORMIX ODBC CAST MONEY CODE#
Valid Values: string where string is the name of a valid code page that is supported by your JVM. Use this property only if you need to change the driver's default behavior. All Character data that is returned from or written to the database is converted using the specified code page.īy default, the driver automatically determines which code page to use to convert Character data. The specified code page overrides the default database code page or column collation. The code page to be used by the driver to convert Character data. Valid Values: string where string is a valid user ID. This value is stored locally and is used for database administration/monitoring purposes. The user ID to be stored in the database. Valid Values: string where string is the host name of the client machine. The host name of the client machine to be stored in the database. Valid Values: string where string is the name of the application. Thisvalue is stored locally and is used for database administration/value is stored locally and is used for database administration/monitoring purposes. The name of the application to be stored in the database. Jdbc:weblogic:informix://server1:2003 InformixServer=TestServer DatabaseName=Test AlternateServers=(server2:2003 InformixServer=TestServer2,server3:2003 InformixServer=TestServer3) The alternate server entries contain the optional InformixServer property.
Optional connection properties are DatabaseName and InformixServer.Įxample: The following URL contains alternate server entries for server2 and server3. If the port number of the primary server is unspecified, the default port number of 2003 is used. If the port is unspecified, the port number of the primary server is used. Port number ( port1, port2, and so on) and connection properties ( property= value) are optional for each alternate server entry. The server name ( servername1, servername2, and so on) is required for each alternate server entry. See the FailoverMode property for information about choosing a failover method. The default value is an empty string.Ī list of alternate database servers that is used to failover new or lost connections, depending on the failover method selected. Valid Values: string where string is the accounting information. This value is stored locally and is used for database administration/monitoring purposes SQLException: 4-1 Informix Connection String Properties PropertyĪccounting information to be stored in the database. Insert into _money_test (amt) values ('123.45') SQLException: : Character to numeric conversion error Insert into _money_test (amt) values ('123,45')įile "ifx_jdbc_money.py", line 16, in test_money Results when I run money literal with dot and comma: C:\db_examples>jython ifx_jdbc_money.py Test_money("", 'jdbc:odbc:test', 'informix', 'passwd') Rs = c.executeQuery("select amt from _money_test") Print("\n\n%s\n-" % (driver))ĭb = DriverManager.getConnection(db_url, usr, passwd) QUERY = "insert into _money_test (amt) values ('123.45')"ĭef test_money(driver, db_url, usr, passwd): I have set DBMONEY to just dot: DBMONEY=.Ĭlass.forName("") I have ODBC and JDBC Informix client in version 3.50 TC5/JC5.
#INFORMIX ODBC CAST MONEY HOW TO#
How to force JDBC to use DBMONEY (or simply dot) in literals? I checked that in PreparedStatement I must use dot separator: 123.45.Īnd of course I can use: insert into _money_test (amt) values (123.45)īut some code is "general", it imports data from csv file and it was safe to put number into string literal.
I live in Poland and have Polish locale and in my country comma separatesĭecimal part of number, so I tried: insert into _money_test (amt) values ('123,45')
#INFORMIX ODBC CAST MONEY WINDOWS#
The same SQL works from native Windows application using ODBC driver.
I got exception: Character to numeric conversion error When I insert into MONEY column: insert into _money_test (amt) values ('123.45') I have problem with JDBC application that uses MONEY data type.