This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JDBC and the fly likes Need Help ( regarding connection) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Need Help ( regarding connection)" Watch "Need Help ( regarding connection)" New topic
Author

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: 15299
    
    6

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)