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 last month.
Improve this question
My program is a desktop program made by .net7.
The program is running offline and the end-user is a factory, not all the factories have a network or are willing to pay for a network. We can't change this.
The program is used to verify whether the card has been used. The program reads the id (the id is something like Media Access Control Address that is unique) of the card, searches from the database and returns a result.
The data should not be stored in the card self for most people can clone a new card easily (but they can't clone the id).
As we know, we can store the data by database of file by encryption. However, someone can clear all the records by replacing a blank new database/setting or delete it directly.
The only idea for me is to save the data inside the program but not outside it.
Whereas, how can I achieve this? Or is there a better solution? Thank you.
In NTFS (Windows), you can use the alternate stream of the file. Although, technically, the user will still be able to delete it.
See this answer for details on how to do that with .
Related
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 5 years ago.
Improve this question
There is an array in my program that navigates inputs in database, where to store them.
Problem would be if someone turns that program off or turns the PC off and on again, that array wouldn't be saved, and I really need it saved so it can be used again when program turns back on.
Is there any way to store array inside of application so my data is consistant?
Like Others Told You .. Your App Gonna Lose All The Value Of Variables on Restart ... So u Need To Store Your Data Some Where Before Closing You Application ... If Case Of a Big Amount Of Complex Data We Use Some Sort Of a Database , But In Your case If U Want To Save Small Amount Of Data U Can Create a Small File To Contain Your Data .. Whither it's a Csv or XML or even normal text File , You Can Also Encrypt The Date Before Saving If Necessary
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'm building a C# application and would like to sell it for an audience. I would like to upload a database file into a website I own and give serial numbers to be verified first with this database file, once the database store the given serial and the first registered PC then it blocks this serial for other users.
Can anybody guide me on how to make such step during installation time? how I can connect to a remote database on a website to read and write?
Thank you for your time, really appreciate it.
If i understand you, this is what your looking for.
Using that you should be able to check a serial against the database.
One way to block the serials for repeated use is to couple a boolean "used" with a serial on each row. Then you can check both if the serial is found in the database, and if the boolean value is false.
Make sure to keep the input safe to prevent SQL injection.
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'm currently working on a windows form application in C# and was wondering how to preserve data between executions? My application starts with a blank form that has a button that dynamically creates user controls, each one just containing a text box (picture a to-do list). The user has the ability to write into these text boxes, as well as dynamically delete them as well.
I've got the application all built and I can create number of objects, but I was wondering how I could save the data between closing and re-opening it. This is in VS 2015.
Much appreciated!
Essentially, you've got two options.
Store to file.
Store to DB.
Depending on your circumstances, privileges etc. you might want to call a web service and feed the state information to it. Then, upon re-launch, you just get read back from it.
Or, if that's a good option, you can simply store a local file with the information and then read from it. The exchangeability of data will suffer and you may face issues with access rights, though.
If the amount information that you need to store is fairly limited, you might simply write a few keys to the registry. The info will still be local and access needs to be granted but except for that, you'd be compartmentilize the data rather well.
In this case I would suggest making a list of your textboxes and then serializing their values and then saving into some format, let's say xml. It is possible to serialize whole list and then load it with simple code.
Edit: Maarten had a good point, I forgot about that you cannot serialize the whole component. I am assuming you are adding textboxes dynamically, so you already have some list/array of values.
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
When you send an application to someone, using another computer, besides the application itself, do I have to send the Resources File too? And if I am using a DataBase do I have to send the Database.mdf file too? And what else would you have to send to make sure your application works on another computers?
Sorry if this question is a repeated one, but most of the others just ask for a single item, either the Resources or something else. But I would like to know about everything you have to send.
Thanks a lot !
it depends on your approach. i think you have a software with database and... that you want to sell and make it owrk on other users device. you can make you app make a new database on first start. you can include database files if its local and add to user app directory and... it all depends on you packaging method and tool.
or maybe you want let someone continue the project. so you can give other developer a back up .bak format or export database files from sql server management studio and other developer can attach them to the other machine project
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 planning to design a website which displays the live scores of matches(NBA, AFL) etc. I would like to get scores, store them in my database and then display in my website. How can I accomplish this. Thanks in advance.
Thanks,
Sandeep.
Well first you need to decide how you're going to get the data. Is there a webservice that you can query? A document/webpage you can parse to get the information? Are you going to write a speech recognition device to interpret results from the radio or will you type it in by hand.
Then you need to get your database up and running, and whatever is reading your data (maybe it could be a windows service) can write the data into the database. Something like SQLExpress is quite good to try out.
Once you've got that you'll need to decide on your technology, ASP.NET or Silverlight are some good examples. You'll want to create some controls and then databind to the results from your database, which you could obtain using SQL expressions.