How to make a quick interface to edit / delete / add the database? - c#

I have the database mysql.
I need to access it via a desktop application with the ability to change does not have value.
in asp.net is there, this dynamic data filter, I need the same thing but in WPF.

Visual Studio has lots of easy tools to help you integrate your SQL Server into the application from using things like the DataGridView to the DataRepeater take a look at this article http://www.codeproject.com/KB/WPF/wpfviews.aspx it should help you get started. Using LINQ to assist in speed application development.
Another Great link: http://dotnetslackers.com/articles/wpf/WPFDataBindingWithLINQ.aspx

Related

How to connect to LocalDB in a .NET 5 project?

I am writing a console application using .NET 5, and I am using a LocalDB instance (at least I hope that's the right terminology) to store the data that the application needs. I can see the database (including both tables and all the data in said tables) in both the Server Explorer and SQL Server Object Explorer tabs of Visual Studio 2019, but the Data Sources tab the only thing that shows is the text "This window is not supported for the selected project."
The problem is, all the tutorials I've been able to find rely on that Data Sources tab. From looking at other questions here on Stack Overflow, it looks to me like that tab is deprecated with .NET 5? Am I correct? And how would I write the code to access the database and perform CRUD operations without the Data Sources tab?
Sorry if this is a stupid question; this is my first time using LocalDB.
You should use SQL Server Object Explorer. If you right click on the database that you want to connect, you can see the properties, including connection string. If you have trouble with incorporating Connection string into your code - you need to show the code and the problem.
Whether Data Sources is deprecated or not, as you can see it is not supported for most projects (I think it's just for Windows projects - but I may be wrong). Anyway - you don't need it. And by the way - this approach works regardless of the database you use (LocalDB, SQL Express or regular SQL Server)

Simple querying a database using apps for office?

I am trying to begin writing my first app for office.
What I would like to do is simple. I have a database of IDs for my customers. When I hover over one of these IDs, I'd like the app to query a database and display the customers info on the right hand side of the app.
This should be a pretty simple thing to do using apps for office, but I can find no guidelines or help on their web page.
Can anyone provide some simple sample code for doing this?
Thanks very much.
I can say that I spent some time going through this tutorial trying to get a solution for this question. I have a few suggestions about how you will need to proceed in writing your Office App.
I would not advise having the data populate when you hover over an ID field in Excel/etc. You will be hitting your database too many times. I would have set it up, that the user with select a cell with the ID in it and then in your app panel, there will be a button click or event that will make a call to the SQL Server to return the data.
You will need some sort of a web API that you can use to retrieve the data from your SQL Server. The event will pass in your ID that the user selects and then the web API will return the customer details to be populated in your app panel.
Setting up the App Panel seems pretty straight forward in the tutorials on the MSDN site. You can set it up using HTML and CSS to design the page.
I think the biggest thing that you will have to do is set up the API to access the data.
I think these official Microsoft examples will help you a lot.
Example 1 (Bit complex)
http://msdn.microsoft.com/en-us/library/fp142290(v=office.15).aspx
Example 2 (Looks Easy)
http://msdn.microsoft.com/en-us/library/fp142161(v=office.15).aspx
Example 3 (With using Visual Studio)
http://msdn.microsoft.com/en-us/library/fp179835(v=office.15).aspx
Happy Coding...

IE addon in C# able to communicate with mysql

I have a simple question. Is there a possibility to make an add-on for IE, in C# that can connect to a MySQL database? Basically what I need is to gather some text from a page and insert it into a database via a context menu command.
I just need to know if this is possible, and maybe if you can point me some libraries or frameworks that will help me.
Thank you very much!
If you want to build an IE addon I recommend you to take a look at: http://www.add-in-express.com/programming-internet-explorer/index.php.
You can connect to the mysql db like you would from any .NET application.

Need help in application update

I am developing an application in SQL Server using C#.
My database version is SQL Server 2005 Express edition, and .Net framework 2.0.
I want to make an updatable application.
e.g. whenever I do some changes in my application, then it should be available to update in all locations (like update in Mozilla Firefox).
But I also want that if I change some columns/stored procedures of the database, then those changes should be also updatable.
Please guide me how can I make that kind of setup.
Do you have any server or network share where you can distribute your application from?
If so, then you should take a look at ClickOnce which is available in any version of visual studio. it will automatically update the client each time you publish a new version. http://msdn.microsoft.com/en-us/library/t71a733d%28v=vs.80%29.aspx
As for the SQL updates, I'm not sure what you're asking for? if you use one database for many clients, then the only thing you will have to update is the client code which works with the database. in which case you will do the same thing as with any client update.
If you're having multiple instances of the database, you'll have to update each of them manually. You'll really want to keep track of each change you've made or use a comparsion tool for that. I'm using Red Gate SQL Compare, but I assume that there are also free tools.
First you need to decide on a setup tool which will create an EXE or MSI installer for your application. Perhaps this list will help: http://en.wikipedia.org/wiki/List_of_installation_software
After that, you can integrate an updater application into that installer. Here is a post with more details: What is the best way to auto update a windows application?
An installer takes care of the distribution and the updater takes care of your application updates.

C# code for Grid to FoxPro DBF (free table)

What is the easiest way (without installing extra drivers) to open a FoxPro DBF table and link it to a DataGrid in WPF?
I guess this as nothing do do specificaly with WPF. You can link almost any .net collection/data collector object to WPF data grid.
But your problem stands way before that and concerns .net data access in general. You should remove the WPF tag from your question and rather see what ADO. net can do for you.
Once this is done and that you have the content of your FoxPro db in a .net collection, then you will worry about WPF ;)
i don't think this is possible without driver installation. see this question.
There are ways to do it without installing new drivers but none if them are easy.
You could inspect the table at the file level - the structure is documented here: http://fox.wikis.com/wc.dll?Wiki~TableFileStructure
Or you could write a VFP exe that you can run from your C# code that dumps the table to XML. See the CURSORTOXML function for more details.
Written on my iPhone.
Do you know how to use basic ADO.Net to connect to a FoxPro DBF table and create a Typed DataSet? That's the first step you've got to get working. From there, the task becomes binding a WPF DataGrid to a Typed DataSet.

Categories

Resources