Search Results

Search found 42 results on 2 pages for 'sqlserverce'.

Page 1/2 | 1 2  | Next Page >

  • AssertionFailure: "null identifier" - FluentNH + SQLServerCE

    - by Stefan
    The code fails at session.Save(employee); with AssertionFailure "null identifier". What am I doing wrong? using FluentNHibernate.Cfg; using FluentNHibernate.Cfg.Db; using FluentNHibernate.Mapping; using NHibernate; using NHibernate.Cfg; using NHibernate.Tool.hbm2ddl; namespace FNHTest { public class Employee { public virtual int Id { get; private set; } public virtual string Name { get; set; } public virtual string Surname { get; set; } } public class EmployeeMap : ClassMap { public EmployeeMap() { Id(e = e.Id); Map(e = e.Name); Map(e = e.Surname); } } public class DB { private static ISessionFactory mySessionFactory = null; private static ISessionFactory SessionFactory { get { if (mySessionFactory == null) { mySessionFactory = Fluently.Configure() .Database(MsSqlCeConfiguration.Standard .ConnectionString("Data Source=MyDB.sdf")) .Mappings(m = m.FluentMappings.AddFromAssemblyOf()) .ExposeConfiguration(BuildSchema) .BuildSessionFactory(); } return mySessionFactory; } } private static void BuildSchema(Configuration configuration) { SchemaExport schemaExport = new SchemaExport(configuration); schemaExport.Execute(false, true, false); } public static ISession OpenSession() { return SessionFactory.OpenSession(); } } public class Program { public static void Main(string[] args) { var employee = new Employee { Name = "John", Surname = "Smith" }; using (ISession session = DB.OpenSession()) { session.Save(employee); } } } }

    Read the article

  • Unable to determine the provider name for connection of type 'System.Data.SqlServerCe.SqlCeConnectio

    - by Hobbes1312
    Hi, i am using the Ado.Net Entity Framework with Code Only (Tutorial at: ADO.NET team blog) and i want to be as much database independent as possible. In my first approach i just want to go for Sql Express and Sql Compact databases. With Sql Express everthing works fine but with Sql Compact i get the exception mentioned in my question. Does anybody knows if it is possible to connect to Sql Compact with the Code Only approach? (with a generated .edmx file for a Sql Compact database everthing works fine, but i want to use code only!) Here is some code: My Class which is building the DataContext: public class DataContextBuilder : IDataContextBuilder { private readonly DbProviderFactory _factory; public DataContextBuilder(DbProviderFactory factory) { _factory = factory; } #region Implementation of IDataContextBuilder public IDataContext CreateDataContext(string connectionString) { var builder = new ContextBuilder<DataContext>(); RegisterConfiguration(builder); var connection = _factory.CreateConnection(); connection.ConnectionString = connectionString; var ctx = builder.Create(connection); return ctx; } #endregion private void RegisterConfiguration(ContextBuilder<DataContext> builder) { builder.Configurations.Add(new PersonConfiguration()); } } The line var ctx = builder.Create(connection); is throwing the exception. The IDataContext is just a simple Interface for the ObjectContext: public interface IDataContext { int SaveChanges(); IObjectSet<Person> PersonSet { get; } } My connection string is configured in the app.config: <connectionStrings> <add name="CompactConnection" connectionString="|DataDirectory|\Test.sdf" providerName="System.Data.SqlServerCe.3.5" /> </connectionStrings> And the build action is started with var cn = ConfigurationManager.ConnectionStrings["CompactConnection"]; var factory = DbProviderFactories.GetFactory(cn.ProviderName); var builder = new DataContextBuilder(factory); var context = builder.CreateDataContext(cn.ConnectionString);

    Read the article

  • How do I free SQLServerCE's COM instance from the current running process?

    - by David Thornley
    It's been a while since I touched COM so be nice ;) This is under WindowsCE 5.0 with SQLServerCE 2.0. After calling this to load SQLServerCE 2.0 : - IDBInitialize *pIDBInitialize = NULL; CoCreateInstance(CLSID_SQLSERVERCE_2_0, NULL, CLSCTX_INPROC_SERVER, IID_IDBInitialize, (void**)&pIDBInitialize); Module load occurs for SSCE20.dll which obviously loads the SQLServerCE engine into the process space. What I don't understand is if I do this immediately after :- pIDBInitialize->Release(); I don't see a dll module unload, so that SSCE20.dll (and friends) are still loaded into my process. Now I tried CoFreeUnusedLibraries() which I figure forces COM to purge any unused libraries, but it doesn't seem to do the trick. At runtime I want to be able to completely unload the SQLServerCE 2.0 dll from the process to streamline an upgrade to 3.5SP1. I suspect this has something to do with the shared dll model that Microsoft use under WindowsCE... but, I might be wrong :) Thanks in advance, David.

    Read the article

  • Migrate data from SQL Compact to SQL Server 2008

    - by Martin
    I need to do a one-time migration of data from SQL Server Compact Edition to SQL Server 2008 Express Edition. I'm looking for a tool to do this kind of migration. I've tried using Import and Export Data in SQL Server, but it doesn't let me import from SQL Server Compact Edition. Anyone knows of a easy way to do it?

    Read the article

  • How can I manage SQL CE databases in SQL Server Management Studio?

    - by Arul
    Dear all, I have Sqlserver 2005 Express Edition only. and VS 2005. How to i create my .sdf file. and how to create tables in that file... I am developing a SmartDevice Application. if any possible to access the Sql server 2000 DataBase without using .SDF file. Note: in my system i have VS 2005, SQL SERVER 2000, SQL SERVER 2005 Express Edition. And aslo i installed MS-SQL SERVER 2005 Compact Edition Developer SDK[ENU]. In my Sql server 2005 Studio, there is no any sqlserver compact edition in the EngineType Combo. what are the things i need to do.. to perfectly run my application with Data Base. Thanks, Thanks for previous one also.

    Read the article

  • How to automate database updates at webserver

    - by user221919
    hi I am developing the online bidding system using asp.net where I need to close the auction if the auction time is get closed without any bid. As in the following web site : http://www.bidrivals.com/us/ Please help me to resolve to this problem. Waiting for your valuable thoughts. Thanking You.

    Read the article

  • SQL Profiler and Tuning Advisor for Reporting Services - what events should be selected?

    - by chris
    I've used the SQL Profiler to generate a trace file, and tuning advisor to take that trace file and provide some recommendations on db updates. However, the SQL Profiler doesn't seem to track the queries when running against a Reporting Server, the profiler doesn't seem to be capturing any of the queries. I'm logging the defaults (SQL:BatchCompleted and Starting, RPC:completed, and Sessions - Existing Connections) What events should I be capturing in SQL Profiler in order to run the tuning advisor?

    Read the article

  • Attempted to read or write protected memory-Sql Compact and .NEt

    - by Jankhana
    I'm using Sql Compact3.5 as my DB with C# .NET . I have a strange problem with my application. I'm running the code in two PC with same configuration except the Sql Compact installed. In one PC where Sql Compact3.5 is not installed I'm getting this strange error: Exception :Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Inner Exception : Stack Trace : at System.Data.SqlServerCe.NativeMethods.CloseStore(IntPtr pSeStore) at System.Data.SqlServerCe.SqlCeConnection.ReleaseNativeInterfaces() at System.Data.SqlServerCe.SqlCeConnection.Dispose(Boolean disposing) at System.Data.SqlServerCe.SqlCeConnection.Finalize() Source : System.Data.SqlServerCe I don't know where i have went wrong. I checked my code and included try catch everywhere. I'm handling Unhandled exception also using this . I am getting this error from a console application which I'm starting from Windows Form. In both the application I've inserted the Unhandled Exception coding and it's getting executed and getting return to the texxt file. But still Microsoft Don't Error Report is getting generated and I get that Dialog box!!! Y still that dialog box is getting generated is the trouble!!! Is there any way to supress that Dialog box??? Y I'm getting this box when I'm handling the exception and it's executing my catch handler??? In another PC where SQL Compact is installed no error I get!!! Any idea y is that so???

    Read the article

  • How to put large text data (~20mb) into sql cs 3.5 database?

    - by Anindya Chatterjee
    I am using following query to insert some large text data : internal static string InsertStorageItem = "insert into Storage(FolderName, MessageId, MessageDate, StorageData) values ('{0}', '{1}', '{2}', @StorageData)"; and the code I am using to execute this query is as follows : string content = "very very large data"; string query = string.Format(InsertStorageItem, "Inbox", "AXOGTRR1445/DSDS587444WEE", "4/19/2010 11:11:03 AM"); var command = new SqlCeCommand(query, _sqlConnection); var paramData = command.Parameters.Add("@StorageData", System.Data.SqlDbType.NText); paramData.Value = content; paramData.SourceColumn = "StorageData"; command.ExecuteNonQuery(); But at the last line I am getting this following error : System.Data.SqlServerCe.SqlCeException was unhandled by user code Message=The data was truncated while converting from one data type to another. [ Name of function(if known) = ] Source=SQL Server Compact ADO.NET Data Provider HResult=-2147467259 NativeError=25920 StackTrace: at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr) at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor) at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options) at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery() at Chithi.Client.Exchange.ExchangeClient.SaveItem(Item item, Folder parentFolder) at Chithi.Client.Exchange.ExchangeClient.DownloadNewMails(Folder folder) at Chithi.Client.Exchange.ExchangeClient.SynchronizeParentChildFolder(WellKnownFolder wellknownFolder, Folder parentFolder) at Chithi.Client.Exchange.ExchangeClient.SynchronizeFolders() at Chithi.Client.Exchange.ExchangeClient.WorkerThreadDoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument) InnerException: Now my question is how am I supposed to insert such large data to sqlce db? Regards, Anindya Chatterjee http://abstractclass.org

    Read the article

  • ObjectContext.SaveChanges() fails with SQL CE

    - by David Veeneman
    I am creating a model-first Entity Framework 4 app that uses SQL CE as its data store. All is well until I call ObjectContext.SaveChanges() to save changes to the entities in the model. At that point, SaveChanges() throws a System.Data.UpdateException, with an inner exception message that reads as follows: Server-generated keys and server-generated values are not supported by SQL Server Compact. I am completely puzzled by this message. Any idea what is going on and how to fix it? Thanks. Here is the Exception dump: System.Data.UpdateException was unhandled Message=An error occurred while updating the entries. See the inner exception for details. Source=System.Data.Entity StackTrace: at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) at System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache) at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options) at System.Data.Objects.ObjectContext.SaveChanges() at FsDocumentationBuilder.ViewModel.Commands.SaveFileCommand.Execute(Object parameter) in D:\Users\dcveeneman\Documents\Visual Studio 2010\Projects\FsDocumentationBuilder\FsDocumentationBuilder\ViewModel\Commands\SaveFileCommand.cs:line 68 at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Button.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.Run() at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at System.Windows.Application.Run() at FsDocumentationBuilder.App.Main() in D:\Users\dcveeneman\Documents\Visual Studio 2010\Projects\FsDocumentationBuilder\FsDocumentationBuilder\obj\x86\Debug\App.g.cs:line 50 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.Data.EntityCommandCompilationException Message=An error occurred while preparing the command definition. See the inner exception for details. Source=System.Data.Entity StackTrace: at System.Data.Mapping.Update.Internal.UpdateTranslator.CreateCommand(DbModificationCommandTree commandTree) at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.CreateCommand(UpdateTranslator translator, Dictionary`2 identifierValues) at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues) at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) InnerException: System.NotSupportedException Message=Server-generated keys and server-generated values are not supported by SQL Server Compact. Source=System.Data.SqlServerCe.Entity StackTrace: at System.Data.SqlServerCe.SqlGen.DmlSqlGenerator.GenerateReturningSql(StringBuilder commandText, DbModificationCommandTree tree, ExpressionTranslator translator, DbExpression returning) at System.Data.SqlServerCe.SqlGen.DmlSqlGenerator.GenerateInsertSql(DbInsertCommandTree tree, List`1& parameters, Boolean isLocalProvider) at System.Data.SqlServerCe.SqlGen.SqlGenerator.GenerateSql(DbCommandTree tree, List`1& parameters, CommandType& commandType, Boolean isLocalProvider) at System.Data.SqlServerCe.SqlCeProviderServices.CreateCommand(DbProviderManifest providerManifest, DbCommandTree commandTree) at System.Data.SqlServerCe.SqlCeProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree) at System.Data.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree) at System.Data.Common.DbProviderServices.CreateCommand(DbCommandTree commandTree) at System.Data.Mapping.Update.Internal.UpdateTranslator.CreateCommand(DbModificationCommandTree commandTree) InnerException:

    Read the article

  • Using Entity Framework with an SQL Compact Private Installation

    - by David Veeneman
    I am using Entity Framework 4 in a desktop application with SQL Compact. I want to use a private installation of SQL Compact with my application, so that my installer can install SQL Compact without giving the user a second installation to do. It also avoids versioning hassles down the road. My development machine has SQL Compact 3.5 SP1 installed as a public installation, so my app runs fine there, as one would expect. But it's not running on my test machine, which does not have SQL Compact installed. I get this error: The specified store provider cannot be found in the configuration, or is not valid. I know some people have had difficulty with SQL Compact private installations, but I have used them for a while, and I really like them. Unfortunately, my regular private installation approach isn't working. I have checked the version numbers on my SQL CE files, and they are all 3.8.8078.0, which is the SP2 RC version. Here are the files I have included in my private installation: sqlcecompact35.dll sqlceer35EN.dll sqlceme35.dll sqlceqp35.dll sqlcese35.dll System.Data.SqlServerCe.dll System.Data.SqlServerCe.Entity.dll I have added a reference to System.Data.SqlServerCe to my project, and I have verified that all of the files listed above are being copied to the application folder on the installation machine. Here is the code I use to configure an EntityConnectionStringBuilder when I open a SQL Compact file: var sqlCompactConnectionString = string.Format("Data Source={0}", filePath); // Set Builder properties builder.Metadata = string.Format("res://*/{0}.csdl|res://*/{0}.ssdl|res://*/{0}.msl", edmName); builder.Provider = "System.Data.SqlServerCe.3.5"; builder.ProviderConnectionString = sqlCompactConnectionString; var edmConnectionString = builder.ToString(); Am I missing a file? Am I missing a configuration stepp needed to tell Entity Framework where to find my SQL Compact DLLs? Any other suggestions why EF isn't finding my SQL Compact DLLs on the installation machine? Thanks for your help.

    Read the article

  • System.AccessViolationException when using TPT inheritance in Entity Framework CTP5

    - by Ben
    Hi, I'm using TPT inheritance in EF CTP5 with SQL CE 4. I have an abstract base class "Widget" with common properties like "Title". I can successfully save concrete Widget implementations e.g. "TwitterWidget". However, I have a problem retrieving all widgets (or rather ALL widget implementations). My repository exposes the following: public IQueryable<Widget> GetAll(); This effectively returns the IDbSet from the DbContext. The following queries work fine: repo.GetAll().ToList(); repo.GetAll().Where(w => w.Title == "Test").ToList(); repo.GetAll().SingleOrDefault(w => w.Title == "Test"); repo.GetAll().Where(w => w.Title == "Test").OrderBy(x => x.Title).ToList(); However, if I write the following query: repo.GetAll().OrderBy(w => w.Title); I get the following error: Test 'PlanetCloud.Portfolio.Tests.Data.PersistenceTestFixture.Can_get_widgets' failed: System.AccessViolationException : Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Data.SqlServerCe.NativeMethodsHelper.GetValues(IntPtr pSeCursor, Int32 seGetColumn, IntPtr prgBinding, Int32 cDbBinding, IntPtr pData, IntPtr pError) at System.Data.SqlServerCe.NativeMethods.GetValues(IntPtr pSeCursor, Int32 seGetColumn, IntPtr prgBinding, Int32 cDbBinding, IntPtr pData, IntPtr pError) at System.Data.SqlServerCe.SqlCeDataReader.FetchValue(Int32 index) at System.Data.SqlServerCe.SqlCeDataReader.IsDBNull(Int32 ordinal) at lambda_method(Closure , Shaper ) at System.Data.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly[TEntity](Func`2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet) at lambda_method(Closure , Shaper ) at System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper) at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) However, I can execute the following query without problems: var widgets = repo.GetAll().OfType<Widget>().OrderBy(w => w.Title).ToList(); So if I specify the type as the base class prior to my orderby clause it works. The question is why?

    Read the article

  • Help using RDA on a Desktop Applicaton?

    - by Joel
    I have a .NET 3.5 Compact Framework project that uses RDA for moving data between its mobile device's local SqlCe database and a remote MSSql-2008 server(it uses RDA Push and Pull). The server machine a virtual directory with sqlcesa35.dll (v3.5.5386.0) setup for RDA. We usually install these cabs on the mobile devices and the RDA process does not have any problems: sqlce.wce5.armv4i.cab sqlce.repl.wce5.armv4i.cab Now I am trying to run this application as a desktop application. RDA Pull (download) has been working well. But the RDA Push (upload) is giving me some problems. This is the exception that I get on the desktop application when I try to use RDA Push: System.Data.SqlServerCe.SqlCeException The Client Agent and Server Agent component versions are incompatible. The compatible versions are: Client Agent versions 3.0 and 3.5 with Server Agent versions 3.5 and Client Agent version 3.5 with Server Agent version 3.5. Re-install the replication components with the matching versions for client and server agents. [ 35,30,Client Agent version = ,Server Agent version = ] I have tried copying the file C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Desktop\SqlServerCe.dll (v3.5.5692.0) to bin\debug I have also tried copying another version of SqlServerCe.dll (v3.0.5206.0) to bin\debug. But this just gives me a slightly different exception: System.Data.SqlServerCe.SqlCeException [ 35,30 ] Is there a different setup or any different dlls that I need to use? Thanks, -Joel

    Read the article

  • Certificate Revocation checking affecting system performance [migrated]

    - by Colm Clarke
    I have a .NET 3.5 desktop application that had been showing periodic slow downs in functionality whenever the test machine it was on was out of the office. I managed to replicate the error on a machine in the office without an internet connection, but it was only when i used ANTS performance profiler that i got a clearer picture of what was going on. In ANTS I saw a "Waiting for synchronization" taking up to 16 seconds that corresponded to the delay I could see in the application when NHibernate tried to load the System.Data.SqlServerCE.dll assembly. If I tried the action again immediately it would work with no delay but if I left it for 5 minutes then it would be slow to load again the next time I tried it. From my research so far it appears to be because the SqlServerCE dll is signed and so the system is trying to connect to get the certificate revocation lists and timing out. Disabling the "Automatically detect settings" setting in the Internet Options LAN settings makes the problem go away, as does disabling the "Check for publishers certificate revocation". But the admins where this application will be deployed are not going to be happy with the idea of disabling certificate checking on a per machine or per user basis so I really need to get the application level disabling of the CRL check working. There is the well documented bug in .net 2.0 which describes this behaviour, and offers a possible fix with a config file element. <?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <generatePublisherEvidence enabled="false"/> </runtime> </configuration> This is NOT working for me however even though I am using .net 3.5. The SQLServerCE dll is being loaded dynamically by NHibernate and I wonder if the fact that it's dynamic could somehow be why the setting isn't working, but I don't know how I could check that. Can anyone offer suggestions as to why the config setting might not work? Or is there another way I could disable the check at the application level, perhaps a CAS policy setting that I can use to set an exception for the application when it's installed? Or is there something I can change in the application to up the trust level or something like that? I have also tried using to no advantage ServicePointManager.CheckCertificateRevocationList = false; http://rusanu.com/2009/07/24/fix-slow-application-startup-due-to-code-sign-validation/ I have also tried those registry settings out and unfortunately they didn't help. The dlls that appear to be the cause of the hold up are native SQL Server CE dlls, and looking at the stack traces in ProcMon mscorwks.dll doesn't appear to be involved even though the checks on crypto and cert registry keys are being done under the .NET application. It's definitely still something to do with publisher certificate checking because unticking "Check for publisher revocation certificate" still works but something odd is going on.

    Read the article

  • MissingMethodException ( Can`t find PInvoke DLL 'sqlceme30.dll ' ) for Windows Mobile

    - by anyinfonet
    Hello. I have developed a win mobile (v5.0) application and I use ONLY 1 database SQLITE with these references: System.Data.SQLite.dll (assembly version & product version : 1.0.65.0); SQLite.Interop.065.DLL (product version : 1.0 and is a c++ lib for first dll ). After 5 weeks of using of this application, I get today a weird exception and I dont understand what it is? Exception is: MissingMethodException Can`t find PInvoke DLL 'sqlceme30.dll ' at System.Data.SqlServerCe.SqlCeCommand.ReleaseNativeInterfaces() at System.Data.SqlServerCe.SqlCeCommand.Dispose(Boolean disposing) ...... What`s wrong? Anyone know about this to explain me please? By the way : until now I delevoped 3-4 applications (1 year ago )using these references and everything worked fine.

    Read the article

  • Column.DbType affecting runtime behavior

    - by leppie
    Hi According to the MSDN docs, the DbType property/attribute of a Column type/element is only used for database creation. Yet, today, when trying to submit data to an IMAGE column on a SQLCE database (not sure if only on CE), I got an exception of 'Data truncated to 8000 bytes'. This was due to the DbType still being defined as VARBINARY(MAX) which SQLCE does not support. Changing the type to IMAGE in the DbType fixes the issue. So what other surprises does Linq2SQL attributes hold in store? Is this a bug or intended? Should I report it to MS? UPDATE After getting the answer from Guffa, I tested it, but it seems for NVARCHAR(10) adding a 11 char length string causes a SQL exception, and not Linq2SQL one. The data was truncated while converting from one data type to another. [ Name of function(if known) = ] A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll

    Read the article

  • Can I create and connect to a SQL Server CE database if SQL Server 2005 isn't installed?

    - by MusiGenesis
    Is there any way to do this? Update: Sorry, I should have included more information. I am trying to create and connect to a SQL CE database using System.Data.SqlServerCe in C# running on a PC (i.e. not running on a Windows Mobile device). This code: string connstr = "Data Source=\"" + filename + "\";Persist Security Info=False;"; System.Data.SqlServerCe.SqlCeEngine engine = new SqlCeEngine(connstr); engine.CreateDatabase(); ... works fine on any PC that has SQL Server 2005 installed, but fails on any PC that doesn't have it installed. I'm trying to find out if there's any way to get this to work without installed SQL Server 2005 on the machine.

    Read the article

  • SqlCeCommand ExecuteNonQuery performance issue

    - by Michael
    I've been asked to resolve an issue with a .Net/SqlServerCe application. Specifically, after repeated inserts against the db, performance becomes increasingly degraded. In one instance at ~200 rows, in another at ~1000 rows. In the latter case the code being used looks like this: Dim cm1 As System.Data.SqlServerCe.SqlCeCommand = cn1.CreateCommand cm1.CommandText = "INSERT INTO Table1 Values(?,?,?,?,?,?,?,?,?,?,?,?,?)" For j = 0 To ds.Tables(0).Rows.Count - 1 'this is 3110 For i = 0 To 12 cm1.Parameters(tbl(i, 0)).Value = Vals(j,i) 'values taken from a different db Next cm1.ExecuteNonQuery() Next The specifics aren't super important (like what 'tbl' is, etc) but rather whether or not this code should be expected to handle this number of inserts, or if the crawl I'm witnessing is to be expected.

    Read the article

  • How do I connect to SDF on a Mobile device from desktop application?

    - by pitprog
    C# WinForms .Net 3.5 to SQL CE 3.5 on Mobile 6.1 Device I'd like to make a connection from a desktop application to a SDF database on my Windows Mobile device while it's connected via ActiveSync. Visual Studio lets me create a Data Connection to my device. The connections tests OK and I can view the data in the database using Visual Studio. I then create a form and try to fill a DataGridView. When I run the program I get an error that the path to the data base is not valid. How am I supposed to specify the Mobile device path in the connection string? In my App.Config, I've tried variations on the path, but none of them work: connectionString="Data Source=Mobile Device\Program Files\SqlCeViaActiveSync\Orders.sdf" connectionString="Data Source=\Mobile Device\Program Files\SqlCeViaActiveSync\Orders.sdf" connectionString="Data Source=Program Files\SqlCeViaActiveSync\Orders.sdf" connectionString="Data Source=\Program Files\SqlCeViaActiveSync\Orders.sdf" The full connection string section looks like this: <connectionStrings> <add name="SqlCeViaActiveSync.Properties.Settings.OrdersConnectionString" connectionString="Data Source=Mobile Device\Program Files\SqlCeViaActiveSync\Orders.sdf" providerName="Microsoft.SqlServerCe.Client.3.5" /> </connectionStrings> Also, I did make a reference to Microsoft.SqlServerCe.Client, as I found a few articles that mentioned it was necessary. Can anyone point me to some recent articles/samples or let me know what I'm doing wrong? Thanks!

    Read the article

  • SQL Compact error: Unable to load DLL 'sqlceme35.dll'. The specified module could not be found

    - by Ciaran Bruen
    Hi - I'm developing a Winforms application using Visual Studio 2008 C# that uses a SQL compact 3.5 database on the client. The client will most likely be 32 bit XP or Vista machines. I'm using a standard Windows Installer project that creates an msi file and setup.exe to install the app on a client machine. I'm new to SQL compact so I haven't had to distribute a client database like this before now. When I run the setup.exe (on new Windows XP 32 bit with SP2 and IE 7) it installs fine but when I run the app I get the error below: Unable to load DLL 'sqlceme35.dll'. The specified module could not be found I spent a few hours searching this error already but all I can find are issues relating to installing on 64 bit Windows, none relating to normal 32 bit that I'm using. The install app copies the all the dependant files that it found into the specified install directory, including the System.Data.SqlServerCe.dll file (assembly version 3.5.1.0). The database file is in a directory called 'data' off the application directory, and the connection string for it is <add name="Tickets.ieOutlet.Properties.Settings.TicketsLocalConnectionString" connectionString="Data Source=|DataDirectory|\data\TicketsLocal.sdf" providerName="Microsoft.SqlServerCe.Client.3.5" /> Some questions I have: should the app be able to find the dll if it's in the same directory i.e. local to the app, or do I need to install it in the GAC? (If so cam I use the Windows Installer to install a dll in the GAC?) is there anything else I need to distribute with the app in order to use a Sql Compact database? there are other dlls also such as MS interop for exporting data to Excel on the client. Do these need to be installed in the GAC or will locating them in the application directory suffice? TIA, Ciaran.

    Read the article

1 2  | Next Page >