Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol v2.1
  HXTT DBF v5.2
  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 ACCESS
Unknown Access database file
Bik Singh
2010-05-26 07:26:19.0

Hi:

I am testing to read-write access file from linux box to Windows box. I am able to make a connection. However when the program calls statement.executeQuery() call. Program throws an below exception:

java.sql.SQLException: An unknown Access database file

Here is my code:
java.sql.Connection access = getNewAccessDBConnection(server);
System.out.println("Connection made: "+access);

Statement statement = access.createStatement();
System.out.println("Statement made: "+statement);
ResultSet rs = statement.executeQuery("SELECT TYPE FROM Lab"); //I get issue in this line

Please advice.

Thanks
B
Re:Unknown Access database file
Bik
2010-05-26 08:09:13.0
Just want to add in the exiting question.

First I get following exception:

"Failed to load database sites! For more information, please use SQLException.getNextException()."

So when I used SQLException.getNextException(); it says

"java.sql.SQLException: An unknown Access database file "

B
Re:Re:Unknown Access database file
HXTT Support
2010-05-26 08:20:45.0
What's your jdbc url? If you can visit that mdb file locally, then it should be a security issue, which happened often betwen Linux client and Windows server. You can try SAMBA protocol if you failed to load shared map driver.
Re:Re:Re:Unknown Access database file
Bik
2010-05-26 08:51:14.0
I have actually mapped windows directory URL with some linux path.

Linux path is /inet/projects/CreditCard/resources/ACCESS

The above path is basically mapped to Windows system where .mdb file is there. Morever I can go to above linux path (which eventually goes to windows) and create/delete files.

Anyhow I just tried samba protocol and here is what I am getting now:

Server: jdbc:access:smb://cps-nt21/projects/Sites/sites.mdb

Connection made: hxtt:access/SMB://CPS-NT21/PROJECTS/SITES/SITES.MDB
Statement made: com.hxtt.sql.ah@4139eeda
java.sql.SQLException: jcifs.smb.SmbAuthException: Logon failure: account currently disabled.
Failed to load database sitesggg! For more information, please use SQLException.getNextException().




Re:Re:Re:Re:Unknown Access database file
HXTT Support
2010-06-01 07:16:37.0
>jdbc:access:smb://cps-nt21/projects/Sites/sites.mdb
>java.sql.SQLException: jcifs.smb.SmbAuthException: Logon failure:
>account currently disabled.
You haven't right. Try jdbc:access:smb://auser:apasswd@cps-nt21/projects/Sites/sites.mdb .

>Linux path is /inet/projects/CreditCard/resources/ACCESS
>The above path is basically mapped to Windows system where .mdb file is there.
>Morever I can go to above linux path (which eventually goes to windows) and
>create/delete files.
Please check your jdbc url since path is case sensitive on Linux, but not on Windows.

Re:Re:Re:Re:Re:Unknown Access database file
B
2010-06-03 11:50:24.0
Resolved it.

There were two issues:

1. As you said Linux is case senstive and once HXTT creates the connection object; it automatically change path to upper case. So it was not able to find the file.

2. I had to convert MDB file to latest version and then it worked.

Thanks for all help
B
Re:Re:Re:Re:Re:Re:Unknown Access database file
HXTT Support
2010-06-03 17:26:34.0
>>Connection made: hxtt:access/SMB://CPS-NT21/PROJECTS/SITES/SITES.MDB
>1. As you said Linux is case senstive and once HXTT creates the connection
> object; it automatically change path to upper case. So it was not able to
> find the file.
What's your jdbc url? It seems that you're using upper case. HXTT should not conver your path.

>2. I had to convert MDB file to latest version and then it worked.
But HXTT Access supports MS Access 95 ~2007.

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