Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Ingres Dates using jdbc
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  13 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ingres Forums  
View profile  
 More options Jan 31, 3:56 pm
Newsgroups: comp.databases.ingres
From: Ingres Forums <info-ing...@kettleriverconsulting.com>
Date: Tue, 31 Jan 2012 14:56:07 -0600
Local: Tues, Jan 31 2012 3:56 pm
Subject: Ingres Dates using jdbc

I am new to Ingres, I am sure this must be an old issue but I am having
trouble finding a solution.

Using a 9.2 Legacy Ingres DB, I cannot get Squirrel to load 'blank'
dates as anything other than the epoch value '1-JAN-1970....'.

I have updated the iijdbc.properties in the ingresII/ingres/files
directory.
ingres.jdbc.date.empty=null

I have validated that the classpath is correct and according to any
information I have read, it is.

Is there something else I need to correct in order to read blankdates as
null?

--
wolaniukm
------------------------------------------------------------------------
wolaniukm's Profile: http://community.actian.com/forum/member.php?userid=98861
View this thread: http://community.actian.com/forum/showthread.php?t=14193


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingres Forums  
View profile  
 More options Jan 31, 7:11 pm
Newsgroups: comp.databases.ingres
From: Ingres Forums <info-ing...@kettleriverconsulting.com>
Date: Tue, 31 Jan 2012 18:11:02 -0600
Local: Tues, Jan 31 2012 7:11 pm
Subject: Re: Ingres Dates using jdbc

What JDBC driver version are you using (run 'java JdbcInfo' in
$II_SYSTEM/ingres/lib)?

--
thogo01
------------------------------------------------------------------------
thogo01's Profile: http://community.actian.com/forum/member.php?userid=4992
View this thread: http://community.actian.com/forum/showthread.php?t=14193


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kristoff  
View profile  
 More options Feb 1, 8:16 am
Newsgroups: comp.databases.ingres
From: Kristoff <kristoff.pic...@ingres.com>
Date: Wed, 1 Feb 2012 05:16:10 -0800 (PST)
Local: Wed, Feb 1 2012 8:16 am
Subject: Re: Ingres Dates using jdbc
On Jan 31, 9:56 pm, Ingres Forums <info-

