thank u cedric for ur suggestion but right now I don't have any such
different database.
i would also like to share what type of code do i use. hope after looking at
it u could understand my problem more.
*
import* java.sql.*;
*public* *class* DbConnect {
Connection dbcon;
Statement stmt;
ResultSet rs;
DbConnect()
{
*try* {
Class.*forName*("sun.jdbc.odbc.JdbcOdbcDriver");
} *catch* (Exception e) {
e.printStackTrace();
}
}
*public* ResultSet ShowData() {
*try* {
dbcon = DriverManager.*getConnection*("jdbc:odbc:*myopendsn*");
stmt=dbcon.createStatement();
rs= stmt.executeQuery("Select Name from ExtTable");
stmt.close();
dbcon.close();
}
*catch* (SQLException e) {
e.printStackTrace();
}
*return* rs;
}
}
I have highlighted the problem area... "mypoendsn" this is the name of dsn
which i have given. To create this dsn i have select driver from the list. i
cannot see any driver for openoffice base db.
u can also suggest diffrent type of code by which i can connect.
thank u.
On 1/29/07, Cedric Bosdonnat <[EMAIL PROTECTED]> wrote:
Hi Avinash,
Avinash Khairnar a écrit :
> this is my 1st mail to the mailing list. and i don't know the any formal
> rules of the list.
> So i am *sorry* for any inconvenience.
> I am a budding developer and i program in *Java*.
> the need for which i am mailing is help from u.
> i have just install open office and want to use *openoffice base* as my
> data
> source for my java program.
> but the problem is i cannot find any DSN drivers for windowsxp to access
> any
> such kind of db.
> if i use MS Access driver, my program gives error.
You can create an odb file connecting to another database if you want
(eg: SQLite, dBase, MySQL...). This way you could use your database as
you always did, and OOo could help you to connect to the database.
Hope this helps,
Cedric
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Regards....
Avinash