As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm currently in the planning phase of a project and I came across an interesting question (for me) - how the f* do DataSets work anyway?
I mean, since now I always used simple SQL-Statements written hard in the code, but that doesn't seem so sophisticated to me. So basically I want to start using DataSets but there are no tutorials out there concerning that. I mean, sure I can design them in VS, but how can I access them in my code? I searched a whole day long but couldn't find a single useful tutorial to that...
Is it because DataSets are no good or just because nobody uses them?
I would be very thankful for any information concerning that...
I think you'd be interested in the first few tutorials at Microsoft's ASP.NET Data Access Tutorial page. The tutorials there guide you through creating a simple ASP.NET site that features accessing data in the Northwind database (SQL Server 2005).
It does a decent job creating, configuring and using Typed DataSets.
Datasets are important part of ADO.NET, and works like in-memory objects and widely used. You can store more than 1 table in DataSet, and apply some relationship among them if needed. Also it works both in reading and writing the data while DataReader is only for reading teh data.
You can go for this link for better understanding
http://msdn.microsoft.com/en-us/library/system.data.dataset(VS.71).aspx
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I should write little app, that will work with single table database in single user mode (only one user will be use it). This user only should view data on read only mode. He shouldn't change any data.
Data is going to be updated physically one time in a month by backup and/or copy past.
Which database is good for this? MS Access, ms sql express, ms sqlce? Application is going to be written on C# Windows Forms. And performance is necessary.
I would go for Sqlite: fast, easy with full ACID support.
It's easy: no services, no installation, just a file.
It's scallable: can have multiple tables and complicated relations between them, if it's neccessary for you, but do not have stored-procedures
Maybe an OODB is your answer. they are still faster in reading then anytype of SQL database.
I have used db4o and it's pretty amazing what it can do.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
As the title says, should this technique be used only for test purposes or could it be used in programs that will be used by anyone?
Thanks for any suggestion.
It's good and tested and ready for any kind of testing or deployment or production purposes. Though, I would second the opinion of #Betty of not using the database dropping/recreating functionality. Since a minor glitch in the database might make you lose all your data .
I have used this in my Asp.net project which is currently online for a month or so and it's working charm. Microsoft has pulled amazing thing and you shouldn't worry about. It's a complete project, if anything only advance features will be added and nothing else.
I wouldn't recommend using the database dropping/recreating functionality in production as you lose your data in the process.
However the standard model -> db mapping and querying stuff is all good.
It's a fully featured, tested release, not a CTP or beta. Why wouldn't it be ready to use in a production environment? Whether you want to use it in a production environment is entirely up to you and your team.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
This is my first time when I want to do linq to sql, I am looking for good video right from the beginning how to put that in vs 2010 if anyone has a good source I would appreciate it very much, I searched already but did not find anything good yet
As far as videos, there are a whole slew of them on the official ASP.NET site.
If you're looking for an example of applications that use Linq-to-SQL, you may want to try the Nerddinner application.
This site is pretty good, I use it a lot: http://msdn.microsoft.com/en-us/vcsharp/aa336746
Here's a good blog post from Jesse Liberty + info about a neat LINQ test tool called LINQPad. He's writing a new book on LINQ & reactive extensions for C# 5.
http://jesseliberty.com/2011/07/19/linq-pad-vs-visual-studio-for-learning-linq/
... and here's the tool that is packed with examples that you can run + play with to see results (way faster than attempting to do the same in VS2010)
http://www.linqpad.net/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Would it be a good choice for use within a WCF service written in C#? I'm currently using FirebirdSql, but that's giving me way too many problems. Documentation and support is also horrible.
edit: Sorry, I should have been more specific when asking the question. What I meant was whether or not SQLite is a good choice for an embedded database within C#. MS SQL is out of the question for this one.
SQLite is a great platform for any language, however there are small concerns I've had with it under .NET.
It is natively compiled. This breaks .NET's AnyCPU Implementations of .NET (i.e. you have to explicitly distribute a 32bit & 64bit version of your app, and have some hand-written rules in your .csproj (MSBUILD) file to select the different dependencies based on what you select.
It has some sticky threading issues. You're going to run into trouble if you're trying to use the same DB from multiple places (multiple instances of your app) etc. It's doable, but it basically uses a simplistic form of database/table locking to achieve this, which could be a major concern based on your program.
All In all i really like SQLite, but if I could find one that didn't require a redistributable (*cough*SQL Express*cough*), I would use another embedded DBMS for .NET Apps. To date I havent found one aside from Raven DB but that's a document DB.
Edit: Note, Raven DB Is also only free for open-source applications. It's not suitable for proprietary applications unless you're willing to shell out for a licence, so when looking into it please be sure to factor it into your budget.
SQL Express always works well
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I mainly develop Java EE webapps so I don't have any experiences with desktop application at all. Now a friend of mine needed a little tool for daily business which I've build with Seam and a MySQL db in the background. In case of my experience this was done really fast.
Now I want to go further and produce a real small desktop app for him. I've looked at various options and developing a gtk# application with Mono seems my way to go for this little project. The application should be small and fast so I was thinking if a whole MySQL server is needed for my solution here.
What options I could evaluate instead of a database server which has to run as a service on the workingmachine? Storing data as XML?
To clarify the application has now 6 entites (Products, ProductTypes, Colors, Sizes, Orders, Production). On daily basis orders and production are added to a ProductType, very simple stuff.
XML would work for small sets up data, but if you are going to have larger sets I would recommend something like sqlite.
http://www.sqlite.org/
I have looked at various options and I tend to like SQLite
for client applications on .NET. It is a file based solution that does not require a database server to be installed on the machine, much like using an Access database but better.
Try SQLite
Can be other DB will interest, for example, Db4o or SQL CE 4.