Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > connecting to specific access database file

Thread Tools

connecting to specific access database file

Posts: n/a
hi there again hope you are not getting bored from my questions

first a lot of thanks to Ryan Stewart and Chris Smith for their link on
my last question about how to connect my programe to access database

i really learned a lot from there

but still

i hope there is a way to connect my programe to an specific database
file so i dont have to make dns settings

like making my program connect to the file labs.mdb which is in its

as it is made via visual basic by datacontrol
so hope there is a way to do that in java

Reply With Quote
Chris Smith
Posts: n/a
ali <(E-Mail Removed)> wrote:
> but still
> i hope there is a way to connect my programe to an specific database
> file so i dont have to make dns settings

Unfortunately, if you're using the ODBC bridge driver, there's no really
reliable way to make the connection without defining an ODBC data source
name. ISTR that you can use something like:

jdbcdbc:MS Access Database;file=c:\myfile.mdb

but that assumes that the default ODBC name for a generic Access
database is present and hasn't been modified. That's not necessarily a
safe assumption. I'm also not sure of the attribute name, and it might
be something other than "file". Also, If you take the approach above,
remember that backslashes should be escaped in a string literal.

I mentioned earlier that there's a free edition of MS SQL Server that
has a better JDBC driver. Could you consider using that instead?

The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Reply With Quote
Posts: n/a
thanks a lot again
jdbcdbc:MS Access Database;file=c:\myfile.mdb
worked very well thanks again

but yes its not garenteed to work on all the computer

so about MS SQL Server that you told me about can you tell me more as
i said i am very new to database thing so i only know very little about
ms access it self but hope you will provide me with good sources so i
can undestand MS SQL Server

and also where to get it from how it is better and does it provide me
in java what i need ??!!!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase Computer Information 0 09-26-2012 09:40 AM
Connecting to a specific database using sybperl Perl Misc 1 01-20-2007 12:09 AM
Connecting to an Access-database Bart Schelkens ASP .Net 3 11-19-2004 02:29 PM
Problem connecting to Access Database - "already opened exclusively by another user" Tom Wild ASP .Net 1 08-25-2003 06:36 AM