Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT Paradox
Problems with date
Douglas Sims
2007-07-23 11:54:43
I've had several problems with using dates in queries with Paradox and the HXTT drive. I'm not sure if this is a bug in my code, in Paradox itself, or in the driver. Perhaps you can help to clarify.

Following is an example of one such date problem.

The WHERE clauses specifies that only rows of a certain date should be returned but the query does in fact return all rows, no matter what the date is.

Thanks for your help.


System.out.println("------------------ history.emptime ---------------");
stmt=con.createStatement();
String query="SELECT T.employee_key, T.start_date, T.start_time, T.stop_date, T.stop_time, T.wage, E.first, E.last FROM history.emptime T LEFT JOIN config.employee E ON T.employee_key=E.employee_key WHERE T.start_date= {d'" + new SimpleDateFormat("yyyy-MM-dd").format(date) + "'}";
System.out.println(" About to execute query: " + query);
results=stmt.executeQuery(query);

while (results.next()) {
System.out.println(results.getInt("Employee_Key") + " start_date: " + results.getDate("start_date") + " start_time: "+ results.getInt("start_time") + " stop_date: " + results.getDate("stop_date") + " stop_time: " + results.getInt("stop_time") + " wage: " + results.getDouble("wage"));
}

stmt.close();



------------------ history.emptime ---------------
About to execute query: SELECT T.employee_key, T.start_date, T.start_time, T.stop_date, T.stop_time, T.wage, E.first, E.last FROM history.emptime T LEFT JOIN config.employee E ON T.employee_key=E.employee_key WHERE T.start_date= {d'2007-07-23'}
1002 start_date: 2006-05-31 start_time: 40486453 stop_date: 2006-05-31 stop_time: 40506906 wage: 1.0
1003 start_date: 2006-05-30 start_time: 27120000 stop_date: 2006-05-30 stop_time: 43027734 wage: 7.25
1003 start_date: 2006-05-31 start_time: 26697578 stop_date: 2006-05-31 stop_time: 54003296 wage: 7.25
1003 start_date: 2006-06-01 start_time: 27664171 stop_date: 2006-06-01 stop_time: 50578046 wage: 7.25
1003 start_date: 2006-06-02 start_time: 26606953 stop_date: 2006-06-02 stop_time: 38062109 wage: 7.25
1003 start_date: 2006-06-03 start_time: 26497078 stop_date: 2006-06-03 stop_time: 49947718 wage: 7.25
1003 start_date: 2006-06-04 start_time: 26460000 stop_date: 2006-06-04 stop_time: 49718421 wage: 7.25
1003 start_date: 2006-06-05 start_time: 27000000 stop_date: 2006-06-05 stop_time: 51660000 wage: 7.25
Re:Problems with date
Dougas Sims
2007-07-23 16:34:56
Also, I did reindex the two tables in this example (history.emptime and config.employee) and got the same result.
Re:Re:Problems with date
Douglas Sims
2007-07-25 07:01:47
This issue is still unresolved. Can anyone suggest a solution or further questions?
Re:Re:Re:Problems with date
HXTT Support
2007-07-25 07:17:39
We're still tring to recur your issue, but failed. If possible, you can zip and email webmaster@hxtt.com your db sample.
Re:Re:Re:Re:Problems with date
HXTT Support
2007-08-20 07:15:26
HXTT hasn't received more issue report from you, so that we guess that you have resolved your issue with the latest package.

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap