9 Reusable Code Snippet Topics
Remove Filter Here's I wrote some code to insert\retrieve images from SQL Server database 1- Create table to hold Image ID, Name and itself [CODE=SQL] USE [ImagesDatabase] GO /****** Object: Table [dbo].[Image] Script Date: 07/10/2009 23:46:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[Image]( … | |
Here's I wrote some code to move controls on the form 1- Assign (Control_MouseMove, Control_MouseDown, and Control_MouseUp) to the controls you need it movable. | |
1- Handler TextBox Key pressed event handler. | |
Here's I wrote some code to validate user input without using if\else statements. I believe in scalability is the most important aspect in our problems solution. Let's say we are required to permit only numerics in some text boxes; we shouldn't develop something like that [iCODE]if(((e.KeyChar < '0' || e.KeyChar … | |
I got yesterday a question how to get average date from list of dates, and here's my answer. | |
If you need to execute SQL Statements\Stored Procedures\UDFs which return\don't return results, Here I've developed this class to be used in Data Access Layer. | |
Here's I wrote some code to say binding not means control and data from database, it may be class holds some data | |
Here's I wrote some code to create login on SQL Server. 1- Add references (Microsoft.SqlServer.Smo, Microsoft.SqlServer.SqlEnum and Microsoft.SqlServer.ConnectionInfo) to your project. 2- Call method CreateLogin which takes to some arguments (documented) | |
Here's I wrote some code to backup your database 1- Add references (Microsoft.SqlServer.Smo and Microsoft.SqlServer.ConnectionInfo) to your project. 2- Call method BackupDatabase which takes to arguments database name and backup file path with extension .bak (preferable) |
The End.