The directory where iijdbc.properties is stored needs to be added to
the classpath. The startup scripts for SQuirreL defines the classpath,
but instead of manipulating it here I would add the directory in the
"Extra Class Path" Tab in the Driver definition.  (I wouldn't use the
ingres/files directory for that, but it doesn't matter ...)

I've tested it and it works fine.

Kristoff

Kristoff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingres Forums  
View profile  
 More options Feb 2, 11:06 am
Newsgroups: comp.databases.ingres
From: Ingres Forums <info-ing...@kettleriverconsulting.com>
Date: Thu, 2 Feb 2012 10:06:15 -0600
Local: Thurs, Feb 2 2012 11:06 am
Subject: Re: Ingres Dates using jdbc

Although I have tried several the current version of the driver that I
am using is 3.4.11

--
wolaniukm
------------------------------------------------------------------------
wolaniukm's Profile: http://community.actian.com/forum/member.php?userid=98861
View this thread: http://community.actian.com/forum/showthread.php?t=14193


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingres Forums  
View profile  
 More options Feb 2, 1:12 pm
Newsgroups: comp.databases.ingres
From: Ingres Forums <info-ing...@kettleriverconsulting.com>
Date: Thu, 2 Feb 2012 12:12:54 -0600
Local: Thurs, Feb 2 2012 1:12 pm
Subject: Re: Ingres Dates using jdbc

I have tried the extra path option in squirrel, to no avail.
Regardless of how I set the ingres.jdbc.date.empty=null in the
properties, Squirrel will not return null for blank dates.

As I have said I am new to Ingres, could this be a DB issue rather than
just a squirrel/jdbc issue?

Thanks very much for your time.

--
wolaniukm
------------------------------------------------------------------------
wolaniukm's Profile: http://community.actian.com/forum/member.php?userid=98861
View this thread: http://community.actian.com/forum/showthread.php?t=14193


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jean-Pierre Zuate, La Fage Conseil  
View profile  
 More options Feb 2, 1:51 pm
Newsgroups: comp.databases.ingres
From: "Jean-Pierre Zuate, La Fage Conseil" <jean-pierre.zu...@lafageconseil.fr>
Date: Thu, 2 Feb 2012 19:51:58 +0100
Local: Thurs, Feb 2 2012 1:51 pm
Subject: Re: [Info-Ingres] Ingres Dates using jdbc

I hall,

I have the same issue with Ingres 9.2 and dbvisualizer. It seems it is not
possible to set the parameter date.empty ...

Can someone help ?

Thx in advance,
--
Jean-Pierre Zuate
La Fage Conseil
01 55 68 12 25
jean-pierre.zu...@lafageconseil.fr
http://lafageconseil.fr/

2012/2/2 Ingres Forums <info-ing...@kettleriverconsulting.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingres Forums  
View profile  
 More options Feb 2, 6:00 pm
Newsgroups: comp.databases.ingres
From: Ingres Forums <info-ing...@kettleriverconsulting.com>
Date: Thu, 2 Feb 2012 17:00:14 -0600
Local: Thurs, Feb 2 2012 6:00 pm
Subject: Re: Ingres Dates using jdbc

The first thing is to confirm that empty dates can be handled outside
Squirrel.  Try the test program below both with and without converting
empty dates to null:

java IngEmpty
java -Dingres.jdbc.date.empty=null IngEmpty

I tried the 3.4.11 driver and it worked as expected.  If you get this to
work, but it doesn't work in Squirrel, then it could either be a
Squirrel problem or just that the driver isn't seeing the config.

Code:
--------------------

  import java.io.*;
  import java.sql.*;

  public class IngEmpty
  {

  private static String host = "localhost";
  private static String port = "II7";
  private static String db = "iidbdb";
  private static String uid = "";
  private static String pwd = "";
  private static String attr = "";

  public static void
  main( String args[] )
  throws        IllegalAccessException,
                ClassNotFoundException,
                InstantiationException,
                IOException,
                SQLException
  {
  Connection    conn;
  String        url = "jdbc:ingres://" + host + ":" + port + "/" + db;

  if ( uid.length() > 0 )  url += ";UID=" + uid + ";PWD=" + pwd;
  if ( attr.length() > 0 )  url += attr;

  Class.forName("com.ingres.jdbc.IngresDriver");

  try
  {
        if ( (conn = DriverManager.getConnection( url )) == null )
        {
            System.out.println( "no driver available" );
            return;
        }
  }
  catch( SQLException ex )
  {
        printSQLException( ex );
        return;
  }

  try
  {
        Statement stmt = conn.createStatement();
        ResultSet rs = stmt.executeQuery("select ingresdate('')");

        while( rs.next() )
        {
            Timestamp ts = rs.getTimestamp(1);
            if ( rs.wasNull() )
                System.out.println( "Date  : NULL" );
            else
                System.out.println( "Date   : " + ts.toString() );

            System.out.println( "String: " + rs.getString(1) );
        }

        rs.close();
  }
  catch( SQLException ex )
  {
        printSQLException( ex );
  }
  finally
  {
        conn.close();
  }
  }

  private static void
  printSQLException( SQLException ex )
  {
  do
  {

        System.out.print( "SQLException: '" );
        System.out.print( ex.getSQLState() );
        System.out.print( "' 0x" );
        System.out.print( Integer.toHexString( ex.getErrorCode() ) );
        System.out.print( " -- " );
        System.out.println( ex.getMessage() );

  } while( (ex = ex.getNextException()) != null );

  return;
  }

  }

--------------------

--
thogo01
------------------------------------------------------------------------
thogo01's Profile: http://community.actian.com/forum/member.php?userid=4992
View this thread: http://community.actian.com/forum/showthread.php?t=14193


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kristoff  
View profile  
 More options Feb 3, 4:18 am
Newsgroups: comp.databases.ingres
From: Kristoff <kristoff.pic...@ingres.com>
Date: Fri, 3 Feb 2012 01:18:09 -0800 (PST)
Local: Fri, Feb 3 2012 4:18 am
Subject: Re: Ingres Dates using jdbc
On Feb 2, 7:12 pm, Ingres Forums <info-

ing...@kettleriverconsulting.com> wrote:
> I have tried the extra path option in squirrel, to no avail.
> Regardless of how I set the ingres.jdbc.date.empty=null in the
> properties, Squirrel will not return null for blank dates.

Try with the following "iijdbc.properties" file:
ingres.jdbc.trace.log=/tmp/jdbc.log
ingres.jdbc.trace.drv=3
ingres.jdbc.trace.ds=1
ingres.jdbc.trace.timestamp=true
ingres.jdbc.date.empty=NULL

When iijdbc.properties is picked up you will get a trace file /tmp/
jdbc.log. If there is no such file, then there is something wrong with
the classpath setting or with the filename or may be permissions to
read the file.
If the trace file is created, you should see a "Conn: date.empty=NULL"
in that file somewhere at the beginning.

Kristoff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingres Forums  
View profile  
 More options Feb 3, 12:54 pm
Newsgroups: comp.databases.ingres
From: Ingres Forums <info-ing...@kettleriverconsulting.com>
Date: Fri, 3 Feb 2012 11:54:40 -0600
Local: Fri, Feb 3 2012 12:54 pm
Subject: Re: Ingres Dates using jdbc

Below are the returns from the program. How can I verifiy if the driver
is seeing the config?

C:\Program Files\Java\jdk1.6.0_26\jre\bin>java IngEmpty
Date  : NULL
String: null

C:\Program Files\Java\jdk1.6.0_26\jre\bin>java
-Dingres.jdbc.date.empty=null IngEmpty
Date  : NULL
String: null

This may be an uniformed question but ....
Squirrel runs on eclipse and eclipse uses jboss. Could JBoss have
anything to do with this?

Thank-you very much for the time!

--
wolaniukm
------------------------------------------------------------------------
wolaniukm's Profile: http://community.actian.com/forum/member.php?userid=98861
View this thread: http://community.actian.com/forum/showthread.php?t=14193


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingres Forums  
View profile  
 More options Feb 3, 1:27 pm
Newsgroups: comp.databases.ingres
From: Ingres Forums <info-ing...@kettleriverconsulting.com>
Date: Fri, 3 Feb 2012 12:27:55 -0600
Local: Fri, Feb 3 2012 1:27 pm
Subject: Re: Ingres Dates using jdbc

The output from 'java -Dingres.jdbc.date.empty=NULL IngEmpty' shows that
the driver is turning the empty date into a null value.  The fact that
you get the same output for 'java IngEmpty' indicates that the driver,
at least in a pure Java environment, is seeing the properties file with
the empty date config.  

Now you need to get the config info into the driver in the Squirrel
environment.  Unfortunately, I'm not familiar with that environment and
can't provide further assistance other than one of the following is
needed:

* The driver will load iijdbc.properites if it is in a directory which
is referenced by the CLASSPATH used in the environment.
* Define the system property ingres.jdbc.property_file with the path to
the properties file.
* Define the system property ingres.jdbc.date.empty directly.

--
thogo01
------------------------------------------------------------------------
thogo01's Profile: http://community.actian.com/forum/member.php?userid=4992
View this thread: http://community.actian.com/forum/showthread.php?t=14193


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingres Forums  
View profile  
 More options Feb 3, 1:57 pm
Newsgroups: comp.databases.ingres
From: Ingres Forums <info-ing...@kettleriverconsulting.com>
Date: Fri, 3 Feb 2012 12:57:23 -0600
Local: Fri, Feb 3 2012 1:57 pm
Subject: Re: Ingres Dates using jdbc

* Define the system property ingres.jdbc.property_file with the path to
the properties file.

This one confuses me, according to what I have read on the web, this is
a property contained in the properties file? Can you provide an example
of where/how I would set this.

--
wolaniukm
------------------------------------------------------------------------
wolaniukm's Profile: http://community.actian.com/forum/member.php?userid=98861
View this thread: http://community.actian.com/forum/showthread.php?t=14193


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingres Forums  
View profile  
 More options Feb 6, 12:32 pm
Newsgroups: comp.databases.ingres
From: Ingres Forums <info-ing...@kettleriverconsulting.com>
Date: Mon, 6 Feb 2012 11:32:03 -0600
Local: Mon, Feb 6 2012 12:32 pm
Subject: Re: Ingres Dates using jdbc

java -Dingres.jdbc.property_file=c:\apps\appinfo.properties MyApp

Since this property indicates the location and name of the properties
file, it doesn't really do anything if placed in the properties file
itself.

--
thogo01
------------------------------------------------------------------------
thogo01's Profile: http://community.actian.com/forum/member.php?userid=4992
View this thread: http://community.actian.com/forum/showthread.php?t=14193


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jean-Pierre Zuate, La Fage Conseil  
View profile  
 More options Feb 7, 6:46 am
Newsgroups: comp.databases.ingres
From: "Jean-Pierre Zuate, La Fage Conseil" <jean-pierre.zu...@lafageconseil.fr>
Date: Tue, 7 Feb 2012 12:46:41 +0100
Local: Tues, Feb 7 2012 6:46 am
Subject: Re: [Info-Ingres] Ingres Dates using jdbc

I know my question was not exactly in the subject but have my reply :
*iijdbc.properties* must be located in *DB Visualizer home\resources*.
FYI
--
Jean-Pierre Zuate
La Fage Conseil
01 55 68 12 25
jean-pierre.zu...@lafageconseil.fr
http://lafageconseil.fr/

2012/2/2 Jean-Pierre Zuate, La Fage Conseil <
jean-pierre.zu...@lafageconseil.fr>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »