Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
  HXTT Excel v4.2
  HXTT Paradox v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
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
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT Paradox
Problems with date
Douglas Sims
2007-07-23 11:54:43.0
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.0
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.0
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.0
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.0
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
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap