Personalized lock screen

Microsoft Windows 8 Personalized lock screen. from windows.microsoft.com

The tiles of the Start screen

Microsoft Windows 8 The tiles of the Start screen from windows.microsoft.com.

Touch keyboard

Microsoft Windows 8 Touch keyboard from windows.microsoft.com.

SQL Server security model

SQL Server security model

In order to access data from a database, a user must pass through two stages of authentication. first one at the SQL Server level and the other at the database level. These two stages are implemented using Logins names and User accounts respectively.

A valid login is required to connect to SQL Server and a valid user account is required to access a database.
How to Login: A valid login name is required to connect to an SQL Server. A login could be:

• A Windows NT/2000 login that has been granted access to SQL Server
• An SQL Server login, that is maintained within SQL Server
These login names are maintained within the master database. So, it is needed to backup the master database after adding new logins to SQL Server to the machine.

User: A valid user account within a database is required to access that database. User accounts are specific to a database. All permissions and ownership of objects in the database are controlled by the user account. SQL Server logins are associated with these user accounts. A login can have associated users in different databases, but only one user per database.
During a new connection request, SQL Server verifies the login name supplied, to make sure, that login is authorized to access SQL Server. This verification is called Authentication. SQL Server supports two authentication modes:

• Windows authentication mode: With Windows authentication, you do not have to specify a login name and password, to connect to SQL Server. Instead, your access to SQL Server is controlled by your Windows NT/2000 account (or the group to which your account belongs to), that you used to login to the Windows operating system on the client computer/workstation. A DBA must first specify to SQL Server, all the Microsoft Windows NT/2000 accounts or groups that can connect to SQL Server

• Mixed mode: Mixed mode allows users to connect using Windows authentication or SQL Server authentication. Your DBA must first create valid SQL Server login accounts and passwords. These are not related to your Microsoft Windows NT/2000 accounts. With this authentication mode, you must supply the SQL Server login and password when you connect to SQL Server. If you do not specify SQL Server login name and password, or request Windows Authentication, you will be authenticated using Windows Authentication.
Point to note is that, whatever mode you configure your SQL Server to use, you can always login using Windows authentication.

Windows authentication is the recommended security mode, as it is more secure and you don't have to send login names and passwords over the network. You should avoid mixed mode, unless you have a non-Windows NT/2000 environment or when your SQL Server is installed on Windows 95/98 or for backward compatibility with your existing applications.

Sql Server Hosting , web hosting

Key SQL Server Hosting Features (2008)


SQL Server 2008 64-bit

Language Integrated Query (LINQ) in sql server hosting
Developers can use queries against data, with using a managed programming language, instead of SQL statements. Developers are enabled to use strongly typed, set-oriented queries to run against ADO.NET (LINQ to SQL), ADO.NET DataSets, the ADO.NET Entity Framework, and to the Entity Data Service Mapping provider. A new LINQ to SQL provider enables developers to use LINQ directly on SQL Server 2008 tables and columns.

New Data Types in sql server hosting
SQL Server 2008 introduces new date and time data types: DATE, TIME, DATETIMEOFFSET, DATETIME2. The new data types enable applications to have separate data and time types.

Spatial Data Types help build spatial capabilities into applications by using the support for spatial data. Customers can implement Round Earth solutions with the geography data type, using latitude and longitude coordinates to define areas on the Earth's surface. Customers can also implement Flat Earth solutions with the geometry data type, storing polygons, points, and lines that are associated with projected planar surfaces and naturally planar data, such as interior spaces.

Integrated Full Text Search in sql server hosting
Integrated Full Text Search makes the transition between Text Search and relational data seamless.


Sparse Columns in sql server hosting
NULL data consumes no physical space, providing an efficient way of managing empty data without experiencing large space costs.

Large User-Defined Types in sql server hosting
SQL Server 2008 eliminates the 8-KB limit for User-Defined Types (UDTs), allowing users to expand heir UDT size.


Remote SQL 2008 Management in sql server hosting
Customers can manage their SQL 2008 databases remotely with any sql client like SQL Management Studio or SQL Management Studio Express.


Web-based SQL Manager in sql server hosting
Customers can manage their SQL 2008 databases with a web-based SQL manager powered by myLittleAdmin.


Other SQL server Hosting 2008 & Control Panel Features

