Sometimes we have to search what Collation is supported by SQL Server, for example, if we know our computer system is English Windows edition , and English Visual Studio, so what the collation exactly is supported by default when you directly add a SQL Server file such as a SQL Server Compact 4.0 file ? [Read More ...]

Seems there is few help information on internet that how to import an existing SQL Server data table structure into Microsoft Visio 2010, or there are some information, but when you read them, you are always confused because most of them missed some important steps. OK, now people are using Microsoft Office 2010, so the [Read More ...]

The last time we posted “Install Microsoft SQL Server Compact 4.0”, Some friends feed backed they could not see anything about SQL Server Compact 4.0 in their Visual Studio 2010. Firstly, you have to upgrade your Visual Studio 2010 to sp1. However, after you upgrade and installed SQL Server Compact 4.0, you might still not [Read More ...]

How to select last 5 or 10 or … rows in a SQL Server data table ? Solution 1: This is the normal solution SELECT TOP N * FROM MyTable ORDER BY Id DESC Solution 2:  Solution 1 is the normal way but when the data table is huge but the Id is not indexed, [Read More ...]

There are lots of ways to update a table data, here we have one example as the following: UPDATE HOSTDB SET InScan = NOWHOSTDB.InScan, Alarm1 = NOWHOSTDB.Alarm1, Alarm2 = NOWHOSTDB.Alarm2, Alarm3 = NOWHOSTDB.Alarm3, Alarm4 = NOWHOSTDB.Alarm4 FROM HOSTDB, NOWHOSTDB WHERE HOSTDB.idx = NOWHOSTDB.HOSTDBidx AND HOSTDB.idx = 1640

There was a coder wrote the following code about  a SQL Server saving operation: public static bool SaveToDatabase(string strTab, string strSql, SqlConnection Sqlcn, DataSet ds) {     SqlCommand comm = new SqlCommand();     comm.CommandText = strSql;     comm.Connection = Sqlcn;     comm.CommandType = CommandType.Text;     SqlDataAdapter sda = new SqlDataAdapter(comm);     SqlCommandBuilder scb = new [Read More ...]

Microsoft SQL Server Compact 4.0 is a free, embedded database that software developers can use for building ASP.NET websites and Windows desktop applications. SQL Server Compact 4.0 has a small footprint and supports private deployment of its binaries within the application folder, easy application development in Visual Studio and WebMatrix, and seamless migration of schema [Read More ...]

ADO.NET can work on either connected mode or disconnected mode. Connected mode implies the database connection is open, for example, if you use DataReader, the database connection state keeps on open; If you use DataSet or DataAdapter, the database connection status is cloesed, it is ADO.NET disconnected mode; When DataAdapter Fill() data to DataSet, the [Read More ...]

DataSet is an in-memory representation of a database, providing a consistent relational programming model no matter what format of data source. It contains multiple data tables and their relationship and constraints information. DataSet works on ADO.NET disconnected mode; DataReader is a read only, forward only stream of data from a database,  Data are returned as [Read More ...]

There is a table structure here: CREATE TABLE [dbo].[FEEDBACK_LOG]( [Idx] [int] IDENTITY(1,1) NOT NULL, [FBIdx] [bigint] NOT NULL, [EventStatus] [int] NULL, [StartTime] [datetime] NOT NULL, [EndTime] [datetime] NOT NULL, [Length] [int] NOT NULL, CONSTRAINT [PK_FEEDBACK_LOG] PRIMARY KEY CLUSTERED ( [Idx] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS [Read More ...]

© 2013 CodeEase.com Suffusion theme by Sayontan Sinha