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
Related
I need to create a background app like a 'job' that runs everyday in a specific directory. This job have to pick up a bunch of PDF forms that have been filled (all those forms are purchase orders) and extract then insert those data into a purchase orders Microsoft SQL database.
I know that Excel as a pretty good import feature for this situation but I need it to be automatic and more like a "Service" which really runs in background.
I've been looking for ideas on how to approach the problem and I did not find much so, if you guys have any ideas I would love to hear about them.
Edit : I think a good solution would be a powershell script which does it all, loop, import, insert.
Thank you in advance.
You can use a C# Console Application for that. Write a console app that extracts data from Excel/PDF then writes it directly to MsSQL database. Then trigger it with Scheduled Tasks on windows.
I'm trying to export Revit data to an external database. What I'm looking for is to use RevitAPI to do the job of exporting. Though if there is a way to do so using Revit's own tools it'll be fine. As long as I can choose and modify the columns in exported tables.
Does anybody have any suggestions?
I've already tried "Revit > Export > ODBC", but this option only exports some default parameters and I can not modify the columns I want in my tables.
I'm also aware of Revit DB Link. It is for subscribed users only so that's not an option here.
You can implement an Revit add-in to access the data you require from the Revit database and manipulate that into the form you require for export. For the actual connection to the external SQL database, you will have to use some additional library. For that, I would suggest searching the Internet for something like sql server .net api.
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'm playing around with vspackages. For now I'm asking how I can implement some kind of a data storage.
Is there a visual studio internal database or somthing which commonly does this?
I just need it to store some data not much but enough for using very simple small database. Maybe a xml file as storage is a posibility ?
Aside from XML which I believe would be a good choice, you can store some data, such as string values and images, in the Properties section of your Visual Studio project.
Double click on Properties from the Solution Explorer and go to the Resources tab. You can then store data in your Resources file (or you'll be given the option to create one first if it does not exist already)
What is the easiest way (without installing extra drivers) to open a FoxPro DBF table and link it to a DataGrid in WPF?
I guess this as nothing do do specificaly with WPF. You can link almost any .net collection/data collector object to WPF data grid.
But your problem stands way before that and concerns .net data access in general. You should remove the WPF tag from your question and rather see what ADO. net can do for you.
Once this is done and that you have the content of your FoxPro db in a .net collection, then you will worry about WPF ;)
i don't think this is possible without driver installation. see this question.
There are ways to do it without installing new drivers but none if them are easy.
You could inspect the table at the file level - the structure is documented here: http://fox.wikis.com/wc.dll?Wiki~TableFileStructure
Or you could write a VFP exe that you can run from your C# code that dumps the table to XML. See the CURSORTOXML function for more details.
Written on my iPhone.
Do you know how to use basic ADO.Net to connect to a FoxPro DBF table and create a Typed DataSet? That's the first step you've got to get working. From there, the task becomes binding a WPF DataGrid to a Typed DataSet.