WPF or Silverlight, XML or SQL or Access, LINQ or not? - sql

I am writing a Windows app and want to make sure I am choosing the right tools. Currently I am leaning towards WPF and XML, please let me know if I've made a good choice.
I have about 3,000 records. Each record has a Product Name and a Price columns.
All my app does is display these records in a DataGrid and allows the user to search for products by name. Meaning, if a user types 'chair' in an edit control, then only the Product Names that contain 'chair' and their prices are displayed in the DataGrid. That's it. Nothing fancy.
Should I use Silverlight instead of WPF? I understand Silverlight allows my app to run on any OS, while WPF requires Windows? Unless I create a WPF for browser project, I think.
Should I use XML or Access or SQL? Which database would make the SEARCH feature easiest, fastest, etc.?
Finally, should/does LINQ have any involvement in this project?
Thanks.

If its going to be a stand alone product i.e. installed a each computer and not networked in any way then personally I would go for a SQLCE database with a WPF client. Its up to you if you use LINQ, I quite like it but would be overkill for this app maybe.
The next stage up is a small app used by a handful of users in a network. In this instance I would use an access backend (assuming a fileserver is in place) with a WPF client application.
Right at the “top” of the scale would be something used by a lot of people and/or something on the web. In this case I would use SQL server as the backend and again a WPF client app or if you want it to run on other platforms then go for silverlight

Related

Make vb.net program accessible for multiple users and computers

Can someone tell me how to make my vb.net program accessible by multiple users from different computers at a time. My program has forms that will take input and save in MySQL. If multiple users from different computers fill forms it should be saved into mysql.
I am using VS 2013.
Please give me an idea about how to make this.
As an idea, you could make two programs , 1 called Server found on your personal PC and the other is called Client on every other user's PC, when client makes a change it calls a function on servers PC using .Net Remoting technology, and the server makes the appropriate changes to the MySQL.
So every change would affect one Database over WAN , and you can add event to each change that will invoke all users to update information.
hope to help :)

Windows 8 Databound App Tutorial

Does anybody know of a good tutorial, preferably with downloadable sample code, for a Windows 8 app that is data oriented?
I am trying to rewrite a fairly simple Windows Forms application, which uses a local SQL Express database, as a Modern UI Windows 8 app, but it seems that Windows 8 apps don't support accessing SQL databases natively. This leaves me wondering what the best way to store the app's data is, and also lost as to how to handle calls to create/edit/delete records, etc.
I've come across the Reversi sample app, which Microsoft claims contains extensive examples of databinding, but actually it all seems to be in an MVVM context, binding visibility of controls, positions of items, etc. I'd like to see an example of a more traditional, simple database application with records that can be browsed, updated, created, deleted, etc. Not least so that I can just see how the data is stored, since an external database apparently isn't an option!
You can use SQLite as database for Windows Store App. There are couple of articles & code sample available.
SQLite samples from MSDN
Using SQLite in Windows 8 Store Apps
WinRT app guide: Step 10: Adding a lightweight database (SQLite) and CRUD support + two-way element binding

Code examples using xcode and updating information in SQL Server 2008 R2

I am trying to make life a little easier for several coworkers and of course ME!. We need to update a database that controls our invoicing function. This database is housed in SQL Server 2008 R2. I need to provide users with a way (based on their function) to enter information affecting the invoice. For example, John has customer interaction and sends them a pdf of a document on Monday. We need to capture that John sent Customer A a pdf on Monday and it was associated with Project 123. Simultaneously, Ann is color correcting a piece for Customer A but on Project 126. I have over 50 people working in various areas who may or may not need to enter information. My hope is to make the application generic enough that the user simply selects from drop downs tied back to the original database.
The majority of the users (80%) use Mac OS. I have donwloaded XCode and I was hoping to use this to create the application that will update the backend database.
I am new to creating this type of application. I have done this with VB and VBA but do not have access to those tools here. So if there is another tact that I should take, I am more than willing to rethink my approach.
Key points are that I need to draw information from and update a SQL 2008 database. Second, I cannot use something like Excel as a front end, since I will have multiple users accessing information simultaneously.
You're unlikely to find many examples of connecting a Mac app directly to SQL Server, because that's a rare combination. Macs, unlike Windows PCs, aren't often used in an enterprise setting, so the software ecosystem to support enterprise development is much weaker.
If you're feeling brave, there are vendors out there that sell ODBC drivers for Mac OS X, some of which connect to SQL Server. So your problem becomes finding Mac ODBC examples, which is IMHO an easier problem. Google "mac os x odbc drivers". I have not tried any of them, so I can't speak to their quality.
This is going to be a lot of work, especially since you're new to the platform. You might want to consider exposing the database as an OData source (the name of the server-side technology is "WCF Data Services"). There are OData client-side librarires for the Mac. Google "mac os x odata". This approach completely bypasses the business of ODBC drivers, at the cost of some server-side development.

access mysql database via Vb.net

Im really confused as to whether what Im trying to achieve is possible and if there are better alternatives to it, so here it is:
Ive created web application for a business, it allows customers to view details etc, and most importantly make reservations.
These reservations are stored into a mysql database which all is provided by my web hosting service.
everything up to here is fine and without problems
The next thing im trying to achieve introduces complications:
So I am trying make a application which will run on only one machine, and its supposed to connect to that database and retrieve all those reservations.This is where Im trying to implement a Visual basic application.
The easiest way would off been to email the business reservation every time its made, however this complicates things for the end user.It would be much easier to have an application that retrieves the data, simply on their desktop or a local drive as oppose to email.
I did research into vb.net and Net Connectors, but then came across the problem of my host not allowing remote connections to the database.
And this where Im stuck at now, I have no idea how to achieve the task
Thanks in advance for any guides or help
If your web host will not allow a remote connection to the database then you wont be able make a WinForms application to sit on the customers desktop - as you've worked out.
The simpliest solution is have a restricted Admin.aspx WebPage in the
website. This webpage would show all the reservations, allow Searching by From
and To Dates and possibly even allow for approval or rejecting bookings. This is a very common approach - I'd also recommend you have a special CSS for mobile phone webbrowsers so that your customers can view the bookings from their phone.

How to connect sql database compact edition on visual studio 2008 with vb.net (smart device)

I'm doing a project with vb.net (smart device) on visual studio 2008 and I need to connect to a database on the device itself (I do not have a physical device to test, only emulation). How should I go about doing it? I would like the database to be in the device on start up.
I've read on the internet that you have to make a reference to System.Data.SqlServerCe but the documents are, in my opinion, vague. So, I'm pretty lost here.
So there are two questions here:
How do I deploy my database so it's there when my app starts?
How do I access that database from my app?
Both are straightforward.
A1. You have a couple options. First, understand that SQLCE databases are a single file, typically with an SDF extension. You can either package it with your app for deployment, so you know it will be there on first run, or your app can check for its existence on startup and crete the file if it's not there. If you need to populate the initial database with data (lookups, etc) then option 1 is probably better. As long as you deploy/crete the database in a persistent storage location (and under WinMo/Pocket PC that's pretty much anywhere), it will always be there when your app starts up.
A2 You are correct that you need to add a reference to System.Data.SqlServerCe, which is again straightforward. Just add a reference in your smart device project:
Once you've done that, you use the SqlServerCe namespace objects to create the database, tables, indexes, etc, insert and query data, and all of that good stuff. Tutorials 2 and 3 on MSDN here are a really good start and they have VB.NET examples. The nice thing is that most desktop examples for VB.NET accessing a SQLCE database will work as-is on the device, and the things that don't work are usually in the presentation of the data, not the actual database access code itself.