Click here to Skip to main content
15,914,419 members
Home / Discussions / C#
   

C#

 
GeneralRe: C sharp and CRC's and polynomials Pin
turbosupramk324-Oct-14 5:42
turbosupramk324-Oct-14 5:42 
GeneralRe: C sharp and CRC's and polynomials Pin
Pete O'Hanlon24-Oct-14 6:08
mvePete O'Hanlon24-Oct-14 6:08 
GeneralRe: C sharp and CRC's and polynomials Pin
turbosupramk324-Oct-14 6:47
turbosupramk324-Oct-14 6:47 
GeneralRe: C sharp and CRC's and polynomials Pin
BillWoodruff24-Oct-14 9:22
professionalBillWoodruff24-Oct-14 9:22 
GeneralRe: C sharp and CRC's and polynomials Pin
turbosupramk324-Oct-14 13:21
turbosupramk324-Oct-14 13:21 
Questionproblem in insert image in sql with janus control use Pin
fatemehsoleimani24-Oct-14 2:27
fatemehsoleimani24-Oct-14 2:27 
AnswerRe: problem in insert image in sql with janus control use Pin
Pete O'Hanlon24-Oct-14 3:44
mvePete O'Hanlon24-Oct-14 3:44 
GeneralRe: problem in insert image in sql with janus control use Pin
fatemehsoleimani24-Oct-14 3:59
fatemehsoleimani24-Oct-14 3:59 
Questionrun application c# Pin
Ibrahim.elh24-Oct-14 2:03
Ibrahim.elh24-Oct-14 2:03 
AnswerRe: run application c# Pin
Gerry Schmitz24-Oct-14 3:35
mveGerry Schmitz24-Oct-14 3:35 
GeneralRe: run application c# Pin
Ibrahim.elh24-Oct-14 3:41
Ibrahim.elh24-Oct-14 3:41 
GeneralRe: run application c# Pin
Dave Kreskowiak24-Oct-14 3:49
mveDave Kreskowiak24-Oct-14 3:49 
GeneralRe: run application c# Pin
Ibrahim.elh24-Oct-14 3:52
Ibrahim.elh24-Oct-14 3:52 
GeneralRe: run application c# Pin
Dave Kreskowiak24-Oct-14 3:53
mveDave Kreskowiak24-Oct-14 3:53 
GeneralRe: run application c# Pin
Pete O'Hanlon24-Oct-14 3:55
mvePete O'Hanlon24-Oct-14 3:55 
GeneralRe: run application c# Pin
Ibrahim.elh24-Oct-14 3:59
Ibrahim.elh24-Oct-14 3:59 
GeneralRe: run application c# Pin
Pete O'Hanlon24-Oct-14 4:04
mvePete O'Hanlon24-Oct-14 4:04 
AnswerRe: run application c# Pin
V.26-Oct-14 21:33
professionalV.26-Oct-14 21:33 
GeneralRe: run application c# Pin
Ibrahim.elh26-Oct-14 21:39
Ibrahim.elh26-Oct-14 21:39 
GeneralRe: run application c# Pin
V.26-Oct-14 21:53
professionalV.26-Oct-14 21:53 
Questionproblem when launching application Pin
Ibrahim.elh23-Oct-14 21:06
Ibrahim.elh23-Oct-14 21:06 
AnswerRe: problem when launching application Pin
OriginalGriff23-Oct-14 21:36
mveOriginalGriff23-Oct-14 21:36 
The error is pretty explicit:
the Connection property has not been initialized.
So look at your code: check that you have created an SqlConnection object using the correct connection string, that you have opened the connection, and that you have attached it to the SqlCommand:
C#
using (SqlConnection con = new SqlConnection(strConnect))
    {
    con.Open();
    using (SqlCommand cmd = new SqlCommand("SELECT iD, description FROM myTable", con))
        {
        using (SqlDataReader reader = cmd.ExecuteReader())
            {
            while (reader.Read())
                {
                int id = (int) reader["iD"];
                string desc = (string) reader["description"];
                Console.WriteLine("ID: {0}\n    {1}", iD, desc);
                }
            }
        }
    }

Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

GeneralRe: problem when launching application Pin
Ibrahim.elh23-Oct-14 21:45
Ibrahim.elh23-Oct-14 21:45 
AnswerRe: problem when launching application Pin
OriginalGriff23-Oct-14 21:59
mveOriginalGriff23-Oct-14 21:59 
GeneralRe: problem when launching application Pin
Ibrahim.elh23-Oct-14 22:05
Ibrahim.elh23-Oct-14 22:05 

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.