I just installed VS2008 RTM and noticed that it really wants me to use 3.5 instead of 3.1. As I am doing most of my SSCE work through the SQL Server 2005 Management Studio (its query editor is still far superior to VS'), I found that I can still use 3.1 without much trouble (so long as I manually browse and add the 3.1 reference to my project).
That said, I'd like to use 3.5. My two questions are:
- Is the SSCE 3.5 version included in VS2008 final? I noticed the dlls are all over a month old. Can I redistribute these with my app?
- Will there be support in SQL 2005 or SQL 2008 for connecting to 3.5 databases? I know that a new SQL server 2008 CTP was released, but haven't seen mention of SSCE support. I'd really hate to lose the great query editor of the Management Studio when moving to 3.5.
Hi everyone - I'm getting myself into a right muddle and am looking for advice.
How do people deal with connection string matters when taking a dataset defined in one assembly (and by default using the connection strings defined within that assembly in the settings files) and then using that assembly in an app (which also has a requirement to see the same physical database).
I'm not sure I've explained that terribly well but what I'm trying to avoid is duplicate copies of my database which so far seems to be the only way that I've managed to make stuff work. I'm not very experienced with SSCE data access (I'm a serices/sockets/ip person) and this may just be ignorance. Most of the examples seem to assume that the data is in the same place as the app whereas I'm trying to collate a whole series of functions into a helper assembly that I'd like to re-use for other things.
Ideally the dataset designer would provide an easy way of choosing from centralised connection strings - perhaps this is what the Dataset Project implies - but again the docs are mostly focused on SQL Server? Otherwise the best I've been able to do is make the connection properties public and try to update them that way or use a post-build action to copy the database from my datalayer project directory to that of my application |DataDirectory|
I suppose the question might be if you have a dataset containing multiple tableadapters that assumes one connection string, is there any easy way to keep such strings co-ordinated between projects without hardcoding them? With a server resource, the same non-specific connection string resolves to the same server (if that make sense) and this seems to be were I can't make the logical shift.
Does anyone have any thoughts and can they please point this SSCE noob in the right direction?
I have VS2008 (9.0.21022.8 RTM) and I cannot get SQL Compact 3.5 to work with it. Whenever I attempt to open a compact edition database, I get a message that "The operation cannot complete, click OK on the "Package Load Failure" dialog, reinstall SQL Server Compact 3.5 and then from the command line run devenv /resetskippkgs. I've tried that twice and no joy. I can connect and work just fine with SSMS 2005, but I cannot get it to work in VS2008.
Also when in VS2008 and I go to Server Explorer | Data Connections | Add Connection, I do not have Microsoft SQL Server Compact 3.5 in the list.
I have VS2008 installed which has installed SQLEXPRESS. But it seems not all of it.
I want to be able to create tables and generally mess about with SQLEXPRESS without VS2008, is it safe to install Sql Express from this site that will hopefully? install all the management tools? Will this action compromise the VS2008 installation? Will I need to uninstall all the SQL Server stuff that is currently installed?
I am a complete noob when it comes to SQL Express having done all my SQL using Access.
I was initially interested in building my small retail app on Framework 3.5, until just now when I saw the download size. I won't make a single sale with that as a prerequisite.
I would, however, like to use VS2008 for this. If I target Framework 2.0, will I still be able to use SQLCE v3.5? The new SET IDENTITY INSERT functionality is an absolute requirement. (Note: I haven't installed VS2008 yet--I'm still investigating options.)
Hi. I recently upgrading my dev machine to Vista and VS 2008 simultaneously (clean install) and upgraded my VS2005 project, which was previously using SQL CE 3.1. Now when I compile and run it, I get a database exception telling me to upgrade my database to version 3.5!
First of all, I tried running the Repair() method to upgrade the database file, but then I get an exception telling me the password is incorrect (it most certainly is not, I didn't change a thing), so it won't even let me upgrade it.
Secondly, I even tried removing the reference to System.Data.SqlServerCe and manually adding the verison 3.1 reference back, but it still for some reason loads version 3.5 instead of version 3.1.
So! Please either tell me how I can properly upgrade my users' database file to version 3.5 and have it work with the latest libraries, or tell me how I can at least use the old libraries like I was under VS2005. The .dll files are all present in the project and I haven't changed them at all, they're being properly copied to the output directory and everything. I even checked the "Specific Version" attribute on the reference in the project, but no help.
Do I have to do something special to tell my application to load the local copy of the assembly as opposed to, say, one in the GAC?
I've just upgraded my C# app from .NET 2.0 to 3.5 in VS 2008. Now my SQL Server CE database file won't open. When I run the app, it falls over on the connection.Open() method call, saying I have to upgrade the database to 3.5. It says if it was created in 3.0 or 3.1 to run the compact/repair utility. Well, I did that - a full compaction - but it didn't help at all. According to somewhere on MSDN, I should get an option to upgrade if I reconnect to the database in Server Explorer. Not so. It connects quite happily. If I try to connect to some earlier copies of the database, I do get this dialog, so I am assuming that it has already been upgraded. But then why won't the damn thing work?
I tried running the command-line upgrade.exe too, but being a bit clueless when it comes to the command line, I couldn't get it to work. Kept telling me the thing wouldn't run in Win32 mode, even though I was running it from the command prompt (sigh!).
we're getting an error that says "C:....rptproj' cannot be opened because its project type (.rptprroj) is not supported by this version of Visual Studio. To open it, please use a version that supports this type of project." when trying to open RS projects created in VS2005 with VS2008.
We concluded from the specs on VS2008 that the DB Version of VS2008 wouldnt be necessary for RS projects. Were we wrong? Is there some other add in that we need, perhaps BIDS? Is there some conversion step that we need to follow?
I'm using VS2008 (as shipped with SQL CE 3.5 as shipped). I want to write a database app and started with a quite simple example: One table "Master" has 2 columns: int MasterID, int Value (where the MasterID is the primary key and is an identity column.
For the GUI I used the typed dataset components (based on the namespace: System.Data.SqlServerCe) which were automatically generated by VS2008. I just dropped the table from the datasources view to a form and got a DataGridview, a Navigator and some DB components, quite fine so far.
When i run the app i can add new rows and the identity column is filled with -1, -2 ... as expected. When I hit the save button, the rows are saved to DB, but the values of the identity columns are not updated (the still have -1, -2..)
When I use the exact same example with SQL Express evrything works fine: the identity Column's values are updated automatically and have +1, +2, ... Sure there is a statement "SELECT @@IDENTITY"... but I'm just using automated code so far, and i expect that code to work (automatically). Next problem: if i want to insert that "Select @@identity" stuff (I don't want to do that, but perhaps I have to?) where can I do this, I did not found a OnInsertedRow-Event? This problem is part of a bigger one: I want to use Master/Detail, but inserting the Details fails because the inserting of the master rows didn't return the correct Indentity values, so the detail rows cannot be inserted (the foreign keys -1, -2... will raise an error).
When I try to convert a report project from 2005, it seems to convert fine but then the project closes because VS2008 doesn't support that project type (.rptproj ?). I see that there is a report project type under VB (and I assume C#) but there is no Business Intelligence project catagory. It's a new machine and I did install SQL Server 2005 before VS2008.
I'm in the process of moving a bunch of projects and websites from another machine and got hung up on this one. Any pointers greatly appreciated.
Parser Error Message: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I'm not sure what to do to fix this. I've downloaded the redistributable for the report viewer. Please help, I need to have this before the weekend is over.
I'm using VS2008 RTM with a new SQL Compact 3.5 database and I read in VS2008 and SQL Compact 3.5 BOL that Database Diagrams are supported as well as Foreign Key creation from Server Explorer.
However, there doesn't seem to be support for this. Database Diagram commands are not displayed for this new database (but it is for my SQL Express database) as instructed by BOL.
Can anyone tell me if VS2008 fully supports SQL Compact 3.5 with database diagrams and visual tools to create relationships? If so, how can you create a database diagram in VS2008 for SQL Compact 3.5?
I Had VS20005 and SQL 2005 Working perfectly. For some errors, I did formatted my PC and installed VS2008. After doing that, I am trying to install MSSQL2005, when installation be in "Integration development environment with 2005" Phase, An error appears, and the installation stopped. What I have to Do to solve this? Note: I ahve XPSP2 32 bit installed.
A simple question. I installed successfully Visual Studio 2008 Standard edition on my VISTA Ultimate 32bits machine. During install process, I also checked SQL Server Express 2005 item.
Which version of SQL Server Express 2005 did it install? Are we talking about SP2? If so, can I install without problem a more complete SP2 package using following links
SQL Server 2005 Express Edition with Advanced Services SP2 http://go.microsoft.com/fwlink/?LinkId=65109 Microsoft SQL Server 2005 Express Edition Toolkit http://go.microsoft.com/fwlink/?LinkId=65111
without screwing the now existing SQL Server Express setup VS2008 installed?
hi, this is my first post here, i am using Sql Server CE 2005 these days. in a project i found 2 problem that can't find any solution for them till now , maybe there are some bugs i founded them
here is : 1- when i have a SqlCeCommand Object and the ComandText for it is "Update [Term] SET Year=? WHERE _id=? AND name=? "
the problem is in here , i added parameters for this command, if value of parameter is in Unicode ( i tested it in Farsi[Persian] language value like 'زمستان' on 'name' parameter) , in ExcuteNonQuery() method , it throws FormatException with "Input String was not a correct format". although if i change the value of 'name' parameter to something non-unicode (for example i tested it with 'ABCDE' ) it works correctly,
i think SqlCeCommand in UPDATE query , have problem with unicode values in paramteres.
2- second one is so strange for me !! , i have a loop that update a column in a table. and then have another loop that update the next column of that table. for example first i update the column 3 in loop, then in another loop i update the column 4. after all, the value of column 4 and 3 is substituted, it means that values that i updated for column 3 is in column 4 , and values that i updated for column 4 is in column 3 !!!!!!! both columns is in 'int' type.
and the last point is i tested both of this situations in SQL Server 2000 Developer Edition and both worked correctly without any problem.
also i used SQL Server CE v3.1 with .Net framework 2.0 in Vs2005 and C#. is there any missing i'v done or is it some kind of bugs.
We are looking into developing our application using SQL Server Compact and have created a test database to become familiar with the API. Having read about ACID transactions in SSCE we would like to know how this is actually employed. What will happen if a power failure occurs during a transaction? Does this have to be recovered in the code?
I have read the following article: http://msdn2.microsoft.com/en-us/library/csz1c3h7.aspx, but is this the best way to deal with transaction failures?
I can't find any examples on how to recover from failures in transactions in SSCE.
Are there any pecularities of Transaction Logs in SSCE comparing to the same log in full scale SQL Server? How are they stored? And when they are considered to be expired in order to safely delete them?
i'm use this code ,in SQL2005 std and ACCESS database, it work
but if i use SSCE ,it's throw a OleDbException in ExecuteScalar()
Exception : OleDbException
0x80040E30L
DB_E_BADTYPENAME
Code Snippet
OleDbConnection od = new OleDbConnection("Provider=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=db.sdf;SSCE:Database Password=");
od.Open();
OleDbCommand og = new OleDbCommand("INSERT INTO [bills] ([billno],[checkouttime],[finalprice],[handle],[ischeckout],[memo],[paymode],[trick]) VALUES (@billno,@checkouttime,@finalprice,@handle,@ischeckout,@memo,@paymode,@trick)", od);
VS 2008 supports targeting different versions of the .NET Framework. Will this apply to SSCE as well? I have some older apps that I want to keep in .NET 2 and SSCE 3.1. But I would also like to develop new stuff in 3.5. Will the targeting mechanism in VS 2008 support using SSCE 3.1 with .NET 2.0 and SSCE 3.5 with .NET 3.5?
I have a problem installing BIDS. On a XP machine with Visual Studio 2003 and Visual Studio 2008 installed, i tried to install SQL Server 2005 DE with SSIS and Client Tools. All works fine, but the devenv.exe where BIDS start menu shortcut points to doesnt exist. In SQL Server installation dialog, i tried uninstalling BIDS (168 MB disk space will get free'd...) then again installing BIDS (...needs 168 MB disk space...), a lot of harddisk activity, but all the same. I searched for devenv.exe on drive c:, only two hits: The VS2003 and VS2008 files. I tried uninstalling VS2008, VS2003, .net3.5, .net3.0, .net2.0 and SS2005, then installing SS2005 with BIDS, again BIDS start menu shortcut points to nowhere. No devenv.exe on drive c: Now i used system recovery to go back to the point before uninstalling all the stuff, so i can do all my work beside BIDS/SSIS, seaching for a solution...
I thought about installing VS2005 prof., but the license is lost because i upgraded to VS2008.
Note: The VS2008 is installed without installing the SQL Server coming along with VS2008.
I have previously installed SQL Server 2005 Client tools on my machine (XP Professional). When I launch Visual Studio 2005 and go to create a new project, I can see all of the Business Intelligence Templates (i.e. Report Server Project, Integration Services Project, etc).
I recently installed Visual Studio 2008. When I go to create a new project in VS2008, none of the Business Intelligence templates appear.
How would I go about getting these BI Templates to appear so that I can create new Report Services projects in VS2008?
I've just recently downloaded Visual Studio 2008 Express which comes with SQL Server 2005 Express and SQL Server Compact 3.5, both of which were installed when I installed the products.
I've been following the tutorial videos and trying some stuff of my own and I just can't seem to get a Compact 3.5 database to actually update! I'm doing EXACTLY what is shown in the tutorials and th dataset is being updated - changes and added records - and they will show up in a DataGrid control as expected, but when I accept the changes - nothing is changed and/or added to the actual .sdf file. When I open it again, it's the same as it was before. Using exactly the same code but with an SQL Server 2005 Express database (.mdf), updates are fine.
First I created a dataset that connects to the SSCE 3.5 database .SDF file. Then I simply drag the table from the dataset to the form which creates Dataset, Table Binding Source, Table Adapter Manager and BindingNavigator items, in addition to the toolbar and DataGrid controls. The code generated from this is below. I have added the Try/Catch block and messages to see if any errors are ocurring.
Code Snippet Public Class Form3
Private Sub TblMessageTypeBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TblMessageTypeBindingNavigatorSaveItem.Click
When I run the app, the data in the database table is displayed correctly. If I make a change and add a record then click the Save button, I get the expected "Changes Saved" message indicating that there are no errors. When I look a the contents of the table, the changes and additions did not happen and the data is exactly the way it was before.
I had the full SQL Serer 7.0 installed as well so I thought there might be a conflict or something became corrupted. In uninstalled SQL Server 7.0, SQL Server 2005 Express and SQL Server Compact 3.5. I "repaired" VB 2008 Express which reinstalled SQL Server Compact 3.5 and separately reinstalled SQL Server 2005 Express. Same problem.
As I mentioned above, what gets me is that if I use the same setup for a SQL Server 2005 Express database, changes and inserts work just fine. (Used the Northwind.mdf (Express) and the Northwind.sdf (Compact) sample databases and created my own sample .mdf and .sdf databases - same results.)
I've looked at whatever I can to see if I can find the problem but just can't put my finger on it. Very frustrating.
Does anyone have any advice on what I might be doing wrong with Compact or if there is something I've missed or if there's a property somewhere that needs to be set, or perhaps a configuration issue??
I may have stumbled upon the most obscure bug imaginable. I was noticing my parameterized queries were failing on our SBC (WinCE5 x86), but not on our WinCE5 x86 emulator, WinXP setup, or WinCE5 ARMIV emulator. After much grief, I discovered the source of the problem had to do with a call to ICommandWithParameters::GetParameterInfo().
On all platforms other than our SBC, the DBPARAMINFO::ulParamSize was (correctly) retrieved as 16B for type DBTYPE_DBTIMESTAMP. On the SBC this value was retrieved as 8B. Now I know that natively all platforms of SSCE store a datetime object in 8B, but a DBTIMESTAMP structure (16B) is what's always used to transfer those fields to and from the database. Needless to say, with the wrong ulParamSize being returned, my data buffer (which used DBTIMESTAMP's) was being overwritten.
The erroneous value can be seen in this image
Just to further the case that this is a bug, the column size of a datetime field is correctly retrieved as 16B on the same platform when GetColumnInfo is run, as shown here.
We have plan to migrate our database from Access to SqlCe.
Here our situation:
We will never use a Pocket PC applications, only Windows desktop application. We want to migrate the .mdb file to a .sdf file (I've seen the ADS application, but since we don't use mobile devices, it's no use) The .sdf will be use on local client machine only. Here's my problems:
I've use a conversion to migrate from access (http://www.primeworks-mobile.com/Downloads/DPW.html) and seem to work fine. I updated the source code to use the SqlServerCe dll instead of OleDB. Some of my queries work fine, but others just won't work in VS2005 using C#.
To check if the query is really wrong, I take exactly the same query and put it Query Builder from the Server Explorer in VS2005. And the query just work fines!!! It's bring back all the records asked for, and I've got an error for the same query from my source code.
I'm using a datatable, here's the code used for filling the DataTable. I've got an error on the line adapter.FillSchema()
string connectionString = @"Data Source=" + fic_parent.CheminFichierComplet; using (SqlCeConnection connection = new SqlCeConnection(connectionString)) { SqlCeDataAdapter adapter = new SqlCeDataAdapter();
connection.Open();
SqlCeCommand command = new SqlCeCommand(requete, connection);
tableResultats = new DataTable(); adapter.FillSchema(tableResultats, SchemaType.Source); adapter.Fill(tableResultats);
// Close connection connection.Close(); }
Error is:
Message="The specified table does not exist. [ (...) ]" Source="SQL Server 2005 Everywhere Edition ADO.NET Data Provider" HResult=-2147217865 NativeError=0
Here my questions:
Is it possible to have an application that will convert my Access databases to an SSCe .sdf file ? Why I can query in Server Explorer and can't in my source code using the same sql statement ?
At which level my code isn't good, because I just replace all OleDB* --> SqlCe* in my code. I hope that I explain clearly my problem, do not hesitate to ask me questions about this problem.
I have a question about using SSCE with flash memory. Our CE components equally allocate the write access to the memory location. But write access is guaranteed only 10000 times per memory cell. So I need to know
1. what changes are made to the file system if I add an entry to a table? Is this entry the only information added to the file system? 2. What happens if I delete an entry? Will SSCE optimize the data in the filesystem?
I'm running VS2008 beta2. I've succefully added a SDF database file to my project and created a couple of tables in it from VS. I added a reference to the System.Data.SqlCeConnection. When I try to create a new instance of the SqlCeConnection class I get a nasty error that states I'm missing the 'sqlceme35.dll' file. I copy all of the files .dll into by bin folder. Now I'm getting a BadImageFormat error when I create an instance. Does anyone know what that means? or why I had to copy those files to begin with? This is very odd. Any help would be appreciated. I am new to SqlCe.
I don't know if it is by design or a bug. I have tried using the TableAdapterManager with remote SQL 2005, SQL 2005 Express (local and remote) with success. I have tried using the TableAdapterManager ,( which is included by default with the dataset), with SQL Compact 3.5 as a local (within project) and remote(not in the project) and it does not work.
I would think that if the intention is to start using SCE 3.5 as the local database for applications (which makes sense), then I would think that making use of the TableAdapterManager class would seem to be a no brainer unless I'm missing something. I've been known to do that.
I guess my question is, is this a bug or by design?