Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 11th, 2006, 4:40 PM   #1
skad
Newbie
 
skad's Avatar
 
Join Date: Apr 2006
Posts: 7
Rep Power: 0 skad is on a distinguished road
Can this work

jus wandering if this code can work properly, im kinda learning java from friends and teaching myself
package transaction.processing;

import java.sql.SQLException;
import java.sql.Connection;
import java.sql.DriverManager;

public class MyConnection
{
private static Connection con;
public MyConnection () {
}

public static Connection connect()throws SQLException,ClassNotFoundException
{
Class.forName(" sun.jdbc.odbc.JdbcOdbcDriver");
String filename = System.getProperty("user.dir")+"/ChecheComm.mdb";
String database ="jdbc:odbcriver={Microsoft Access Driver (*.mdb)};DBQ=";

database+= filename.trim()+";DriverID=22;READONLY=false}";

con=DriverManager.getConnection(database);

return con;
}
}
skad is offline   Reply With Quote
Old Apr 11th, 2006, 5:40 PM   #2
jayme
Professional Programmer
 
jayme's Avatar
 
Join Date: Nov 2005
Location: Canada
Posts: 495
Rep Power: 0 jayme is an unknown quantity at this point
Send a message via MSN to jayme
Why ask, why not just try it?
__________________

Quote:
Originally Posted by Mohamed Jihad
Durka durka!
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it.

Download Code::Blocks now!
jayme is offline   Reply With Quote
Old Apr 12th, 2006, 5:57 AM   #3
skad
Newbie
 
skad's Avatar
 
Join Date: Apr 2006
Posts: 7
Rep Power: 0 skad is on a distinguished road
at the time wen i came up with tha code, i was at a place without jcreator, textpad or any thing i can use to try run the code, so i decided to ask
skad is offline   Reply With Quote
Old Apr 12th, 2006, 7:12 AM   #4
InfoGeek
Professional Programmer
 
InfoGeek's Avatar
 
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4 InfoGeek is on a distinguished road
I haven't taken a look at your code as it is not formatted properly. Use code tags to perserve indentation of code on these forums. You should also turn smilies off. Also take a look at How to post a question and Forum Rules.
__________________
PFO - My daily dose of technology.
InfoGeek is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:24 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC