Click here to Skip to main content
15,891,607 members
Home / Discussions / C#
   

C#

 
GeneralRe: RegEx problem #2 Pin
Ravi Bhavnani6-Feb-14 6:54
professionalRavi Bhavnani6-Feb-14 6:54 
GeneralRe: RegEx problem #2 Pin
Marco Bertschi6-Feb-14 8:59
protectorMarco Bertschi6-Feb-14 8:59 
AnswerRe: RegEx problem #2 Pin
Kornfeld Eliyahu Peter6-Feb-14 3:19
professionalKornfeld Eliyahu Peter6-Feb-14 3:19 
GeneralRe: RegEx problem #2 Pin
Marco Bertschi6-Feb-14 3:28
protectorMarco Bertschi6-Feb-14 3:28 
AnswerMessage Closed Pin
6-Feb-14 3:26
professionalPeter Leow6-Feb-14 3:26 
GeneralRe: RegEx problem #2 Pin
Marco Bertschi6-Feb-14 3:28
protectorMarco Bertschi6-Feb-14 3:28 
AnswerRe: RegEx problem #2 [solved] Pin
Nicholas Marty6-Feb-14 4:01
professionalNicholas Marty6-Feb-14 4:01 
GeneralRe: RegEx problem #2 [solved] Pin
Marco Bertschi6-Feb-14 4:22
protectorMarco Bertschi6-Feb-14 4:22 
AnswerRe: RegEx problem #2 [solved] Pin
BillWoodruff6-Feb-14 4:16
professionalBillWoodruff6-Feb-14 4:16 
QuestionRequested registry access is not allowed. Pin
Jassim Rahma5-Feb-14 23:02
Jassim Rahma5-Feb-14 23:02 
AnswerRe: Requested registry access is not allowed. Pin
OriginalGriff5-Feb-14 23:11
mveOriginalGriff5-Feb-14 23:11 
GeneralRe: Requested registry access is not allowed. Pin
Jassim Rahma5-Feb-14 23:13
Jassim Rahma5-Feb-14 23:13 
GeneralRe: Requested registry access is not allowed. Pin
OriginalGriff5-Feb-14 23:20
mveOriginalGriff5-Feb-14 23:20 
GeneralRe: Requested registry access is not allowed. Pin
Jassim Rahma5-Feb-14 23:22
Jassim Rahma5-Feb-14 23:22 
GeneralRe: Requested registry access is not allowed. Pin
OriginalGriff5-Feb-14 23:30
mveOriginalGriff5-Feb-14 23:30 
GeneralRe: Requested registry access is not allowed. Pin
Jassim Rahma5-Feb-14 23:32
Jassim Rahma5-Feb-14 23:32 
GeneralRe: Requested registry access is not allowed. Pin
OriginalGriff5-Feb-14 23:39
mveOriginalGriff5-Feb-14 23:39 
GeneralRe: Requested registry access is not allowed. Pin
Jassim Rahma5-Feb-14 23:44
Jassim Rahma5-Feb-14 23:44 
GeneralRe: Requested registry access is not allowed. Pin
OriginalGriff5-Feb-14 23:57
mveOriginalGriff5-Feb-14 23:57 
Questionhow to return query result with method in c#??? Pin
Edalat_20115-Feb-14 22:54
Edalat_20115-Feb-14 22:54 
AnswerRe: how to return query result with method in c#??? Pin
Shameel5-Feb-14 23:17
professionalShameel5-Feb-14 23:17 
GeneralRe: how to return query result with method in c#??? Pin
Edalat_20116-Feb-14 1:54
Edalat_20116-Feb-14 1:54 
thank you...
i want to connect sql server database,
i have a class and in my class i defined a method to to execute a query in my database and returns result,
and i have a gridview control on my main form to show this result.
this is my code:
class:
C#
public class CustomerClass
    {
      SqlConnection con = new SqlConnection("server=(local);database=Tailor;integrated security=true;");
      SqlDataAdapter da = new SqlDataAdapter();
      DataSet ds = new DataSet();
      public CustomerClass()
        {
            
        }
        public  object selectCustomers()
        {
            con.Open();
            
            SqlCommand select = new SqlCommand("select * from Customers",con);
            select.ExecuteNonQuery();
            con.Close();
            da.SelectCommand = select;
            da.Fill(ds, "Customer");
            return ds.Tables;
        }
    }

form load:
C#
CustomerClass test=new CustomerClass();
            object test2 = test.selectCustomers();
            dataGridView1.DataSource = test2;

QuestionRe: how to return query result with method in c#??? Pin
Shameel6-Feb-14 2:11
professionalShameel6-Feb-14 2:11 
AnswerRe: how to return query result with method in c#??? Pin
littleGreenDude6-Feb-14 4:33
littleGreenDude6-Feb-14 4:33 
AnswerRe: how to return query result with method in c#??? Pin
V.6-Feb-14 19:35
professionalV.6-Feb-14 19:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.