1. DBO Rights in the SQL Server Hosting
2. Stored procedure support for sql serce in the SQL Server Hosting
3. Full text search in the SQL Server Hosting
4. ASP.NET SQL Session in the SQL Server Hosting
5. Order Multiple SQL 2008 Database Addons in the SQL Server Hosting
6. SQL Disk Space Meter in the SQL Server Hosting
7. SQL Login Password Reset Tool in the SQL Server Hosting
8. Additional SQL 2008 Login Manager in the SQL Server Hosting


The goal of the SQL Server Hosting Toolkit is to enable a great experience around SQL Server in shared hosting environments.

The toolkit will eventually consist of a suite of tools and services that holsters can deploy for use by their customers. It will also serve as an incubation vehicle for tools that hosting customers can download and use directly, regardless of whether their holster has deployed the toolkit. See the Project Roadmap for details on where we're going.


How to Order a SQL Server Database Hosting Plan

If you wish to add a SQL Server database option to your hosting account, simply add the option when you order your hosting account. If you need a SQL Server database without a website, you can do it easily.

SQL Backup Service
SQL Backup Service is optional additional backup service that lets you determine how often you want accessible backup files created of your valuable information. See how you can go beyond emergency backups and be in control of your data protection.

SQL Server Hosting Technical Information
For information on using SQL Server Enterprise Manager, SQL Server Query Analyzer, DTS, ODBC/OLEDB database connections, SQL Server Management Studio and more,

SQL Server 2005 Information and Resources
SQL Server 2005 drives better decision-making with enterprise-grade reporting and data analysis. A highly reliable database platform for critical applications, SQL Server 2005 delivers high levels of availability, performance, and security. For more information and links to SQL Server 2005 resources.

Microsoft DreamSpark Offers Free Download Visual Studio 2008, Server 2003, SQL Server 2005

What is DreamSpark.

Microsoft DreamSpark is a world wide program that provides no-cost access to Microsoft designer and development tools for students, In order to support and advance their learning and skills through technical design, technology, maths, science and engineering activities.
Every free Microsoft developer tools download will be verified through an Online Student Status Verification process which linked to schools and organizations around the world that can confirm student status.

What are the Free Offers,


Microsoft developer tools:
o Visual Studio 2005 Professional Edition
o Visual Studio 2008 Professional Edition
o XNA Game Studio 2.0
o 12-month free membership in the XNA Creators Club

Microsoft designer tools:
o Expression Web
o Expression Blend
o Expression Design
o Expression Media

Microsoft platform resources:
o SQL Server 2005 Developer Edition
o Windows Server, Standard Edition

How do I get it?

1. Go to www.dreamspark.com

2. Log in with your Windows Live ID (e.g. your Hotmail or Messenger email address)

3. Select the software you wish to download or get the license key

4. Down the bottom of the page, select the “Verify” button, to verify that you are a student. You will only have to do this once.

5. After you have selected “Verify”, select your country and university, and then select the “Select and Continue” button

6. The you will be showed you for a username and password. Enter the same details that you would use for your UTS webmail, ( i.e. your UTS student number and your UTS webmail password. www.dreamspark.com will connect to UTS (auth-idp.uts.edu.au), UTS will verify your username/password, and send back to www.dreamspark.com whether you are a student or not)

7. Once your student status has been confirmed, go back to the software page, and the download button will now be activated. Also, a section will have appeared at the bottom of the page allowing you to get your license key for the software.

If you have any question Please comment here !

Add a row / Multiple rows to the data table c#.net

I suppose to use a data table as data source in my grid View controller. Can you please explain how I need to do it?

1. The first step is to create an empty Data Table.
DataTable dt = new DataTable();

2. Second step is to create a new DataRow object.
DataRow newRow = dt.NewRow();

3. Now you have created and initialized a DataRow. So then it is needed to add values to rows.
newRow["id"] = 1; // we have created column call “id” and add it to value 1
newRow["username"] = "adam" ; // we have created column call “username” and add it to value “adam”.

4. Next, we want to add this newly created row (with two columns) to the blank Datatable we created in the first step.

dt.Rows.Add(newRow);

5. You can now set this created Datatable as a DataSource and then DataBind to the GridView or any other similar C# control.

gridView1.Datasource = dt;
gridView1.Databind();

All the steps from above are put together in the below:

