Create auto increment primary key on SQL Server Compact Database
Tech-Today

Create auto increment primary key on SQL Server Compact Database


Just examine this script:


CREATE TABLE user (
user_id INT IDENTITY(1, 1) NOT NULL PRIMARY KEY,
user_name NVARCHAR(50)
)


Regarding IDENTITY(1, 1) and SQLCE Data Type, refer to the following article:

http://www.codeproject.com/KB/mobile/DBApplicationsForPocketPC.aspx
and
http://msdn.microsoft.com/en-us/library/aa237850%28SQL.80%29.aspx




- Cannot Open Database "database" Requested By The Login. The Login Failed. Login Failed For User 'user'
Often you will encounter this error if you are restoring a database from one machine into another. What causes the error: On a full backup of the database, it includes all the objects within it like tables, views, procedures, etc and also the users. So...

- Operation Must Use An Updateable Query
I am currently developing a certain application in MS Access and I need to link 2 databases, select data from one and move it to the second. In access I have no problem using the TransferDatabase command. DoCmd.TransferDatabase acLink, "Microsoft Access",...

- Sqlce Get Last Insert Id, Convert Sqldecimal To Int32
Platform: Windows Mobile, SqlCE2.0 Problem: You want to get the id of the last query you insert. Solution: Using the @@identity you have to execute your queries like this: SqlCeConnection conn = null; try { conn = new SqlCeConnection(GetConnection());...

- Installing Sql Server Compact Edition 3.1 On Mobile Device (pocket Pc)
1.) Download the sqlce3.x installer, http://www.microsoft.com/downloads/details.aspx?FamilyId=E9AA3F8D-363D-49F3-AE89-64E1D149E09B&displaylang=en or http://www.microsoft.com/downloads/details.aspx?FamilyID=85e0c3ce-3fa1-453a-8ce9-af6ca20946c3&displaylang=en...

- The Process Account Used To Run Asp.net Must Have Read Access To The Iis Metabase (e.g. Iis://servername/w3svc)
I encountered this problem when I install the IIS after the framework. You need to manually register the IIS. http://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx Usually: C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i ...



Tech-Today








.