Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karenpayneoregon/sqldatatablelarge-visual-basic
Code sample partitioning a large DataTable for export to csv
https://github.com/karenpayneoregon/sqldatatablelarge-visual-basic
async csv vbnet
Last synced: about 6 hours ago
JSON representation
Code sample partitioning a large DataTable for export to csv
- Host: GitHub
- URL: https://github.com/karenpayneoregon/sqldatatablelarge-visual-basic
- Owner: karenpayneoregon
- Created: 2020-12-17T00:32:14.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-17T01:25:09.000Z (about 4 years ago)
- Last Synced: 2024-11-30T19:24:26.727Z (about 2 months ago)
- Topics: async, csv, vbnet
- Language: Visual Basic .NET
- Homepage:
- Size: 1.73 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# About
Simple no frills code sample to demonstrate exporting large DataTable to a comma delimited text file.
The focus in the code sample is Partitioning DataRows, see notes below.
![screen](assets/A1.png)
### Requires
- To run this code sample **as is** [Microsoft Visual Studio 2019](https://visualstudio.microsoft.com/vs/) is required. If using for instance Visual Studio 2017 simply copy the files into a new Visual Studio solution and build/run.
- Microsoft SQL-Server (at least [Express edition](https://www.microsoft.com/en-us/download/details.aspx?id=55994))
- Plus [Microsoft SQL-Server Management Studio](https://www.microsoft.com/en-us/download/details.aspx?id=55994) (for running the script)
- Run the file script.sql to create the database, table along with populating the table.
- if the build fails run NuGet Restore packages.### Notes
- No assertion performed on data, each DataRow is exported by String.Join on ItemArray of each row.
- Partitioning is done using a language extension.
- Partition is done [asynchronously](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/) with an option to cancel
- File name is hard-coded.