Hooking up jdbc to a local access database  
Author Message
KNelson





PostPosted: 2007-3-5 7:47:00 Top

java-programmer, Hooking up jdbc to a local access database The driver I am using, the default jdbc/odbc driver, in netbeans is
not working for connecting to an access db on my hard drive. The
driver does find the database, and connects to it, but when I set it
up I get a "unable to obtain schema" warning. then on the icon for
the database after im connected in netbeans, the link to the tables is
broken. Thanks

Karl Nelson

 
CodeForTea





PostPosted: 2007-3-5 8:10:00 Top

java-programmer >> Hooking up jdbc to a local access database On Mar 4, 6:46 pm, "KNelson" <email***@***.com> wrote:
> The driver I am using, the default jdbc/odbc driver, in netbeans is
> not working for connecting to an access db on my hard drive. The
> driver does find the database, and connects to it, but when I set it
> up I get a "unable to obtain schema" warning. then on the icon for
> the database after im connected in netbeans, the link to the tables is
> broken. Thanks
>
> Karl Nelson

1. Control Panel
2. Administrative Tools
3. Data Sources (ODBC)
4. System DSN Tab
5. Add
6. Microsoft Access Drive (*.mdb)
7. Data Source Name ( add Data source name dont put any spaces.)
8. Click on select button Browse and find your database files.
9. Ok
10. ok

String url = "jdbc:odbc:xxxxx" database name from step 7.
Connection con = DriverManager.getConnection(url, "myLogin",
"myPassword");

 
KNelson





PostPosted: 2007-3-5 8:51:00 Top

java-programmer >> Hooking up jdbc to a local access database On Mar 4, 4:09 pm, email***@***.com wrote:
> On Mar 4, 6:46 pm, "KNelson" <email***@***.com> wrote:
>
> > The driver I am using, the default jdbc/odbc driver, in netbeans is
> > not working for connecting to an access db on my hard drive. The
> > driver does find the database, and connects to it, but when I set it
> > up I get a "unable to obtain schema" warning. then on the icon for
> > the database after im connected in netbeans, the link to the tables is
> > broken. Thanks
>
> > Karl Nelson
>
> 1. Control Panel
> 2. Administrative Tools
> 3. Data Sources (ODBC)
> 4. System DSN Tab
> 5. Add
> 6. Microsoft Access Drive (*.mdb)
> 7. Data Source Name ( add Data source name dont put any spaces.)
> 8. Click on select button Browse and find your database files.
> 9. Ok
> 10. ok
>
> String url = "jdbc:odbc:xxxxx" database name from step 7.
> Connection con = DriverManager.getConnection(url, "myLogin",
> "myPassword");

Thanks bud but I actually do have a correct odbc connection set up
already. If you know what it may be besides that im all ears