here is a complete example for you:

myConnection: TADOConnection;
myDataSet: TADODataSet;
myDataSource: TDataSource;
myDBGrid: TDBGrid;

{Properties for myConnection}
myConnection.ConnectionString := 'Connection strin to your DataBase';

{Properties for myDataSet}
myDataSet.Connection := myConnection;

{Properties for myDataSource}
myDataSource.DataSet := myDataSet;

{Properties for myDBGrid}
myDBGrid.DataSource := myDataSource;

Friend use the above linked properties. And try to see.....
Thanks
Iqbal
--- In [email protected], "mehdi asadi" <[EMAIL PROTECTED]> wrote:
>
> please help me how we can connected DataGrid to table in SQL and 
> insert data and edit.
> how I used [SqlCommand ,SqlConnection,DataSet]compnent.
>


Reply via email to