Simply use mstsc -console if didn't work then use mstsc -admin.
Thursday, November 20, 2008
Connecting to Server When All Active Sessions are Used
Posted by Amr at 1:46 PM 0 comments
Labels: Tips
Monday, October 20, 2008
Small Tip, Restore Database with replace "MSSQL 2005"
RESTORE DATABASE AdventureWorks
FROM DISK = 'C:\BackupAdventureworks.bak'
WITH REPLACE
Posted by Amr at 10:23 AM 1 comments
Wednesday, October 15, 2008
Small Tips "IIS Restart"
iisreset /noforce
reference: http://technet.microsoft.com/en-us/library/cc758159.aspx
Posted by Amr at 1:14 AM 0 comments
Labels: Tips
Sunday, September 14, 2008
a href=”javascript:void(0);” — avoid the void
One of the most important hints about javascript and web development.
a href=”javascript:void(0);” — avoid the void
Posted by Amr at 7:45 PM 2 comments
Labels: JavaScript, Tips
Wednesday, September 10, 2008
DotNetNuke container customized
You will find in the following zipped file the default Image Header - Color Background container but I made customized it to use div instead of tables.
http://cid-fa1922bb57748e08.skydrive.live.com/self.aspx/Shared%20Source/NewContainer.zip
Posted by Amr at 9:11 PM 0 comments
DotNetNuke skin customized
You will find in the following zipped file the default DNN-Blue skin but I made customized it to use div instead of tables and to be 4 columns instead of 3.
Note: You will find the admin panel down instead of top.
http://cid-fa1922bb57748e08.skydrive.live.com/self.aspx/Shared%20Source/NewSkin.zip
Posted by Amr at 7:22 PM 0 comments
Labels: .Net, Asp.Net, HTML, JavaScript, Open Source, Tips, websites
Wednesday, September 03, 2008
Friday, August 29, 2008
Just a question "Yahoo Shuts Down Mash"

Yahoo Shuts Down Mash, 0-4 On Social Networking
What will happen for you if you saw the following news while checking your mails or RSS?
Google Shuts Down Google Docs (will lose all your documents?)
Google Shuts Down Blogger (will lose all your ideas you wrote?)
Google Shuts Down Gmail (will lose your mails? "hell")
Facebook Shuts Down (will lose contact to all you friends?)
My Advice:
Use these tools, they are nice and its a must to use them, but please don't put all what you have there, to make your life rely on them, you still have space on your hard disc for saving files, you still have a small note to save your ideas, contacts,.......
Posted by Amr at 8:49 PM 0 comments
Labels: Tips
Saturday, August 16, 2008
List of countries, cities, languages
You will find in the following links list of countries, cities, and their languages in CSV format, you can import into any database:
Countries:
http://www.ziddu.com/download/1936707/Country.csv.html
Cities:
http://www.ziddu.com/download/1936708/City.csv.html
Languages:
http://www.ziddu.com/download/1936713/Language.csv.html
and the following is the sql script to create these tables in sql server 2005:
USE [World]
GO
/****** Object: Table [dbo].[City] Script Date: 08/16/2008 14:48:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[City](
[ID] [int] NOT NULL,
[Name] [nvarchar](35) COLLATE Arabic_CI_AS NOT NULL,
[CountryCode] [nvarchar](3) COLLATE Arabic_CI_AS NOT NULL,
[District] [nvarchar](20) COLLATE Arabic_CI_AS NULL,
[Population] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Country] Script Date: 08/16/2008 14:48:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Country](
[Code] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[Name] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[Continent] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[Region] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[SurfaceArea] [nvarchar](150) NOT NULL,
[IndepYear] [nvarchar](150) NULL,
[Population] [nvarchar](150) NOT NULL,
[LifeExpectancy] [nvarchar](150) NULL,
[GNP] [nvarchar](150) NULL,
[GNPOld] [nvarchar](150) NULL,
[LocalName] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[GovernmentForm] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[HeadOfState] [nvarchar](150) COLLATE Arabic_CI_AS NULL,
[Capital] [nvarchar](150) NULL,
[Code2] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
CONSTRAINT [PK_Country] PRIMARY KEY CLUSTERED
(
[Code] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Language] Script Date: 08/16/2008 14:48:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Language](
[CountryCode] [nvarchar](50) COLLATE Arabic_CI_AS NOT NULL,
[Language] [nvarchar](50) COLLATE Arabic_CI_AS NOT NULL,
[IsOfficial] [bit] NULL,
[Percentage] [nvarchar](50) COLLATE Arabic_CI_AS NULL,
CONSTRAINT [PK_Language] PRIMARY KEY CLUSTERED
(
[CountryCode] ASC,
[Language] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
Posted by Amr at 3:00 PM 18 comments
Saturday, May 31, 2008
Post to your blog without ever leaving Firefox (ScribeFire)
Post to your blog without ever leaving Firefox
ScribeFire is an extension for the Mozilla Firefox Web Browser that integrates with your browser to let you easily post to your blog: you can drag and drop formatted text from pages you are browsing, take notes, and post to your blog.
Posted by Amr at 1:15 AM 1 comments
Friday, February 01, 2008
Excel file in new excel instance
You can open any excel file using code like this:
Process.Start(filePath);
But what will happen if we have these 2 lines of code:
Process.Start(filePathONE);
Process.Start(filePathTWO);
Will first open “filePathONE” in a new excel instance, then will open the “filePathTwo” in the same excel instance.
What we can do if we want to open each file in a separate new excel instance?
We must write it like that:
Process.Start(“Excel.exe”, filePathONE);
Process.Start(“Excel.exe”, filePathTWO);
It’s very simple, isn’t it?
But we can face a small problem with this way:
If you want to open an excel file that contains space in its name, for example “my Sheet.xls”, it will give you a runtime error that it can’t open files “my.xls” and “Sheet.xls”.
So what can I do?
It’s simple:
Just add “ before and after the file path, just like that:
Process.Start(“Excel.exe”, @“””filePathONE”””);
Like that it will open normally without any errors.
Note:
You will need to do the same for any office application (word, powerpoint, ….).
Posted by Amr at 8:24 PM 2 comments
Access splash screen
How to add a splash screen that closes after 10 seconds before my main form starts?
Here is one way:
1. Place the form that has the splash screen in design view and set the following properties:
Timer Interval 6000
On Timer>>>>>>Click the build button to create an event procedure. Place the following code in that procedure:
________________________________________
Private Sub Form_Timer()
On Error GoTo Error_Routine
' Form stays open for 10 seconds, then closes.
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "frmMainSwitchboard"
Exit_Continue:
Exit Sub
Error_Routine:
MsgBox "Error# " & Err.Number & " " & Err.Description
Resume Exit_Continue
End Sub
______________________________________________
2. Go to Startup properties on the Access Command menu tools>Startup and select the splash screen as the form hat opens at startup. Then test by restarting your application access file.
Posted by Amr at 8:15 PM 1 comments


