How to record and store data when using team foundation explorer? [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am working on a C# windows forms project with a friend and we are using TFS for our source control. The program we have written scrapes data off a couple of webpages at regular time intervals and this is updated to the UI.
However, we would like to be able to store this data for future reference. We will be gathering around 1000 bits of data every few seconds for several hours a day.
I'm relatively new to programming and know very little about databases and couldn't find anything on the internet about how to use them with team foundation server. What's the best way to store this data so it is accessible to both me and my colleague?
So far, we've used local XML files but as I say we need somewhere to centrally store the data.
Sorry if there's any information you need that I've missed off - this is the first question I've asked on a forum - but let me know and I'll provide any info I can.
I look forward to your help,

There is nothing specific about TFS that would keep you from using databases.
If you have installed Visual Studio as your IDE to work with TFS as your source control you probably have a copy of SQL Server Express installed. I would look into how to utilize that. You may want to look at Linq to SQL or ADO.Net to provide your connectivity to your database from your applcation. You will likely get a great deal more flexibility and performance depending on how much data you are collecting if you keep it there vs files.
ADO.Net Tutorial
Linq to SQL Tutorials
Entity Framework

Create a .txt file and every time the service runs append a new line to the text file.
How to add new line into txt file

Related

how can I save and load information in a desktop inventory application C#? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Im developing this desktop app for study reasons
but im using SQL Server for database management so reading around the web i find some articles on this and why it is bad practice, i cannot move my entire project to another PC without installing SQL Server. then i find this:
Save and load inventory
So i don't know what method of saving and loading information I need for this project, I think in SQL Lite or maybe I can use a simple file to save all the information like the mentioned post.
Im using a DB with relationships and i dont know if i can made it with a data persistence file. What should I do? what is the best practice?
PD: Sorry for my bad english
Usually your SQL Server would be hosted on a remote computer when used outside development, but it depends on exactly what your application is supposed to do.
If it's a requirement for you to be able to switch computers, and not host your database on a remote server, I'd say using SQLite is a good choice.
Alternatively, you could have 1 big file that has all your data instead of a relational database, although I wouldn't really recommend it. It's good for quick prototyping of things, but all your data would be denormalized, which can end up being more effort to work with than SQL. This is what the inventory example you linked does.
If you are planing to move your application on different computers and don't want to install any database management system there then SQLite is the best option.
All of your data will be stored in one file and you can freely move your application an other PC without installing any database management system there.
Here is good article explaining that in which scenarios SQLite is good choice.

Save millions of files on windows [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
My system will save ~20-40 million image files
Each file is 150-300KB
My application will run on windows server 2012 R2 and the files will be saved on storage (don't know which one yet)
My application is written in C#
My requirements are:
- The system will constantly delete old files and save new files (around 100K files per day)
- The most recent images will be automatically displayed to users on web and wpf applications
- I need fast access to recent files (last week) for report purposes
What is the best practice for storing / organizing this amount of files?
Broad questions much? If you're asking about how to organize them for efficient access that's a bit harder to answer without knowing the reason you're storing that many files.
Let me explain:
Lets say you're storing a ton of log files. Odds are your users are going to be most interested in the logs from the last week or so. So storing your data on disk in a way that you can easily access the files by day (e.g. yyyy-mm-dd.log) will speed up getting access to a specific day log.
Now instead think of it like a phone book and you're accessing peoples names. Well storing it by the time you inserted that name in the phone book really isn't going to help you get to the result you want quickly. Better come up with a better sorting algorithm.
Essentially look at how your data will be accessed, try to sort it in a logical manner so that you can do a binary search algorithm or better algorithm on it.
I'd highly recommend rewording your question so it is clearer though.

Database approach for an offline C# WPF application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I need to develop a standalone windows application that will work offline. I have decided to implement it using C# and WPF.
However because the application database should be able to run without having to install Sql Server on the client's desktop, am not sure what's the best approach.
The concept is that i will develop the application give the executable to the client, install and run the application without any complexity of connecting database.
So far i am considering to use SQLite.
My question is what's the best solution to connect a database within the application.
SqlLite is the best option to go so as to have both the sql features
and also a offline db.
If the data is very, very simple, and you need
it to be readable by other applications or users (with appropriate
permissions), I would probably choose to store it in an XML file or
even a plain-text file inside the user's Application Data folder,
which would be obtained via Environment.GetFolderPath.
If you want to store files such as images,etc then you should go for
IsolatedStorage.
Use EntityFramework to connect to SQLite, my preference is always to use the code-first database so everythings managed from your C# code, I believe EF can be modified to implement INotifyPropertyChanged on your behalf which will help setting up your bindings in WPF.
XML shouldn't be used for anything except for configuration IMHO, it will soon be deprecated in favour of JSON, I'm sure of it, not that that really affects you.

C# winforms application what's next? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
So a friend has asked to develop a desktop application in order to ease his work, it's not too big or crazy just some simple crud operation and some search tasks here & there.
I have finished the application now it's time to deliver it.
I have never delivered an app before and never really found myself in that situation since I am a total beginner with absolutely no real world experience so am super new to this, but I can handle and deliver what I am asked to do.
Some information about the application:
Developped using C# ( winforms ) on top of .Net ( 4.5 )
SQL Server 2014
Entity Framework 6.
So how do I deliver this to his workstation, I have read in the last days these a lot ( release , deploy , publish ) kinda got confused because the explanations were too vague plus the english that was used was a little bit difficult for me since it's not my native language.
Please let me know what should I be aware of, and I would love to see like step by step how to do this, and how professionals do it.
Thanks in advance and have a nice day to each and every one of you.
For my solution (Windows Form application with a SQL Server Database using EntityFramework), I used ClickOnce to publish it.
How to: Publish a ClickOnce Application using the Publish Wizard
You have to be sure that all the assembly you use in your project (.dll) are installed on the computer like those containing entity framework. You can easily find them on Microsoft website.
If your database is a local database, you have to install sql server express LocalDB on the computer.
And then, you only have to double click on the generated file from clickOnce and it will launch an installer wizard. If it fail, it shows you the error in detail and you can easily fix it.
Finally, you have to validate the connection string in your configuration file to be sure that it is pointing to your database.

Extending application to use on LAN [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am not a very experienced programmer. And I am facing technical issues in database servers.
I have developed a small standalone C# Application which is already in use.
It uses SQLite database. The database usage is not very heavy. Only a few form needs to be read and write to the database.
Now there is a requirement that it should be used on LAN.
I know that SQLite is not a good database option for client/server.
But keeping these points in mind should I change the database or not..
The application is already using SQLite and this is not a project from start.
The database usage is not very heavy. Only a few forms will be filled and data is written on the database.
At most 1-4 Pc's will be using the application simultaneously.
I had tried to install MS SQL server on my customers PC but then I am facing so many technical issues and it is taking a lot of time.
So I am thinking to stick with SQLite only.
Any suggestions will be greatly appreciated.
So is your question "Can I share a SQLite database between multiple workstations", or "How to install SQL Server"?
I'd say go with the last. SQLite even promotes the use of a client-server DMBS if you require multiple processes accessing the same database.
Installing MS SQL server can be pain; you have to ensure .NET framework is installed, windows service pack is installed and MSI has correct version. Still I would prefer going that way, because of robustness and reliability it promotes and rather write some robust installer to "make it happen".
You can of course, keep your current solution and write web service that will lock access to database to one-client & one-query at time only and rewrite your app to use this service instead of accessing db directly.
Btw. - Microsoft SQL Server Compact Edition is working similar to SQLLite (in the terms ease of install), and it allows multiple connection to the same database (.sdf file)
http://technet.microsoft.com/en-us/library/bb380177%28SQL.90%29.aspx

Categories