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
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  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 Text(CSV)
Evaluation of HXTT Text (CSV)
Adrian Hine
2005-09-16 00:00:00
Dear Sir/madam,

I've downloaded HXTT Text for evaluation to see if it works in the application I am developing. However I am having problems getting the driver to work.

I have written a java page to test the driver (see below) but I am getting 'rubbish' data from my query results (see below) - its giving the correct rows and columns but not the correct data values.

Also I would like to use the driver with Sun Studio Creator (SSC) where I'm programming with JavaServer Faces. With this I set the datasource in the SSC tool itself and let the application handle the datasource. In my backing bean I set my rowset to the datasource specified. I do not have direct programming access to the DriverManager.getConnection method to set the driver properties. Do you know if I am able to use the driver withing Sun Studio Creator?

Java Driver Test class:
import java.sql.*;
import java.util.Properties;



public class JdbcTextDriver2
{
public static void main(String[] args)
{
try
{
// load the driver into memory
Class.forName("com.hxtt.sql.text.TextDriver");

// create a connection. The first command line parameter is assumed to
// be the directory in which the .csv files are held
//Connection conn = DriverManager.getConnection("jdbc:jstels:csv:" + args[0] );

Properties properties = new Properties();
properties.put("_CSV_Header", "true");
//properties.setProperty("fileExtension", "txt"); //If your CHK.TXT is a text table
properties.setProperty("csvfileExtension", "txt"); //If your CHK.TXT is a csv table
//properties.setProperty("schemaFile", "project.sql");


//prop.put("_CSV_Header", "false");
Connection conn = DriverManager.getConnection("jdbc:Text:/c:/Temp/FMSPTextData", properties);

// create a Statement object to execute the query with
Statement stmt = conn.createStatement();

// execute a query
ResultSet rs = stmt.executeQuery("SELECT * FROM Project");

// read the data and put it to the console
while (rs.next())
{
for(int j=1; j <= rs.getMetaData().getColumnCount(); j++){
System.out.print(rs.getObject(j)+ "\t");
}
System.out.println();
}

// close the objects
rs.close();
stmt.close();
conn.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}

Results from running above test class:

[B@1ccb029 [B@1415de6 [B@7bd9f2 [B@121cc40 [B@1e893df [B@443226 null null [B@1386000 null null null null null null null null
[B@26d4f1 [B@1662dc8 [B@147c5fc [B@1174b07 [B@3eca90 [B@64dc11 null [B@1ac1fe4 [B@161d36b [B@17f1ba3 null null null null null null null
[B@1ef8cf3 [B@ecd7e [B@1d520c4 [B@15a3d6b [B@1764be1 [B@16fd0b7 null [B@1ef9f1d [B@b753f8 [B@1e9cb75 null null null null null null null
[B@2c84d9 [B@c5c3ac [B@1b16e52 [B@1c1ea29 [B@1f436f5 [B@4413ee null [B@1786e64 [B@197a37c [B@6e3d60 null null null null null null null
[B@17fa65e [B@18385e3 [B@1cb25f1 [B@2808b3 [B@535b58 [B@922804 null [B@1815859 [B@cf40f5 [B@b1c260 null null null null null null null
[

Re:Evaluation of HXTT Text (CSV)
HXTT Support
2005-09-16 00:00:00
Can you send your project.sql and the FMSPTextData file to our email(webmaster@hxtt.com)?

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