Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Database connection

  Asked By: Bogart    Date: Apr 28    Category: Java    Views: 863
  

Do anyone have a tutorial with database connection? Is there a way to
use .udl files?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Vonda Ramirez     Answered On: Apr 28

You will use JDBC for connection  to datbase. Which data base do u
want to connect?
Let me know more about .udl files

 
Answer #2    Answered By: Bach-yen Nguyen     Answered On: Apr 28

I know I will use JDBC. An .udl file is a simple textfile with
something writed in it (like this):

[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=D:\Programmering\Work\MediaGruppa\New
Site\Database\kassetter.mdb;Mode=Share Deny None;Persist Security
Info=False

In Windows, you just create a empty text file, and name the extention
.udl . Double click on the .udl file, and you will get up a
configuration window. Here you can choose driver, path to the
database, and access mode, password, and even test the connection. I
know JDBC can use ODBC to connect to database. So I hoped there was a
way to access this initstring from Java. (That would be cool)
More experienced programmers I know didn't know about this technic,
and that surprised me. In the first round, I want to connect to MS
Access.

 
Didn't find what you were looking for? Find more on Database connection Or get search suggestion and latest updates.




Tagged: