Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  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
  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 ACCESS
DatabaseMetaData.getTable stopped working in 1.1.032 on May 08, 2006
Andrei Postolache
2006-05-08 02:28:37
Hi,

The class below works with 1.1.017 on April 07, 2006 eval version but does not work with 1.1.032 on May 08, 2006, the full version.
By "works" I mean it prints out the names of all the tables in that database (better said, the result set returned by getTable contains rows)

Any help would be great.

Thx,
Andrei


import java.sql.*;

/**
* ShahAmit (@auther : shahamit@synygy.com)
*/
public class TestClass {
public static void main(String[] args) {
String connectionURL = "jdbc:access:/" +
"\\\\ind-fil1\\Departments\\SoftwareDevelopment\\AmitShah\\LPTestingFiles\\Access\\acc1.mdb?user=;password=";

try {
Class.forName("com.hxtt.sql.access.AccessDriver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}


try {
Connection connection = DriverManager.getConnection(connectionURL);
if (connection != null) {
DatabaseMetaData databaseMetaData = connection.getMetaData();
if (databaseMetaData != null) {
ResultSet resultSet = databaseMetaData.getTables(null, null, null, null);

// ResultSet resultSet = connection.createStatement().executeQuery(
// "SELECT * FROM MsysObjects WHERE (Left([Name],1)<>'~') AND (lcase(Left([Name],4)) <> 'msys') AND (MSysObjects.Type)=1 order by MSysObjects.Name");
while (resultSet.next()) {
System.out.println("Table Name : " + resultSet.getString(3));
}
} else {
System.out.println("Meta Data is null");
}
} else {
System.out.println("Connection is null");
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}
Re:DatabaseMetaData.getTable stopped working in 1.1.032 on May 08, 2006
HXTT Support
2006-05-08 06:13:08
Fixed a new bug in DatabaseMetaData.getTables() since v1.1.028. When we complemented support for simple stored procedures (select, insert, update, and delete), we added such a bug too:( Thanks for your response. Please download the latest package.
Re:Re:DatabaseMetaData.getTable stopped working in 1.1.032 on May 08, 2006
Andrei Postolache
2006-05-10 07:02:13
Thx for the quick response. It's working now.

Andrei

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