Category Archives: Programming

Binding DatagridView to DataTable Snippets

String strConn = “Server = .\\sqlexpress;Database = NorthWind;Integrated Security = SSPI;”; dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; conn = new SqlConnection(strConn); da = new SqlDataAdapter(“Select Categories.CategoryName, Products.ProductName, Products.UnitPrice From Categories Inner Join Products on Products.CategoryID = Categories.CategoryID”, conn); SqlCommandBuilder cmd = new SqlCommandBuilder(da); ds = new DataSet(); da.Fill(ds, “Categories”); bs = new BindingSource(ds, “Categories”); dataGridView1.DataSource = bs; bindingNavigator1.BindingSource = bs; [Translate]
Also posted in C# | Tagged , | Leave a comment

Setting FileSystemWatcher

I have to watch for changes in INI file so needed somehow to put an event which should trigger an action in my program.FileSystemWatcher class is exactly what I needed.It’s easy to use and very helpful so I will paste the codesnippet that I have found: /* * C# Programmers Pocket Consultant * Author: Gregory S. MacBeth * [...]
Also posted in C#, Code | Tagged , | Leave a comment

Start with NHibernate

NHibernate is a .NET based object persistence library for relational databases.NHibernate is a port of the excellent Java Hibernate relational persistence tool. I just started to look how this framework is functioning and if we can use it in our work.After googling for some time I found that there are usefull sources of information on [...]
Also posted in .NET, NHibernate | Tagged , | 2 Comments
  • isisun photos

  • Categories

  • posidev.com

    Valid XHTML 1.0 Transitional

    Tracked by ClickAider

  • Charts

  • Visitors

    free counters