Database tables: Pay and Nproject and Member.
The Pay and Member, Dsc field is common.
I have two forms, in each form is a table Nproject ComboBox Dsc field when you click the OK button to load the data into the table on gridview is displayed.
But now when I run the program and choose the ComboBox and click OK button gridview does not display anything.Just Two Dsc show in gridview.
I Use sql serever 2008 for database. In Member table Dsc field Type is nvarchar(254). when run a program just display two Dsc(بدون پروژه - گلمان) in dbgrid and other Dsc don't display in dbgrid.
-----
Proge.text is combobox in two forms
پروژه 144 واحدی ** Don't show this dsc in dbrid
پروژه 156 واحدی ** Don't show this dsc in dbrid
پروژه 240 واحدي ** Don't show this dsc in dbrid
بدون پروژه
گلمان
----------------
CodeSource Ds = new CodeSource();
Grd.DataSource = Ds.LoadGrids("Select * From Members where Dsc = '" + Proge.Text + "' ");
----------
code in my class Name's : CodeSource
public BindingSource LoadGrids(string SqlStatement)
{
SqlDataAdapter sda = new SqlDataAdapter(SqlStatement, connectionString);
DataTable dTable = new DataTable();
sda.Fill(dTable);
BindingSource bSource = new BindingSource();
bSource.DataSource = dTable;
sda.Dispose();
dTable.Dispose();
return bSource;
--------------