jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes Need Help ( regarding connection) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Need Help ( regarding connection)" Watch "Need Help ( regarding connection)" New topic

Need Help ( regarding connection)

Lalit K Kumar
Ranch Hand

Joined: Jan 29, 2004
Posts: 32
hi all ,
I have following line of code in C#. i want to convert it in java. I had tried it but in vain. can anyone help me out. here is code of c#.
Variable1 = new OleDbConnection();
Variable1.ConnectionString = ConnString;
Variable1 is defined in another class (databaseconnection.cs). its code segment is given below.
private IDbConnection FVariable1;
public IDbConnection Variable1
get{return FVariable1;}
set{FVariable1 = value;}
waiting for your reply
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

The best thing for you to do is go through Sun's JDBC Tutorial and learn how to use JDBC. Then you can probably "convert" your code with no problem.
I assume you are just wanting to get a connection to a database? This is one of the first things you do in the JDBC tutorial.

GenRocket - Experts at Building Test Data
I agree. Here's the link: http://aspose.com/file-tools
subject: Need Help ( regarding connection)
It's not a secret anymore!