DataTable dt = new DataTable();
DataRow newRow = dt.NewRow();
newRow["id"] = 1;
newRow["username"] = "adam" ;
dt.Rows.Add(newRow);
gridView1.Datasource = dt;
gridView1.Databind();


Let see how to add multiple records in datatable without write multiple time code

DataTable dt = new DataTable();
dt.Columns.Add("Min", System.Type.GetType("System.Int32"));
dt.Columns.Add("Max", System.Type.GetType("System.Int32"));
dt.Columns.Add("Avg", System.Type.GetType("System.Int32"));

for (int i = 0; i < i =" i">
{
DataRow dr = dt.NewRow();
row["Min"] = i;
row["Max"] = i + 9;
row["Avg"] = (i + 9) / 2;
dt.Rows.Add(dr);
}

You can add values to row using for loop.










SQL Server 2005 — Enhancements

What are the enhancements for Data Base Administrators in SQL Server 2005 ?

SQL Server 2005 has provide single management console that enables data base Administrators monitor, manage and tune all databases and services. SQL Management Object (SMO) is an efficient management infrastructure to easily program. SMO provides all the management functionalities of the SQL Server and is implemented as a Microsoft .NET Framework assembly.
The primary purpose of the SMO is to automate administrative tasks such as retrieving configuration settings, creating new databases, applying T-SQL scripts, Creating SQL Server Agent jobs and so on

1. SQL Server Management Studio :
It is a one point access to a number of services – the relational database, the Integration services, Analysis services, Reporting services, Notification Services and SQL Mobile.
Indexing capabilities
The SQL Server 2005 has been greatly enhanced. Indexes can be created, rebuilt or dropped online without disturbing existing indexes. This online indexing capability allows parallel processing, concurrent modifications to the table in the database or clustered index data or any other associated indexes.

2. Peer to peer model of replication
It is enables synchronization of transactions with an identical peer database. This further improves availability of data.

3. Table and index partitioning
It is concept of large databases by dividing the whole into manageable chunks. The concept is not new to the SQL Server, but the partitioning of tables horizontally across file groups in the database is new.

4. Snapshot isolation
This feature allows users access the last row that was committed by providing a transactional and consistent view of the database.

5. Replication monitor tool
It defines a new standard for managing complex data replication operations. Its interface is intuitive and has a number of data metrics that are useful.

6. New security model
Security model of the database platform now provides more precise and flexible control for ensuring security of store data.

7. Encryption capabilities
Data encryption of the database has been integrated with the management infrastructure for centralization of security assurance and server policy.

8. Secure computing measures
Those things have been put in place to enable deployment of a secure environment.
SQL Server Express Manager (XM)
This is a free Query Editor tool that is available for download.

9. Improved Business Intelligence

10. Improved Analysis Services

11. Improved Reporting services

How to use savefiledialog box in the c#.net ?

// Create a new SaveFileDialog object
SaveFileDialog obDialogSave = new SaveFileDialog();

// Set Default file extension to dialog
obDialogSave.DefaultExt = "txt";

// Other Available file extensions to dialog
obDialogSave.Filter = "Text file (*.txt)|*.txt|XML file (*.xml)|*.xml|All files (*.*)|*.*";

// Adds a extension if the user does not select
obDialogSave.AddExtension = true;

// Restores the selected directory, next time
obDialogSave.RestoreDirectory = true;

// To display Dialog title
obDialogSave.Title = "Where do you want to save the file?";

// Start directory
obDialogSave.InitialDirectory = @"C:/";

// Show the dialog and process the result
if (obDialogSave.ShowDialog() == DialogResult.OK)
{
// your code go here if user click on “OK” button.
MessageBox.Show("You selected the file: " + DialogSave.FileName);
}
else {
// your code go here if user click on “Cancel” button.
MessageBox.Show("You click cancel.");
}

obDialogSave.Dispose();

// Set object to null.
obDialogSave = null;

What is .Resx file in Dot Net?

What is .Resx file in Dot Net? How to access?

Resource files are used in .NET to store culture-specific data all in one place, separate from the code. For example, suppose you are developing a multi-language Web site and you have a form on a page with a label beside a text field and the label in English says "First Name." Instead of having code like this:

if (language == "English")
{
lblFirstName = "First Name";
}
else if (language == "German")
{
lblFirstName = "Vorname";
}
You can just do this:

ResourceManager resourceManager = new ResourceManager("nameSpace.resourceFileBaseName",
Assembly.GetExecutingAssembly());
lblFirstName = resourceManager.GetString("lblFirstName");
And that's it—just two lines. There's no need to change a million sections of code each time you add or take away a language.


Reading from .Resx File:

You can access the .Resx file using this code:

ResXResourceReader reader = new ResXResourceReader(Server.MapPath("fileName.resx"));
IDictionaryEnumerator rsxr = reader.GetEnumerator();
foreach (DictionaryEntry d in reader)
{
Console.WriteLine(d.Key.ToString() + ":\t" + d.Value.ToString());
}
//Close the reader.
reader.Close();

Writing to .Resx File:

We can write the binary data of an image to the .Resx file using the following code

Image img = Image.FromFile("abc.jpg");
ResXResourceWriter rsxw = new ResXResourceWriter("abc.resx");
rsxw.AddResource("urdu.jpg",img);
rsxw.Close();

Use of .Resx File:

It is very useful while working on Localized project [Multiple Languages], You can make different resource files for different languages and depending upon the user choice you can change the Language of the application.

C# reading data from Serial port

Question -

I have a device (a GPS type of device) that constantly pushes communication through a standard serial connection (COM1).

What I need to be able to do is:

Programatically:
1) Open the serial port
2) Listen for a given period of time (say 2 seconds) to the data that is being received via the serial port.
3) populate a multi-line text box with the data that was received from the serial port.
4) close teh serial port

