Request related to ADO

Hello,
I studied ADO .net in C# but I forgot too many things aboud it, Specially I

forgot how to work with SQL Server
so please If any one just make a small example contains code of (Add,

Delete, Insert, Search) in Sql Server database

I searched about that in many sites but I didn`t a completely code that I want.

I`ll continou searching and tring to get it and I hope you help me too

Thanks




Answer this question

Request related to ADO

  • Jacob Christ

    hi,

    in your form load or form constractor add something like this

    this.BindingSource1.DataMember = "TableName";
    this.BindingSource1.DataSource = this.db1DataSet1;

    hope this helps



  • Sameer Bhangar - MSFT

    hi,

    Thanks shakalama those articles helps alot

    I found what I want but there is some things I didn`t found

    How to bind between records and textBoxes

    I have example do that using foreach and its view records in MessageBoxes

    I edited that code and do it with text boxes but its bad idea

    so just I want what is the correct way to do it.

    another question:

    how can I move between records

    Thanks



  • Pioter

    hi,

    you can check this thread has a nice tutorials

    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=430515&SiteID=1&mode=1

    best regards



  • Daggs

    hi,

    to bind a textbox to a binding source you use something like this

    this.TextBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.BindingSource1, "ColumnName", true));

    to move between records , bindingsource has has some methods you can use

    bindingSource.MoveFirst();

    bindingSource.MoveNext();

    bindingSource.MovePrevious();

    bindingSource.MoveLast();

    hope this helps



  • Brandon Bray

    hi,

    Thanks shakalama for this code
    I undertood the idea but how can I make a relation between bindingSource and records in dataset to make a navigations between them

    Thanks



  • E-Shy

    you welcome

  • kurjan

    Thank you shakalama

    This solves the problem

    best regards



  • Request related to ADO