I have a project with three other colleagues, that consists of basic forms (with pictures stored in it) who should be customizable.
The app is developped in c#, the problem is that it musts have to work in offline mode sometime. All the data were supposed to be stored in BSON documents until a connexion is disponible, but we recently learnt that there should be pictures in the form, and so we have to use gridFS and that is much more complicated.
I would like to know what you would do?
I thought of installing a mongo on the client et replicate on the server, but I think that would be problematic if there are more than one client, or serializing the picture in only one file, or even find a system like SQLite if it exists for mongoDB.
All ideas are welcome !
Related
I have a problem with a data migration. I will try to give all the information to help me solve this situation. A little of history:
In 2005 an internal website was developed to help manage its business. Due to the latency and change of business rules a developer was hired in 2019 to put "order in the house" (me). When I got the website I was not given the source code, without thinking twice I performed a platform from scratch in C#. All right here, everything was a success. The problem then arose in data migration.
The most important thing to keep, was the files (pdf, .xsd, etc). I then picked up the data from SQL Server 2005 (old website) to SQL Server 2017 (new website).
The content of the files on the old website was in the data type of 'IMAGE' and after research I found it better to put in the new website as 'VARBINARY'.
With the data all migrated, on the new website when I have downloaded the file I get the following error message:
Adobe Acrobat Reader could not open 'file_name' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)
I do not know if it helps but for example, if I insert a file normally on the website its download works correctly. The field is that it behaves differently (the first was the one inserted by the website and the others came from the migration).
This is a print screen of database:
http://prntscr.com/mwilex
Does anyone know why the error? Has anyone ever come across a similar situation?
Bst: I run a query [SELECT SERVERPROPERTY('Collation')] and the output of the two Databases are the same, 'SQL_Latin1_General_CP1_CI_AS'
I'm working on an app using Unity. This app is supposed to upload certain simple information at specific points, which is why my original plan was to just connect it to a Mysql database. Unfortunately Unity doesn't support the NET 4.0 framework and nothing I've tried seems to work.
Yes I could use PHP scripts hosted on my web server to add and pull information, but I'd rather do it all from the app itself if at all possible.
The data I need to record is pretty simple, IDs, ints, strings, nothing too complex.
So I'm now trying to look into alternatives to Mysql.
JSON
So far I have gotten SFTP to work (By using the Renci.SshNet library) and the app is now uploading files in my server's home directory. So my original idea was to just create JSON files with the data and edit them remotely.
Is this something that could be done with C#? How? Any specific resources?
The alternative to remote editing would be to download the JSON file, edit it locally, and then upload it again, but that doesn't sound like a very smart idea.
I have found this answer but it's unclear to me if it requires to send the whole JSON file to the server after every edit or if it's possible to just edit it from the app. Some clarification would be great.
SQLlite
I've also looked into SQLlite but I'm also unsure if it could be remotely edited.
I've Googled it multiple times but can't really find any useful information.
What are my options at this point? What should I use if I needed the equivalent of a Mysql Database that can be remotely edited and read?
You can start seeing into Google Firebase project
https://firebase.google.com/docs/database/unity/start
But unity 2018.3 does support Net 4:
https://learn.microsoft.com/en-us/visualstudio/cross-platform/unity-scripting-upgrade?view=vs-2017
https://blogs.unity3d.com/es/2018/07/11/scripting-runtime-improvements-in-unity-2018-2/
https://blogs.unity3d.com/es/2018/03/28/updated-scripting-runtime-in-unity-2018-1-what-does-the-future-hold/
I'm busy writing a small app and I only want a database to load small amounts of data, in other words I don't need the functionality of SQL.
So I've installed filehelpers, but it seems very limited in the sense that I can read/write and even append data, but it seem impossible to delete one row of data in a table?
Does anyone know how to do this with filehelpers or point me to a different solution where I can just add a local db to my app without any other external software required?
PS. My visual studio does not have the "create local db" from the item selection.
For something like this, I'd use an embedded SQLite database. It gives you the best of both worlds, one file database for local data and most of the features of SQL.
See here: https://sqlite.org/
On their download page, they have lots of stuff and a plugin for VS:
https://sqlite.org/download.html
I have about 5000 csv file and I want to insert them in a sql server 2008 database.
I don't whether windows application or web application is better.
each csv file is simple a one row with 36 column that will be inserted in an one table in the database.
thanks for your help.
Update 1
This application will be used on a computer that can connect to the database, it is used by the admin just once, in order words, there are people who responsible to write these csv files, then all the files, come to me and I have to insert them in the database
Update 2
Thanks for the user who are trying to help me.
You gave me these options:
bcp
SqlBulkCopy
Windows service
what is the best please? I told you all the requirements, which are very simple.
Depends how you want to use it - if you want to deploy to lots of people so they can upload a file and process it into a database, make it web.
If on the other hand, you only have a couple of users which you can easily deploy an app to, there is a lot less infrastructure required to write it as an app.
Sounds to me, you want to automate the mass loading of lots of files, so windows app is jumping out at me.
All depends on what the overall requirements are.
Based on your edit, write a win app that uses a folder enumeration, reads the records and passes to a SqlBulkCopy object.
based on your comment I would take an aproach like that:
Easy to use gui solution:
1. Make a website for people that are making the csv's
That website would preform and check's that are necesery and display any errors. Error checking is done by the Web service (more future proven imo).
Create a webservice importing the file to database and sending you an email. That way you don't have any work with putting the data into the database
Implement an aproveal mechanism so you need to aprove the new inputs to the database if needed
Easy to implement solution:
Create an application (Console/WinForm/Web) that uses the bcp tool to import the data and handles errors
I have just started programming and have made a few small applications in C and C#. My understanding is that programming for the web and things related to the web is a very easy task nowadays.
Please note this is for personnel learning, not for rent a coder or any money making.
An application which can run on any Windows platform (even Windows 98).
The application should start automatically at a scheduled time and do the following.
Connect to a site which displays stock prices summary (high low current open).
Capture the data (excluding the other things in the site.)
And save it to disk (an SQL database)
Please note:-
The Internet connection is assumed to be there always.
I do not want to know how to make a database schema or a database.
The stock exchange has no law prohibiting the use of the data provided on its site, but I do not want to mention the name in case I am wrong, but it's for personal private use only.
The data of summary of pricing is arranged in a table such that when copied pasted to MS Excel it automatically forms a table.
What are some steps, guidance, examples and libraries for achieving this task?
You can use the HTML Agility Pack to parse web pages.