Then I will build additional code surrounding handling the data in the textbox.


Answer -

I set up my serialport like this

sp.BaudRate = 115200;
sp.PortName = "COM53";
sp.DataBits = 8;
sp.StopBits = System.IO.Ports.StopBits.One;
sp.Parity = System.IO.Ports.Parity.None;
sp.ReadTimeout = 0;
sp.Open();
sp.DataReceived += new
System.IO.Ports.SerialDataReceivedEventHandler(sp_ DataReceived);


and then I have this

void sp_DataReceived(object sender,
System.IO.Ports.SerialDataReceivedEventArgs e)
{

string Mystring = sp.ReadExisting();
byte testbyte = 254;
// Gather all the bytes until 102 is reached
foreach (byte c in Mystring)
{
if(pixelcount<102) pixelcount ="="" testbyte =" {0}" oldx =" 0;" pixelcount =" 0;">

Connect to Microsoft SQL server 2008 (enterprise) database from Visual C# 2008 Express

Question -

i've created a new database using SQL server managment studio with no problem.
database via Management Studio there is no problem, the database appears in the Explorer.

however, in Visual C# Express, when I try to 'Add Connection' as follows

Data source - MS SQL Server Database File
Database File Name - browse to appropriate folder and select
Log in using WIndows Authentification

And use the same database I receive the message (after a while):
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

and yes i did detach the database / disable windows firewall / shutdown anti-virus sw before i try to connect.

* also, let me say i manage to connect for OLE DB (Access 2007) with no problems

does visual c# express edtion got to do with this problem, i mean if full version of visual studio can solve the problem ?

Looking for a solution if possible for the SQL server 2008.


Answer -

Upgrade will definitely solve the problem. The full version of Visual Studio provides support to SQL Server.
The comment about "Real" SQL Server, means that you can connect to the server itself (rather than just the SQL Server files)
I have heard of folks who just bypass the connection wizard and code the connection to the SQL Server "by hand". Using this technique, you *can* use C# Express to connect to a SQL Server... but you've got to do all the work.

How to use GridView and DataSets in C#.NET 2.0?

Question -

I need a example of how to create a gridview in .cs versus just dragging and dropping the gridview on the aspx page?

I created a dataset and called a stored procedure using data adapter, but i do not know how to data bind the data set into the grid view I have.

It seems everywhere I search the gridview examples they have is just dragging and dropping to the page and configuring a datasource.
Answer -

//connect to database via dataset & dataadapte
SqlConnection con = new SqlConnection("server=localhost;Initial Catalog=databasename;uid=;pwd=;");
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter("stored proc name", con);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.Fill(ds);

//create gridview by code & bind dataset to it
GridView g = new GridView();
Page.Controls.Add(g);
g.DataSource = ds;
Page.DataBind();