Category Archives: C#

Insert/Read image from SQL Database

Here is a few useful links showing the different ways of storing and retrieving an image from MS SQL database. Forum discussion : sgDotNet forum msdn forum Blog post from the same forum : Wen Ching Very good code snippet from Akadia : [Translate]
Also posted in Code, MSSQL, Programming | Tagged , , | 4 Comments

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 Programming | 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 Code, Programming | Tagged , | Leave a comment
  • isisun photos

  • Categories

  • posidev.com

    Valid XHTML 1.0 Transitional

    Tracked by ClickAider

  • Charts

  • Visitors

    free counters