Page 1 of 1

X-question about sqlserver!

Posted: Fri 06 Nov 2020 04:28
by khanh
Hi, I'm creating my custom add-in with help from dotconnect sqlserver
I finished it but I want to ask if it could be even faster!
I have several tables that need to be queried in turn. (numbers of rows , columns and column data type are specified) so I only need to create a single table in specify datatbase .mdf file.
My steps are as follows:
step1: convert my table to datatable
step2: using devart.sqlscript to create table in .mdf file
step3: using devart.bulkcopy to add datatable
my question is:
1. Is there any faster method?
+, Can the above steps be more concise? (Is it possible to record quickly by skipping step 1 and write directly to step 3?)
+, Is there any devart tool (here I just know devartconnect) can do it better?
+, I just need to move the table to some database and query this table and want the fastest execution speed!
Is it best to use the .mdf file? What kind of database file should I choose?
If I use .dot connect, what tips and tricks do I have to speed up the fastest queries?
Thanks so much!

Re: X-question about sqlserver!

Posted: Fri 06 Nov 2020 10:26
by Shalex
Please create a table with Devart.Data.SqlServer.SqlScript and load data with Devart.Data.SqlServer.SqlBulkCopy.

There is no description of SqlBulkCopy at https://www.devart.com/dotconnect/sqlserver/docs/ at the moment. We will add it. Actually, Devart.Data.SqlServer.SqlBulkCopy is a wrapper of System.Data.SqlClient.SqlBulkCopy. As a temporary workaround, refer to https://docs.microsoft.com/en-us/dotnet ... mework-4.8. A sample is here: viewtopic.php?t=39152.

Re: X-question about sqlserver!

Posted: Fri 06 Nov 2020 10:39
by khanh
Hi shalex,
I will try to change some settings.
Thanks for the confirmation!