.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Distributing an application that builds an SQLCE DB.

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :Sql Server
Hi Folks,

Please tolerate some more newbie questions.

I've built a small application that builds a local SQLCE db.

It works great on my development machine because I have installed SQLCE 3.5 sp2 (desktop version) on it.

(It runs and automatically builds a small SQLCE db).

However, it doesn't work on my test machine:

ERROR:  Microsoft .NET Framework:  '...Could not load file or assembly:  "System.Data.SqlServerCe, Version=3.5.1..."...'

This is understandable because I have not loaded SQLCE on this second machine.

No problem because if I simply install SQLCE on this second machine, I'm guessing the error will go away, and the application will run fine, and build my little DB etc.

But... what I'm wondering...

Is there a "correct" way to distribute some necessary .dlls with my application so that the end user doesn't have to install SQLCE on each machine that will run my application?  Or is the "correct" way simply to ask each user to install SQLCE from the .msi file?



Both machines are:

-  Windows XP sp3

-  .Net Framework 3.5 sp1


Thanks very much in advance.  Corrections, partial answers, random thoughts would be appreciated  :)



View Complete Post

More Related Resource Links

SQLCE 3.5 connection from multiple application, data refresh

I have a native application (wm 6.5) using oledb to connect to a database. *******************************************************************************   result=CoCreateInstance(CLSID_SQLSERVERCE_3_5,0,CLSCTX_INPROC_SERVER,IID_IDBInitialize, (void**)&database);   ... // set properties  database->Initialize(); ******************************************************************************* This part of the app simply queries a single table for all records (query wrapped in a transaction of it own). I believe it is recommended that you keep a single connection for as long as possible, and therefore just create a new session each time I query the table. There is a second application (c#) which my application executes and then waits for. It updates and inserts new records. when the c# app closes and I get control back, my app then runs another query to see if anything has changed. My issue is that, the only way I can get the updated data is to un-initialize and re-initialize the database (IDBInitialize) interface created above.  Is there some properties I should be setting on the session/database in order for this to work. Or do I really have to spawn a new connection for every query?   Thanks in advance. Dylan

Cannot deploy application with SQLce datbase.sdf file. says file path is wrong?!


I am trying to deploy a simple windows desktop app using a SQLce database.sdf file. I have followed the steps in this walkthrough about 10 times and I still am having problems. http://msdn.microsoft.com/en-us/library/bb546200.aspx

In my app config file my connection string is this:


 <add name="VendorTracker_2._0.Properties.Settings.Database1ConnectionString"

          connectionString="Data Source=C:\Users\Eamon\Documents\Visual Studio 2008\Projects\VendorTracker 2.0\VendorTracker 2.0\Database1.sdf"

          providerName="Microsoft.SqlServerCe.Client.3.5" />


According to the walkthrough, the windows installer should recognize that i am using a sqlce .sdf file and create a new connection string: 


<add name="VendorTracker_2._0.Properties.Settings.Database1ConnectionString1"

            connectionString="Data Source=|DataDirectory|\Database1.sdf"

            providerName="Microsoft.SqlServerCe.Client.3.5" />


It does add this connection string to the app config file. Now I

Distributing application with Microsoft.Xna framework (Microsoft game studio)


Dear all,

Am sorry if this is not the appropriate forum to post this. Couldnt find the right one.

I have an application where I used the gamepad to direct robotic movement. I have found out that the gamepad cannot be used if install my application on a customer's computer without installing the microsft XNA framework redistributable file. I am wondering if there is a better way to get the gamepad to work on the computer without having to install this file, that is, if there is a .dll file I need to package and include with my application, and if there is an additional thing I have to do to get the .dll registered.

NB: At the moment, I use visual studio deployment project, and it doesnt automatically include the .dll file.



Microsoft's Collaborative Application Markup Language (CAML) Loop

discovered an interesting error recently while working with Microsoft's Collaborative Application Markup Language (CAML) that, surprisingly, had received no ink. Partly what surprises me about this is that the error may require you to rewrite large sections of your code if you haven't previously considered this SharePoint limitation. I'll start with some context, but first of all the error is:

Integrating a Legacy Web Application in SharePoint

This month we will continue with the theme of deploying Microsoft's SharePoint as a company intranet by describing a method for integrating a legacy Web application inside a SharePoint site.

In many companies the intranet site is not just a home page with announcements. It houses Web applications used by many different departments. In last month's article, I built a page to search the employee table in Northwind (the sample database included in Microsoft's SQL Server). This month, I will move the Web pages used to add/remove records from the table into the SharePoint intranet.

MVC architecture in ASP.Net using C# and Microsoft Data Access Application block

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]:

Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View. The view manages the display of information.

Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.

High-Performance .NET Application Development & Architecture

