+ 1
about c# windows form and DataGridView
i have a datagridview in c# windows form . when i use SELECT * FROM table_name WHERE column_name IS NOT NULL datagridview don't return for me null rows . what should i do ? i am sorry for my bad enghlish.
19 Answers
+ 4
make solo learn a chatting community 😄😄😄
+ 3
ok
+ 2
not bad is good English ok
+ 2
ok bye
+ 2
hiii
+ 1
u r asking SQL to return rows which don't have NULL for column_name, so it doesn't return rows which have NULL for mentioned column.
Wht u tring to query?
+ 1
welkam
+ 1
hii your Indian ya no
+ 1
😂😂😂
+ 1
kya
0
this is my code
private void Form2_Load(object sender, EventArgs e)
Connection.ConnectionString = @"connection Path";
Connection.Open();
Command.Connection = Connection;
Command.CommandText = "select Number , Name , Services from tbleOwner Where Name is null";
DataAdapter.SelectCommand = Command;
DataAdapter.Fill(Data , " O2");
Command.ExecuteNonQuery();
dataGridView.DataBindings.Clear();
dataGridView.DataBindings.Add("datasource" , Data , "O2");
but datagridview return for me all of data ! Where is my mistake ?
0
First try the same query in SQL, if u r not getting expected result it probably something to do with ur table otherwise it's code error.
0
I have tried many ways in sql but the result has not changed. I guess the problem is dataGridView.
0
if SQL provide expected result it's an code error. hope this helps:
https://msdn.microsoft.com/en-us/library/fbk67b6z(v=vs.110).aspx
0
yes
0
thank you ☺
0
bye 😊
0
no I'm from iran !
0
😐