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

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