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
Unknown Access database file
Bik Singh
2010-05-26 07:26:19

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
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
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
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
>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
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
>>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
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap