Hi,
Create a new Table in microsoft access under Design View . Create a column with Data type as "Number". For this particular column enter the Field Properties under the General tab of it as :
Field Size : Decimal (Select using drop down).
Precision : 18.
Scale : 10.
Save the table with some name. Enter a record with value as "123.45".
I've have attached a sample program which tries to get the value of the record from the table with a select query.
When the scale is 10 the value returned is 874.7111963759, but when the scale is 11 the value returned is 10145.15958199481.This might help.
The hxtt version is 1.1.032 on May 08, 2006.
Thx in advance,
Andrei
import java.sql.*;
public class TestClass {
public static void main(String[] args) throws Exception{
String connectionURL = "jdbc:access:/" +
"\\\\ind-fil1\\Departments\\SoftwareDevelopment\\AmitShah\\LPTestingFiles\\Access\\acc1.mdb?user=;password=";
Class.forName("com.hxtt.sql.access.AccessDriver");
String tableName = "Table7";
String sqlQuery = "select numcol from " + tableName;
ResultSet resultSet = DriverManager.getConnection(connectionURL).createStatement().executeQuery(sqlQuery);
while(resultSet.next()) {
System.out.println("Value : " + resultSet.getString(1));
e.printStackTrace();
}
}
}
|
Supported now. Please download the latest v1.1.035 package. Thanks for your response.
|