Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Implimenting SQL in C#

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.

Name: Anonymous 2007-10-25 11:00

Eat shit and die

Name: Anonymous 2007-10-25 11:04

ADO.NET

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();

Name: Anonymous 2007-10-25 12:19

LOL, he uses /b/ memes.

>>1
Go fuck yourself.

Name: Anonymous 2007-10-25 12:48

new SqlCommand
Lol OO

Name: Anonymous 2007-10-25 15:03

C# fails hard for not having any means for metaprogramming.  I can't help you, sorry.

Name: Anonymous 2007-10-29 10:21

>>7
Explain yourself.

Name: Anonymous 2009-03-06 6:40


Database server in C   or an enterprise   SOLUTION must offer.

Name: Anonymous 2011-02-04 15:11

Name: Anonymous 2011-02-17 20:28

check 'em dubz
Don't change these.
Name: Email:
Entire Thread Thread List