SQL Server Compact Visual C++
Is SQL Server Compact a viable platform for future development? I'm using VS 2010, Native C/C++ and need a good tutorial to walk me through the process of creating a simple db application. Any suggestions?
If SQL Compact is not a viable platform, I would appreciate some direction. My application is very well suited for the 'Compact' single file database with a small number of users. I'm not interested in .NET.
Thanks,
Bob Nichols
Bob Nichols
AFAIK, Microsoft stopped SQL Server Compact development and today SQLite is most used on devices.
It seems that for new application it could be the best choice also portable on other platforms.
Paolo.
Paolo Patierno
Similar Messages
-
How to calculate a rolling average within SQL Server Compact
There are at least a dozen ways to skin this cat in regular SQL Server, but I am trying to solve this problem within the limitations of SQL CE. I have a table of stock values:
Stock, Date, Open, High, Low, Close
and I want to add 1 column "RollingAVG" which is simply the AVG(Close) over a specified timeframe (say 30 days)
This code here works in SQL Server 2012 just fine (of course) but I need something that produces the same results in SQL CE. Any thoughts? Thanks!
SELECT b.Symbol,b.DateTrade, b.ValueClose,
(SELECT
AVG(a.ValueClose)
FROM
HistoryPrice a
WHERE
a.DateTrade >= DATEADD(d,-30,b.DateTrade)
AND a.DateTrade <= b.DateTrade
AND a.Symbol = b.Symbol
) as Rolling30Close
(SELECT
MIN(a.ValueLow)
FROM
HistoryPrice a
WHERE
a.DateTrade >= DATEADD(d,-30,b.DateTrade)
AND a.DateTrade <= b.DateTrade
AND a.Symbol = b.Symbol
) as Min30Day
(SELECT
MAX(a.ValueHigh)
FROM
HistoryPrice a
WHERE
a.DateTrade >= DATEADD(d,-30,b.DateTrade)
AND a.DateTrade <= b.DateTrade
AND a.Symbol = b.Symbol
) as Max30Day
FROM
HistoryPrice b
order by Symbol,DateTrade desc
ShaneHi,
AVG function is supported in SQL Server Compact. However, embedded select clause is not supported in Visual Studio and a SQL Execution error will be thrown out.
I suggest you optimize your query. You can refer to the below code:
AVG (SQL Server Compact)
http://technet.microsoft.com/en-us/library/ms174124.aspx
If you have any feedback on our support, please click here.
Thanks.
Tracy Cai
TechNet Community Support -
How to deploy a sql server compact 4.0 in windows xp?
My program is developed by visual basic 6.0 with sql server compact 4.0. How can I deploy it in windows xp sp3?
Should I install .netframework version X in windows xp before sql server compact 4.0 ?
When I copy my program to windows xp and run it , it shows not found provider error.I you use ADO, the OLEDB provider must be registered. To do the simply install the SQL Server Compact 4.0 SP1 runtime MSI
Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com -
Hi, Can I use Microsoft SQL Server Management Studio version 11.0 to write SQL queries for "SQL Server Compact 4.0 Local Database" ?
When I use Connect Object Explorer, the "Connect to Server" dialog box which pops up has only 4 selections in the Server Type Drop Down List. They are Database Engine, Analysis Services, Reporting Services & Integration Services. I have read
somewhere that there should be a compact database option. but I do not see it.
What I would like to do is use free form SQL Queries against the tables in "SQL Server Compact 4.0 Local Database" .
Once I have validated these queries, then I will use them in my Visual Studio 2012 C#, ASP.NET application. I created the Local Database using Visual Studio 2012 for use by my application.
Thank you for your help..
diana4Hello,
With SSMS 2005 we have had the Option to work with SQL CE database files, but not with higher Version of SSMS.
You can use the free SQL CE Toolbax instead; see
http://sqlcetoolbox.codeplex.com/
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Accessing typed dataset in SQL Server Compact Toolbox in VS 2013
I am a novice with coding so this could be a very simple answer. I am coding an application in Visual Studio 2013 with VB. I included a Compact SQL Server database using the SQL Server Compact Toolbox add in. The database shows up in my solutions explorer.
I plan on using a typed dataset for my application but when I try to reference the dataset using this code the intellisense doesn't recognize it.
Dim newCustomerRow As DHA_dbDataSet.CustomerRow
My database is named "DHA_db". I am sure there are steps I am missing.
How do I reference the typed dataset so I can add rows and data to it?
Thanks in advance.
Hmm...The Toolbox (I am the author of it) does not support Typed DataSets (and neither does VS 2013, I believe). You should use LINQ to SQL instead, and the Toolbox supports code generation for this.
Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com
Thank you a ton. I started off with an incorrect assumption about the dataset. Your advice and a google search led me to description of how to add a typed DataSet.
http://msdn.microsoft.com/en-us/library/04y282hb.aspx
I like the Toolbox add in. Thanks for authoring it!
Hmm... -
Is SQL Server Compact Dead ?
Hi have a new project that needs a small footprint,t not networked, database for storage and retrieval during desktop program operation (no data needs to be stored after program is closed). This is multithreading program that retrieves web pages asynchronously
puts retrieved data into a temp database and will need to display whatever it has at the moment (even if some requests are not processed yet) in a grid with SQL filtering. Also the PCs that this will run on will be old and I do not want to install
a database server on each one...
So the question is should I use SQL compact or is it currently used by those that already had it in a project ? and no new projects should look at it ?
Thanks
Will access from desktop C# winforms program, using 3.5 maybe 4.x framework.I also started to worry about this product and everything I have found on the net so far points to SQL Server CE being deprecated. There has been nothing officially announced by Microsoft with the closest being a response to a MS Connect issue:
"SQL Server compact edition is in deprecation mode with no new releases planned near future. Last release SQL CE 4.0SP1 (and earlier releases that are still in the support cycle) will continue to be supported through its lifecycle and Microsoft is committed
to fix any major, production blocking issues found in these releases." (Microsoft Connect)
The mainstream support for CE 4.0 will end on 2016-07-12 and extended support 2021-07-13 unless they release a new service pack, which I see as doubtful (Microsoft
Support).
Support for SSCE has also not been included in Visual Studio 2013 and SQL Server 2014 Management Studio. Erik's SQL Server Compact Toolbox can be used to add support back to VS2013 (CodePlex). SQL
Server CE has even now been removed from the SQL Server website. It still shows up in search results from Microsoft search (Micorsoft)
but sometime back in March or April the page was removed (Wayback Machine).
There are a couple of UserVoice suggestions asking for Microsoft to support and develop SQL Server CE further:
Support Sql Server Compact in VS2013
Sql server Compact 5
So overall even though nothing has been announced it seems pretty clear to me that Microsoft are not continuing development of SQL Server CE and do not want people to use it. It's dead! -
Questions about downloading SQL Server Compact 3.5
I want to use SQL Server Compact 3.5 with Microsoft Visual Basic 2008 Express Edition, but when I go to "Get It" it gives me two options: to download Visual Studio 2010, download Microsoft SQL Server Compact 3.5 Service Pack 2 for Windows
Desktop or download Microsoft SQL Server Compact 3.5 Service Pack 2 Server Tools. Are any of the last two the actual SQL Server Compact 3.5 (or what do they mean with "Service Pack"?) or is there another way to download SQL Server Compact 3.5?Are any of the last two the actual SQL Server Compact 3.5 (or what do they mean
with "Service Pack"?) or is there another way to download SQL Server Compact 3.5?
Hello,
This means it's an updated Version = SQL Server Compact 3.5 including Service Pack; you should download that "Microsoft SQL Server Compact 3.5 Service Pack 2"
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Inserting data to a . SDF database (SQL Server Compact Edition connection)
Hi, all.
I'm working on a project that worked fine while connecting to SQL Server 2008. I used a connection string like this:
Driver={SQL Server Native Client 10.0};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Now, I've replaced all database connections in my project to work with SQL Server Compact Edition, and my connection string is something like this:
Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=myDir\myDataBase.sdf;
After changing the type of connection, I'm getting an error on "DB Tools Insert Data.vi". This is what I get:
Error -2147217872 occurred at NI_Database_API.lvlib:Cmd Execute.vi->NI_Database_API.lvlib: DB Tools Insert Data.vi->Main.vi
Possible reason(s):ADO Error: 0x80040E30 Exception occured in Microsoft SQL Server Compact OLE DB Provider: The given type name was unrecognized. [,,,,,] in NI_Database_API.lvlib:Rec Create - Command.vi->NI_Database_API.lvlib:Cmd Execute.vi->NI_Database_API.lvlib: DB Tools Insert Data.vi->Main.vi
This is a simplified block diagram (as I said, it worked perfectly while using SQL Server 2008 connection):
Could you please help me?
Thanks in advance,
FranciscoHi, Steve. Thanks for your answers.
I worked around this problem by using directly a SQL query instead of this function (you were right, using DBTools Execute Query VI). But now I'm getting problems with other functions, when inserting data into the DB including NULL values.
I make a SQL query like this using DBTools Execute Query VI:
INSERT INTO Table1 (Column1, Column2, Column3, Column4, Column5, Column6) VALUES ('Value1', 'Value2', 'Value3', 'NULL', 'Value5', 'Value6')
and get the following error:
ADO Error: 0x80040E07Exception occured in Microsoft SQL Server Compact OLE DB Provider: A literal value in the command could not be converted to the correct type due to a reason other than data overflow. [,,,,,] in NI_Database_API.lvlib:Conn Execute.vi->INSERT (new) restricción (DBCT).vi->Restricciones a Base de Datos (DBCT).vi->Definir - editar restricciones.vi->Main.vi
The same SQL query worked perfectly when using the SQL Server 2008 connection, so it's not a database structure issue.
Could somebody please help me?
Regards,
Francisco -
SQL Server Compact 3.5 Merge Replication With SQL Server 2012 - Causing IIS App Pool to Crash
Hi, I may be the only person in the world doing this but I wanted to give this information to anyone else who may follow this path in the future, and hopefully avoid a headache, or at least a paid support call to Microsoft.
My original scenario was we had a SQL Server 2008 Server using Merge Replication through and IIS (web server) to several Windows Mobile 6 devices. This has worked fairly well for a few years.
Recently we upgraded our SQL server to version 2012 SP 1. After moving the database over to the new server, and re-setting the merge replication stuff, we couldn't get merge replication to work on the Windows Mobile 6 handheld devices. The replication
would appear to start, and then we would get a message saying that the device could not get to the web site. The message on the handheld device was this:
"The IIS service is not available."
After doing some more research, we found that the start of the replication process was causing the Thread Pool that was running the SQLCESA35.dll to crash.
The SQLCESALOG.txt file had this information:
Date Time == SQLCESA Version ==> 3.5.8088.0
Date Time Hr=80004005 ERR:Couldn't find existing RSCB 1
After 2 days of trying to figure out the issue on our own, we gave in and called for paid Microsoft support. They eventually found a known issue where a cumulative update was able to fix the problem.
We installed the update on the IIS server and everything ran smoothly again.
FIX: Merge replication fails when you use SQL Server Compact to perform a merge replication that synchronizes changes with a publisher in SQL Server 2012
http://support.microsoft.com/kb/2845550
Seth O'NealHi sonealtx,
Glad to hear that the issue is resolved. Thanks for your sharing, other community members could benefit from your solution.
Thanks,
Lydia Zhang
Lydia Zhang
TechNet Community Support -
How do I create a view in SQL Server in Visual Studio Express 2013 for Desktop?
Hi
I've got a SQL Server database set up using the internal SQL Server in Visual Studio Express 2013 for Desktop. I want to create a view (using tables with one to many relationships) but I don't
know how to do it.
Where can I find a good tutorial on creating views in SQL Server in Visual Studio Express 2013 for Desktop? I think Visual Studio Express 2013 for Desktop doesn't have some view designer that
exists in the non-express version of Visual Studio (if I'm not mistaken). So I think I'd need a tutorial on how to do the actual SQL, unless there is some tool I don't know about.
ThanksHi ,
According to your description, if you install SQL Server SQL Server 2014 Express and SQL Server Manager Studio tools (SSMS), if you want to create a view, you can use SSMS. Then if you want to connect to and Diagram your SQL Express Database in Visual Studio
2013, you can attach the database file by using the .NET Framework Data Provider for SQL Server in Visual Studio, and create a database diagram via expanding the “Database Diagrams” node.
For more information, there is similar issue about how to connect to and Diagram your SQL Express Database in Visual Studio 2012 , you can review the following article,
http://blogs.msdn.com/b/bethmassi/archive/2011/10/27/how-to-connect-to-and-diagram-your-sql-express-database-in-visual-studio-lightswitch.aspx.
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
There are links on the pages for various Cummulative Updates for SQL Compact v3.5 SP2 which look to relate to the desktop version, but are these also available for Windows Mobile devices? If so, what is the process to get hold of them?
We are seeing intermittent problems with corrupted databases on devices which are using SQL Compact v3.5 SP2 and have seen that some of the Cumulative Updates do relate to corruption and would like to see if these can help to solve the issue.Just select the KB article, at the top of each there is a link to request a hotfix, you will then get a email with a download link. The 8088 and 8109 hotfixes also apply to Windows Mobile.
http://erikej.blogspot.dk/2010/08/sql-server-compact-35-sp2-downloadable.html
Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com -
hi, I would like to know if is it possible to install windows on macbook pro , because I need to have some application like SQL server and visual studio, and they could not be install on mac
Windows on a Mac
-
Hi
I have followed http://technet.microsoft.com/en-us/library/ms173298(v=sql.110).aspx to support private deployment for my application in anycpu mode.
Though its working fine on several XP and Windows 7 , on on particular XP machine , I get this
System.Data.SqlServerCe.SqlCeException (0x80004005): Native components of SQL Server Compact engine are not loaded. Please reinstall Microsoft SQL Server Compact.
at System.Data.SqlServerCe.NativeMethods.ThrowIfNativeLibraryNotLoaded()
at System.Data.SqlServerCe.SqlCeEngine.Dispose(Boolean disposing)
at System.Data.SqlServerCe.SqlCeEngine.Finalize()
Can anybody give me directions on this?Do you use LINQ to SQL or EF or ADO.NET, is what
Yes, I would start by investigating:
- Do you REALLY need "any CPU", or can you cope with just x86 to make things simpler (See my LINQ to SQL blog post)
- Is SQL Server Compact installed on this PC, and which build (is it same or different from the one you distribute)
- Use Process Explorer from sysinternals on the machine to find out where the app tries to load the native libraries from (and fails)
Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com -
JDBC driver for SQL Server Compact Edition
Hi,
I'm trying to run pc java application on Pocket Pc (Mobile 5.0) with SQL Server Compact edition.
The error message is:
java.lang.UnsatisfiedLinkError: java/sql/DriverManager.getCallerClassLoader()Ljava/lang/ClassLoader;
at java.sql.DriverManager.getConnection(Unknown Source)...
Should I use a special jdbc driver for SQL Server Compact Edition? Is there one?
MixxoHi,
I got an answer from msdn forum:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2307542&SiteID=1.
There is no jdbc driver for SQL Server Compact Edition. OleDB and ADO.net are available. Now I need to know how to use them (in Java)...
Thanks, Mixxo -
Can TS work with sql server compact or express?
I'm don't have much experience with the underpinning of database systems. I know conceptually how they work and can hack my way through sql queries. Is there something fundamentally different about a Sql Server Compact itnstall versus Sql Server versus Sql Server Express? Can TS work with any of them with a proper connection string?
My problem is at our local site a previous employee set us up on Sql Server and wrote a web app (.asp) to do the query for presentation on a web page. At an offsite location they can't install Sql Server and I'm trying to figure out the best path for them to be able to use the same .asp tool we have. My gut feeling is the .asp tool is probably set up such that it wouldn't take much to make it work with MySql but because I don't have the luxury of time I'm hoping someone can point me in what they think might be the easiest direction (whether that is sql compact if possible or MySql for them).Hi,
TestStand works with SQL server express. (not sure about SQL server compact).
Ravi
Maybe you are looking for
-
Open stock updation not performed with MB1C
Dear Frieds, While performing open stock updation with MB1C T-Code, an error message will appeared as " Material xxxx does not exist in warehouse xxxx". Kindly give the solution. Regards, Gopi
-
Upgrade Program with other function
hi disowned married woman i would like to know your name if you want to deepen our conversation with interesting solution you are for me a interesting subject to share my problem if is possible naturally. You are much kind one to respond answer to me
-
Is it possible to build Java 1.5.0 from source?
I have posted a similar question on the "New To Java" list, but have not received an answer. I think that what I am trying to do is far too advanced for the Newbie forum. I am attempting to build Java 1.5.0 from the source tarball I downloaded from j
-
How do I make use of Sun JCE in Websphere environment, where it enforces the use of IBM JCE. I had coded the crypting section using Sun JCE when the application was deployed in Tomcat. Now I am planning to move the same to Websphere.
-
Such like toolbar,when right click to open tab and when the loading...