c#
-
how can we do the database connectivity in c# windows form
-
how can we do the database connectivity in c# windows form
Take your pick: ADO.NET Enitiy Framework LINQ to SQL nHibernate.
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^] -
Take your pick: ADO.NET Enitiy Framework LINQ to SQL nHibernate.
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^]Keith Barrow wrote:
Take your pick
That will only be helpful if he is data mining, surely?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
-
Keith Barrow wrote:
Take your pick
That will only be helpful if he is data mining, surely?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
I've never been accused of being helpful yet ;-)
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^] -
Keith Barrow wrote:
Take your pick
That will only be helpful if he is data mining, surely?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
Lol!
-
how can we do the database connectivity in c# windows form
a) Don't -- never put data access in your UI layer. b) Once you have a Data Access Layer -- access it from your UI layer.
-
how can we do the database connectivity in c# windows form
do it like this.. :)
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OleDb;
namespace Access
{
public class Connection
{
private string getConnectionString()
{
return "connetionString";
}public static void ExecuteCommand(string command) { OleDbConnection con; OleDbCommand com; try { con = new OleDbConnection(getConnectionString()); con.Open(); com = new OleDbCommand(command); com.ExecuteNonQuery(); } catch (Exception ex) { //ex shows exception } finally { con.Close(); } } }
//Call Connection Method
public void MyMethord() { Connection.ExecuteCommand("command write here"); }
-ambarish-
-
how can we do the database connectivity in c# windows form
public void connection()
{
con = new SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=practice;Data Source=HOME-78F3176757");
con.Open();
}public DataSet filldata(string mystring) { connection(); adp = new SqlDataAdapter(mystring, con); ds = new DataSet(); adp.Fill(ds); return ds; }