Error in the URL |
manish |
2005-07-20 00:00:00 |
Hi!
I am trying to test a database connection using the type 4 drivers downloaded from the website. The drivers that I am using are Access_Direct_Access_JDBC20.
I have IIS server running at 192.168.132.243. This has a vertual directory "thakralnew". In this site I have a a MS-Access database, thakral_db.mdb. My java code is as follows:
try
{ Class.forName("com.hxtt.sql.access.AccessDriver"); /*Registering the Driver*/
}
catch(ClassNotFoundException e)
{ System.out.println("Can not load the driver");
}
System.out.println("driver loaded");
String url= "jdbc:Access://192.168.132.243/thakralnew";
Connection ctn= DriverManager.getConnection(url,"anonymous","guest");
System.out.println("got connected");
Statement stmt= ctn.createStatement();
System.out.println("created statement");
================
I am able to load the driver and connect to the database with the URL:
String url= "jdbc:Access:/c:/thakralnew";
but with the URL:
String url= "jdbc:Access://192.168.132.243/thakralnew";
I am getting a SQLException saying that 192.168.132.243/thakralnew doesnot exist.
Can you please help me.
Thanks
Regards
Manish
|
Re:Error in the URL |
HXTT Support |
2005-07-20 00:00:00 |
>String url= "jdbc:Access://192.168.132.243/thakralnew";
Please try "jdbc:Access://///192.168.132.243/thakralnew"; since you're using DIRECT Access mode for a UNC path.
|
Re:Re:Error in the URL |
HXTT Support |
2005-07-20 00:00:00 |
BTW, you can use "jdbc:Access://///192.168.132.243/thakralnew/thakral_db.mdb" too.
|
Re:Re:Re:Error in the URL |
Manish |
2005-07-20 00:00:00 |
Dear Support Team!
Thanks a lot for your help. I was able to get it working with your both your suggested responses.
Now, after the local testing, I want to try it with my web database. My website domain name is thakral.com.kh and I have the same database available on the website. My string URL is as below
String url= "jdbc:Access://///thakral.com.kh/thakral_db.mdb";
But it ends up with a similar error message,"//thakral.com.kh/thakral_db.mdb doesn't exist!".
Please help.
Also, I would like to know more regarding the licensing of the product. I am going to write one java program that is going to connect to my web database and manipulate records. I am not sure which license program is applicable (I think it should be 170 USD option) and how do we pay you.
Thanks
Regards
Manish
|
Re:Re:Re:Re:Error in the URL |
HXTT Support |
2005-07-20 00:00:00 |
Dear Manish,
> String url= "jdbc:Access://///thakral.com.kh/thakral_db.mdb";
>But it ends up with a similar error message,"//thakral.com.kh/thakral_db.mdb doesn't exist!".
It's a bad idea to use DIRECT ACCESS mode on internet through share file mode since it needs to send all bytes of your database.
One solution: run your application with DIRECT ACCESS mode on your thakral.com.kh host through JSP/BROWSER interface.
Seconde solution: run an Access service(com.hxtt.sql.admin.Admin) on your thakral.com.kh host, then your applcation can use REMOTE ACCESS mode to visit your data. A simple url sample should be "jdbc:Access://thakral.com.kh:8029/c:/thakralnew/thakral_db.mdb?password=aPassword".
>I am not sure which license program is applicable (I think it should be 170 USD option) and how do we pay you.
Yeah. You need only a Server license. HXTT accepts bank transfer and online order. You can contact webmaster@hxtt.com for more details when you have completed your program.
With best regards,
Daiwei
|
Re:Re:Re:Re:Re:Error in the URL |
manish |
2005-07-20 00:00:00 |
Dear Support Team,
Thanks for your prompt reply.
I am using a server in US and it is not managed by us. We are just hosting our site there.I am not sure if that Server will support Java and allow me to run a Java application. This is the reason I wanted to access the data using the way that I proposed.
>One solution: run your application with DIRECT ACCESS mode on your thakral.com.kh host through JSP/BROWSER interface.
Solution 1 is already implemented using a ASP/Browser interface. We are looking at developing a solution through which we do offline data entry using XML and then upload the data on the website using JDBC.
>Seconde solution: run an Access service(com.hxtt.sql.admin.Admin) on your thakral.com.kh host, then your applcation can use REMOTE ACCESS mode to visit your data. A simple url sample should be "jdbc:Access://thakral.com.kh:8029/c:/thakralnew/thakral_db.mdb?password=aPassword".
Solution 2 seems to be doable but only requirement for that would be that the server supports Java. Is that correct? Will I be able to create and manage this service remotely? What other support wll I need from my web hosting providers?
Please advice.
Thanks
Regards
Manish
|
Re:Re:Re:Re:Re:Re:Error in the URL |
Manish |
2005-07-20 00:00:00 |
Hello!
>Seconde solution: run an Access service(com.hxtt.sql.admin.Admin) on your thakral.com.kh host, then your applcation can use REMOTE ACCESS mode to visit your data. A simple url sample should be "jdbc:Access://thakral.com.kh:8029/c:/thakralnew/thakral_db.mdb?password=aPassword".
Can you please give me a sample program to create and start the service on the server.
Thanks
Regards
Manish
|
Re:Re:Re:Re:Re:Re:Re:Error in the URL |
HXTT Support |
2005-07-20 00:00:00 |
Dear Manish,
Solution 1 and Solution 2 haven't any program code difference except the JDBC url. Most of host service provider support Java too. The important difference is construction design, JSP/BORWSER, or Java applet(application)/database server.
>This is the reason I wanted to access the data using the way that I proposed.
Access data through file share on internet is slow and unsafe for sensitive data.
>Can you please give me a sample program to create and start the service on the server.
Please read dbadmin.html of Development document. First you can start a service of "jdbc:Access://localhost:8029/c:/thakralnew/thakral_db.mdb" on your development PC, then you can use "jdbc:Access://intranetIPorHostName:8029/c:/thakralnew/thakral_db.mdb" in your code to visit that service in your intranet. It's easy to release your code into your host since you need only to modify the JDBC url.
Any question or requirement? Just let us know.
With best regards,
Daiwei
|
Starting a service |
manish |
2005-07-21 00:00:00 |
Dear Daiwei,
Hello again!
On my local PC I was able to create, start a service and execute my program to access the data through the service.
How do I now create, configure and run the service on my host in US. As I described earlier that I have no administrative previledges on the server. If I have to request for something from the administrator. What would that be?
Thanks
Regards
Manish
|
Re:Re:Re:Re:Re:Re:Re:Re:Error in the URL |
HXTT Support |
2005-07-21 00:00:00 |
> How do I now create, configure and run the service on my host in US.
> As I described earlier that I have no administrative previledges on the
> server. If I have to request for something from the administrator.
> What would that be?
If your host in US supports Java, it's easy to run Solution 1 through JSP/browser since HXTT Access can be load easily on DIRECT ACCESS mode without service setting.
For Solution 2, HXTT Access needs a right to listen a port, for instance, 8029. Now HXTT Access REMOTE ACCESS need to run com.hxtt.sql.admin.Admin GUI. It seems you shouldn't have such a rigth at your US host. I guess that you should have the JSP/servlet right. Then maybe we can wirte and provide a servlet proxy to support REMOTE ACCESS for Solution 2.
|