Implimenting SQL in C#
1
Name:
Anonymous
2007-10-25 10:56
We are doing a group project that requires access to a database with C#, but the google does nothing for helping us; how does I shot SQL commands in C#? That is, how can I go about using SELECT * FROM DATABASE and such commands through .NET code? We have all the software we need, but we don't know how to us it.
2
Name:
Anonymous
2007-10-25 11:00
Eat shit and die
3
Name:
Anonymous
2007-10-25 11:04
ADO.NET
4
Name:
Anonymous
2007-10-25 11:09
Try something like this,
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source="+Server+";Database="+Database+";Integrated Security=True";
con.Open();
SqlCommand cmd = new SqlCommand("select * from faggots", con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
doSomethingWithTheData(dr[0], dr[1]);
}
dr.Close();
con.Close();
5
Name:
Anonymous
2007-10-25 12:19
LOL, he uses /b/ memes.
>>1
Go fuck yourself.
6
Name:
Anonymous
2007-10-25 12:48
new SqlCommand
Lol OO
7
Name:
Anonymous
2007-10-25 15:03
C# fails hard for not having any means for metaprogramming. I can't help you, sorry.
8
Name:
Anonymous
2007-10-29 10:21
9
Name:
Anonymous
2009-03-06 6:40
Database server in C or an enterprise SOLUTION must offer.
10
Name:
Anonymous
2011-02-04 15:11