Click here to Skip to main content
15,903,856 members
Home / Discussions / C#
   

C#

 
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 
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 
Firstly, tell us such things when you post a question - remember that we can't see your screen, access your HDD, or read your mind! Laugh | :laugh:

So - you open a connection, but you don't do anything else with it?
either add:
C#
cmd.Connection = connection;
Or use the syntax I showed in my previous answer.
In the case of your code, I'd do this instead:
C#
private void textBox1_KeyUp(object sender, KeyEventArgs e)
{
    DataTable dt = new DataTable();
    SqlDataAdapter da = new SqlDataAdapter("SELECT informix.thisent.etb FROM informix.thisent", connection);
    da.Fill(dt);
    dataGridView1.DataSource = dt;
}
As the DataAdapter will open and close the connection for you.

BTW: Please, don;t use Visual Studio default names for controls! textBox1 doesn;t mean anything to anyone reading this code, where as searchForText makes it much more obvious what you are doing. It's not a problem when your apps are tiny, but when the number of controls starts to rise it becomes a real PITA and can cause a lot of mistakes. It's well worth getting into the habit of changing the name immediately you create the control as (compared to the five or six seconds extra it takes) it can save a heck of a lot of time later!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

GeneralRe: problem when launching application Pin
Ibrahim.elh23-Oct-14 22:05
Ibrahim.elh23-Oct-14 22:05 
GeneralRe: problem when launching application Pin
OriginalGriff23-Oct-14 22:24
mveOriginalGriff23-Oct-14 22:24 

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.