• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Invoking ODBC database source administrator component of windows

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am very much new to Swing. I have mainly worked in J2EE. But the first task which I am assigned in Swing is that I need to invoke an ODBC database source administrator component of windows from a swing button. So can anyone help me in this regard. Or if you may suggest me with a tutorial or something, that will be great. I have attached a screenshot which shows the windows component.

Thanks in advance.
ODBC.PNG
[Thumbnail for ODBC.PNG]
 
Rancher
Posts: 3244
30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to go to the "System DSN" tab to create your data source.

The following then shows the two ways to access the database using the Access driver. You can access the database directly or through the ODBC name:



The code formatting doesn't like the following code, but here is how you can map the database directly without using ODBC:

// String url =
// "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=c:/teenergy/data/teenergy.mdb";

I don't know how to turn of the Emoticons. See below for actual code.


 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I don't know how to turn of the Emoticons


There's a checkbox for "Disable smilies in this message"
|
|
|
|
|
V
 
Rob Camick
Rancher
Posts: 3244
30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

There's a checkbox for "Disable smilies in this message"



Thanks.

For some reason this doesn't work when I edit my original posting. Maybe this property can't be edited?

Anyway here is the code I intended to post.



 
Marshal
Posts: 22446
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll move this to our JDBC forum as I see no GUI programming in there.

The given JDBC driver works but I've heard it has some flaws. There are other ODBC JDBC drivers available, both commercial and non-commercial. So if you run into problems with this one you can easily switch to another - all you need to do is load another driver, possibly change the connection string, and the rest can stay the same.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic