Is it possible to get Linq to Entities working with a C# application.. I've done it with my asp.net site, but I can't figure out how to set it up with my new project.
When I click to add in a data connection, the only options are Microsoft Access, SQL Compact edition, and SQL Database file..
Thoughts?
I think you did some thing wrong. I suggest you use the NuGet to add the entity framework to your project. Check the below link
http://nuget.org/List/Packages/EntityFramework
Related
I have been given the tasking of providing a desktop solution which allows a user to simply and safely create bespoke reporting queries where their knowledge of the database is limited.
Immediately what came to mind is the SQL server query designer in SSMS. I have searched the internet with no success of whether this can be integrated into a C# Windows Forms application. Has anyone had any success of invoking this functionality in C#?
I used to work with Korzh's EasyQuery component in ASP.NET MVC, but they have the WinForms edition too.
It seems like exactly what you need - the database structure is hidden, end user operates with visual "conditions" and "columns", you get an SQL query as a result.
Here is the link: http://devtools.korzh.com/easyquery/
Basically all I want is to be able to create like a self contained database in my Windows Forms application, I do not want to connect to a server or anything like that with SQL Server, I just want like a small database in the application that can handle a few transactions.
Like for instance if I create a Windows Forms application then it would have its own small database in it and when deploying it.. it will save rows there and stuff. I remember hearing about a plug in, it started with a CT or something don't recall, but it would be a plugin for Visual Studio.
Any help would be much appreciated.
Regards
You can use SQL Server Compact or SQLite (ADO.NET provider is available here). Both are embedded database engines that run in-process. You don't need to install anything, just include the appropriate DLLs with your application.
Visual Studio has no problem providing you with just such a database. Just right click your project, add new item, and select SQL Server Database. The database created will be part of your project and can be deployed as needed.
If you have a limited amount of data you can just right-click the project and Add a DataSet. Then you can define multiple tables in the .xsd and store multiple rows. in the .xml. Then you can write some simple code in the .xsd code-behind to auto load and save defaults and even pull back rows of data. I typically use this approach for storing a single record in each table. It will also work with multiple records in each table. There's a point where if you start to get a lot of data you'll probably wish you had used something like SQL Compact Edition or something similar that you bundle with your app.
you can use sqlLite,this is the website
http://www.sqlite.org/
or you can use access too
I am making a application in c# for windows that is for field guys to mark what they did on a job. there is a proposal side to this that sales guys put in the proposal and it saves to a MySQL database. The proposal is all done online and is PHP. What my issue is the field guys will not always have internet available to them when they are filling out what they do so I need a way for them to be able to see what the proposal is for and then fill out what they did and save it locally. Then when internet is available for it to update the online MySQL with what they did. I am looking at exporting the proposal to XML and emailing it to the field person so my hope is they can import it into the c# and see what they are suppose to be doing. Then do the job filling out what they really did and send it back to the database once online.
While it would require the guys to have local MYSQL instances installed, another option would be to use microsoft synchronization services for .net from within the c# application.
Most examples you will find are for MS SQL, it works with anything that has an ado.net provider as illustrated here with Oracle.
So I'm using C# 2010 Express and wondering what the best toolset is for developing a C# project with a MySQL backend? I know what if you use SQL Server Compact edition from within C# it will let you access the DB directly from the IDE. Is there a similar way to integrate the development with a remote MySQL Database?
Also, is MySQL a versatile enough solution for writing a program with C#? I am looking to build a seperate PHP web site (a reporting portal) that will access the MySQL data. I'd love to go open source all the way, but it seems like C# is the best app to create the app I'm trying to create (touch screen interface for data entry).
Whenever I program a database related homepage I always use HeidiSql and mysql. Both of them are easy to figure out and fast to use.
From their site:
HeidiSQL is a lightweight, Windows
based interface for MySQL databases.
It enables you to browse and edit
data, create and edit tables, views,
procedures, triggers and scheduled
events. Also, you can export structure
and data either to SQL file, clipboard
or to other servers.
All you do is install Mysql, set up a pass and username. and it's up and running.
Then all that's left is to install Heidisql. Heidisql it is a free program. If you need more details on how to attach heidi to your database please do write again.
There is
http://www.devart.com/dbforge/mysql/fusion/
But it's not free and is a plugin which you can't use with Express. There is no way to do this with Express as you can't add onto the basic functionality.
I have written the code and finished the project. It is a window app in c#. I also have a database in sql server 2005 which I used it in the application. I need to create a setup for it so that any user can install it in his machine. build->publish and then following the wizard is the right way perhaps.. but what about the database?
The same database I made won't be in all computers, so I need that database also bind with my application.
Here is a link to some intro level tutorials, this should get you started. I would focus on creating some sample "Hello World" type applications before you dive into database programming. If you don't start small with this stuff, it can get frustrating.
http://msdn.microsoft.com/en-us/library/aa288436%28VS.71%29.aspx
it sounds like you are looking for basic information on setting up a project, to truly document this is going to take a lot more than a post.
The basic project setup, is done via Visual Studio and the "File" -> "New" -> "New Project" option. You can then select the type of project you need and that will then setup the project for you.
For the database conection, you will want to look into the items in the System.Data.SqlClient namespace.