Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-29-2008, 07:48 PM
Member
 
Join Date: Apr 2008
Posts: 1
lemurian is on a distinguished road
Help with Java and MS access
I have the next problem. I want to make a little translation program, I have in access a table that has two columns Español and Frances.
I'm using a JtextBox to introduce a spanish word, for example ROJO, and I want to retrieve the french word rouge.
The query sentence shows me the last word in Frances. I have the following structure:

Español Frances
rojo rouge
negro noir

and this is the code
try
{
String ruta = "C:\\dicc.mdb";
String referencia = "jdbcdbc:MS Access Database;DBQ="+ruta;

//Levantar controlador o carga el controlador
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conecta = DriverManager.getConnection(referencia);
Statement s = conecta.createStatement();
ResultSet rs = s.executeQuery("SELECT Español, Frances FROM espfran =");

while(rs.next())
{
res=rs.getString("Frances");
}
jLabel.setText(res);
conecta.close();
}
catch(Exception jl)
{
JOptionPane.showMessageDialog(null,jl.getMessage() );
}

Hope someone can help me. please email me @ lemurianredmage@hotmail.com
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-30-2008, 02:46 PM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 509
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
You can also post this into database forum.
THere are experts there who could help you about this.

Admin, email was introduced.... Is this allowed?

regards,
sukatoa
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Native Access (JNA) return types of void * burnumd Advanced Java 0 04-03-2008 06:12 PM
Trying to get my Java Bean to access a parm that I'm passing via a jsp? 72dolfan JavaServer Faces 1 03-13-2008 03:36 PM
Help with access a database using Microsoft Access cachi Database 1 08-07-2007 08:51 AM
Access Email usind a java mail client Access Email usind a java mail client consult4u Enterprise JavaBeans 2 07-31-2007 09:29 AM
How to access system calls in java Albert New To Java 1 07-13-2007 04:12 PM


All times are GMT +3. The time now is 08:10 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org