9 Reusable Code Snippet Topics

Remove Filter
Member Avatar for Ramy Mahrous

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]( …

Member Avatar for Roberto_3
0
10K
Member Avatar for Ramy Mahrous

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.

Member Avatar for vigor
2
1K
Member Avatar for Ramy Mahrous
Member Avatar for Ramy Mahrous

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 …

Member Avatar for ADias-Jayasinha
0
368
Member Avatar for Ramy Mahrous

I got yesterday a question how to get average date from list of dates, and here's my answer.

1
770
Member Avatar for Ramy Mahrous

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.

0
476
Member Avatar for Ramy Mahrous

Here's I wrote some code to say binding not means control and data from database, it may be class holds some data

Member Avatar for Ramy Mahrous
0
2K
Member Avatar for Ramy Mahrous

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)

Member Avatar for Ramy Mahrous
0
435
Member Avatar for Ramy Mahrous

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)

0
250

The End.