Therese Puno

Therese Puno

  • NA
  • 13
  • 0

Class Database Connection

Jul 14 2008 2:22 AM

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Data;

using System.Data.SqlClient;

namespace ElectronicBankingSystem

{

class SQLdatabaseConn

{

public void MyConnection()

{

SqlConnection SqlCon = new SqlConnection(@"SERVER = SOLOMON; User ID=sa;password=sa;Initial Catalog=BPHTEST;Data Source=solomon");

SqlCon.Open();

}

}

}

 

hi..all Will you please help me about on how to declare database connection in a class?

Thank you very much..

 


Answers (1)