It has always been a goal of project architects to plan an effective strategy from the ground up in regards to an new application. All relevant factors are taken into consideration with respect to the application, from its design and layout to a functional website infrastructure. Pre-.NET strategies and design guidelines still effective now were developed with Microsoft's DNA (Distributed interNet Application) platform. This model successfully served the purpose of architecting N(any number of)-Tier (levels) applications. In its basic sense, as in most robust, distributed applications, you'll architect 3 main layers or Tiers: presentation, business rules and data access.

Application architecture in asp .net

Application Architecture is the most important process of developing a good application. Some people tends to jump into coding without any architecture laid. Later we see those people changing the architecture and finally the application had to be developed from the scratch with the correct architecture.

In this article I will describe some details about how you can improve the architecture of you application. This article is targeted to the beginner's audience.

Improving Application Performance in .Net

Application performance has always been a concern for Web Application developers. This article contains guidelines and tips for maximizing application performance in ASP.NET.

Logic behind N -Tier Application Development

In the arena of application development, developers all over the world use various programming languages, technical processes, and technical tools. While using number of technical & non technical elements the processes or methods become complex, for simplification of the application development process, developers use various techniques such as dividing the application architecture into layers or parts. In the professional & technical language this separation or division process is called N-Tier Application Development process, where "N" stands for number and "tire" stands for layers or parts.

How to create 3 tier application using LINQ

As you know that in 3 tier architecture there are three layers

User interface layer. (Is our Form in Windows application and .aspx page in Web application)
Data Access layer. (Which provides interface between Business logic layer and Database)
Business Logic layer.(Which stores your application logic)

Using Lightbox in an ASP.NET Application

The article describes Lightbox as, "... a simple, unobtrusive script used to overlay images on the current page." It delivers a nice, professional looking method for displaying images as overlays through the use of hyperlinks.

Application Architecture: An N-Tier Approach - Part 1


Free Trial: SQL Backup Pro
Sponsored by Red Gate
Exceptional DBAs make the most of their office hours. That's why they love Red Gate SQL Backup Pro. Its faster, smaller, secure SQL Server backups mean more time spare to accomplish more tasks and professional training. Make time to be an Exceptional DBA. Download it now! »

Free Trial: SQL Toolbelt
Sponsored by Red Gate
The SQL Toolbelt is a set of twelve powerful and intuitive tools that will help you burn through SQL Server chores with astonishing speed and accuracy. Download it now! »

Download: SQL Backup Evaluation Center
Sponsored by Red Gate
Download the T-SQL scripts in the SQL Backup Evaluation Center to compare Red Gate SQL Backup Pro's compressed backups with the size of backups created using native SQL Server. Download it now! »

Autodesk Inventor®
Go Beyond 3D To Digital Prototyping With Autodesk Inventor. Learn How.
Virtualization Solutions
Optimize, Simplify, & Save Today. Learn About Microsoft Solutions.
Microsoft SQL Server® 2008 - Free Trial
Download the Free 180-day Trial of SQL Server® 2008 Enterprise Edition!
Hot Careers in Internet Marketing
Get prepared for your new career with online degrees from Full Sail University!
Microsoft Te

Solidify Your C# Application Architecture with Design Patterns

design pattern can solve many problems by providing a framework for building an application. Design patterns, which make the design process cleaner and more efficient, are especially well-suited for use in C# development because it is an object-oriented language. Existing design patterns make good templates for your objects, allowing you to build software faster. This article describes several popular design patterns you can use in your own applications, including the singleton, the decorator, the composite, and the state classes, which can improve the extensibility of your applications and the reuse of your objects.

Application Architecture in Windows Forms 2.0

Applications have special support in Windows Forms. For starters, you can manage and tailor your application's lifetime, and, when the work flow is disrupted by an unhandled exception, you can choose from several methods of response. Then, there are several application models that you can employ, including Single Document Interface (SDI) and Multiple Document Interface (MDI) applications, each of which can support either multiple-instance or single-instance mode, the former the VS05 default and the latter requiring special consideration. All applications, however, can discover and use a wide variety of information about the system and environment they execute in.

Application Architecture in Windows Forms 2.0-Single-MDI Applications

Consider an MDI application like Microsoft Excel; files opened from the file system (by double-clicking) are all opened as separate child windows within the parent Excel window.7 For the first instance of an MDI application to open a new child window to display the file that was passed to the second instance of the application, the second instance must be able to communicate with the initial instance.

SharePoint Application and Site Pages - Part 1 of 2

In this first part of the two part series, Steven covers the differences between Site and Application pages in SharePoint 2007, why each may be used in various circumstances, and prepares for the construction of a menu located application page. After a brief introduction he examines the concept of Site Pages and Application Pages separately in detail with supported screenshots.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend