Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  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 DBF
HXTT DBF and columns named CHECK
Donald Brady
2005-11-16 00:00:00
Hi

I submitted a question yesterday regarding your driver and Apple WebObjects. I believe the problem to be with your driver. I have attached some sample code. Basically any fetch from the database which refers to a column named CHECK will fail with this error:

The following error occured in reading from the table: java.sql.SQLException: Failed to parse: Stopped parse at CHECK

CHECK is the most important column for my application. It's the check number on a restaurant ticket and used extensively by the Aloha POS. Here is my code:

import java.sql.*;

class Examplebase {
public static void main(String[] args) {

try {

Class.forName("com.hxtt.sql.dbf.DBFDriver");

Connection connection = DriverManager.getConnection("jdbc:dbf:////Network/Servers/xserve/Volumes/Primary/Users/bradydonald/Desktop/20051105");

Statement statement = connection.createStatement();

// This statement will fail if the t0.CHECK column is there. Remove that column and it will work fine. Why?
ResultSet resultSet = statement.executeQuery("SELECT t0.AMOUNT, t0.CHECK, t0.CLOSEHOUR, t0.CLOSEMIN, t0.COUNT, t0.DOB, t0.EMPLOYEE, t0.OCCASION, t0.OPENHOUR, t0.OPENMIN, t0.ORDERHOUR, t0.ORDERMIN, t0.PERIOD, t0.REVENUE, t0.REVID2, t0.SHIFT, t0.TIPEMP, t0.TYPE, t0.TYPEID, t0.TYPEID2, t0.UNIT, t0._rowid_ FROM GNDSALE t0");

// This statement will also work:
//ResultSet resultSet = statement.executeQuery("SELECT t0.* FROM GNDSALE t0");

while (resultSet.next())
{
System.out.println(resultSet.getString(1) + " " + resultSet.getString(2));
}

resultSet.close();
statement.close();
connection.close();

} catch(java.lang.ClassNotFoundException cnfException) {
System.out.println("The following error occured in finding the HXTT driver: " + cnfException);

} catch(SQLException sqlException) {
System.out.println("The following error occured in reading from the table: " + sqlException);
}
}
}

Just email me if you want the DBF I am using.

Re:HXTT DBF and columns named CHECK
HXTT Support
2005-11-16 00:00:00
Please download the latest package since we have supported CHECK (a SQL reserved word) as column name.

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