Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help ( regarding connection)

 
Lalit K Kumar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic