The Artima Developer Community
Sponsored Link

Java Answers Forum
Anybody can help me to connet database in Java ODBC?.....

12 replies on 1 page. Most recent reply: Dec 16, 2003 12:09 PM by s

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 12 replies on 1 page
Fay

Posts: 16
Nickname: flyfay
Registered: Sep, 2003

Anybody can help me to connet database in Java ODBC?..... Posted: Dec 11, 2003 12:13 AM
Reply to this message Reply
Advertisement
Hi,
can anybody help me to explain how to create database source with ODBC in Java source code? thanks a lot!

cheers
Fay


shyamlal c.h

Posts: 14
Nickname: blrboy
Registered: Dec, 2003

Re: Anybody can help me to connet database in Java ODBC?..... Posted: Dec 11, 2003 12:32 AM
Reply to this message Reply
hey buddy its simple
First create a dsn.i hope u know that

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:dsn","username","password");
Stateme nt smt=con.createStatement();

Thats all for connection.After that u can execute queries.....bye c u

Fay

Posts: 16
Nickname: flyfay
Registered: Sep, 2003

Hi, Shyamlal c.h , one more help.... Posted: Dec 11, 2003 12:45 AM
Reply to this message Reply
Hi, shyamlal c.h,
first thanks for your big help, can you tell me how to create dsn. honestly, i don't know it. thanks again!

Cheers
fay

shyamlal c.h

Posts: 14
Nickname: blrboy
Registered: Dec, 2003

Re: Hi, Shyamlal c.h , one more help.... Posted: Dec 11, 2003 1:01 AM
Reply to this message Reply
hey buddy...

Tell me ver r u from.I am frm bangalore.U can call me shyam.First create a database in access or oracle.What u have to do next is go to control panel.There will be a odbc icon.click it.click user or system dsn.Then add.Specify the driver ie mdb or oracle driver.Then specify the data source name thats it.Hope u go it

Fay

Posts: 16
Nickname: flyfay
Registered: Sep, 2003

Re: Hi, Shyam, thanks for your patient..... Posted: Dec 12, 2003 12:49 AM
Reply to this message Reply
Hey shyam,
i got it, thanks for your big help
by the way, i am from a country which is the oldest orient country. guess what's its name? ..... :-)

cheers
fay

shyamlal c.h

Posts: 14
Nickname: blrboy
Registered: Dec, 2003

Re: Hi, Shyam, thanks for your patient..... Posted: Dec 12, 2003 1:38 AM
Reply to this message Reply
hai

Are u working?

Fay

Posts: 16
Nickname: flyfay
Registered: Sep, 2003

Re: Hi, Shyam, thanks for your patient..... Posted: Dec 14, 2003 6:50 PM
Reply to this message Reply
> hai
>
> Are u working?

Hi, Shyam,
yeah, i am working as a university lecturer!
how about you?

cheers
fay

Vanitha

Posts: 2
Nickname: vani
Registered: Dec, 2003

Re: Anybody can help me to connet database in Java ODBC?..... Posted: Dec 15, 2003 2:55 AM
Reply to this message Reply
Class.forName(jbc.odbc.JdbcOdbcDriver)

Vanitha

Posts: 2
Nickname: vani
Registered: Dec, 2003

Re: Anybody can help me to connet database in Java ODBC?..... Posted: Dec 15, 2003 3:00 AM
Reply to this message Reply
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:dsn","username",password");

shyamlal c.h

Posts: 14
Nickname: blrboy
Registered: Dec, 2003

Re: Hi, Shyam, thanks for your patient..... Posted: Dec 15, 2003 4:31 AM
Reply to this message Reply
hey me 2.I am also a faculty.I am working in NIIT bangalore,India.keep in touch

Fay

Posts: 16
Nickname: flyfay
Registered: Sep, 2003

Re: Hi, Shyam, thanks for your patient..... Posted: Dec 15, 2003 7:47 PM
Reply to this message Reply
> hey me 2.I am also a faculty.I am working in NIIT
> bangalore,India.keep in touch

hey, Shyam,
my email address is fay_nz@hotmail.com.
you can send email to me via this email address!

keep in touch
fay

Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: Hi, Shyam, thanks for your patient..... Posted: Dec 15, 2003 10:44 PM
Reply to this message Reply
char[] msg = {67,97,116,99,104,105,110,103,32,98,105,114,100,115,63};


:-)

s

Posts: 23
Nickname: codemonkey
Registered: Nov, 2003

Re: Hi, Shyam, thanks for your patient..... Posted: Dec 16, 2003 12:09 PM
Reply to this message Reply
catching birds? huh?

Flat View: This topic has 12 replies on 1 page
Topic: for queries in java use a QueryDataSet? Previous Topic   Next Topic Topic: Help comparing File info to an enterd number and out putting again

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use