0

Okay so I am writing a C# script that pulls data from an SQL Server and then within that same script inserts the pulled data into the already made table for the pulled data to go into. I would like bounce some ideas to see if anyone would also help me think about ways of doing this.

  • Step 1: Create a connection to ctreeACE database
  • Step 2: Insert retrieved data into correct table columns <- this is where I am stuck

So some of my ideas are:

  • Store the live data being pulled into a list then read the list into the ctree table
  • Create a for loop that obtains that live data being fed through and inserts into the table as it pulls data out row by row

I would love some feedback for my thinking so far!

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 1
    Normally you should avoid doing row by agonizing row stuff at all costs...but you are migrating your data to a no-sql data store. I doubt c-treeace has the ability to insert a dataset or something like that. I would say pull the data into a datatable and parse it RBAR (row by agonizing row). – Sean Lange Jul 23 '18 at 19:36
  • @SeanLange I agree I wish Ctree had some way to import bulk datasets but that's the only way I think it will work but I think that could work – Bartholomew Allen Jul 23 '18 at 19:43

1 Answers1

0

Is this something constantly running to keep it updated or something that runs like 1 time per day?

If it runs all the time then depending on the speed you want I would buffer into a queue and flush the queue on a timer.

If it runs only once a day or something then yes, grab the data into a list and insert. Not sure if Ctree supports it, but some platforms have bulk insert, or also an insert statement where you can declare the "values" side of it more than once to get 100+ entries in at the same time.

Kelly
  • 6,992
  • 12
  • 59
  • 76
  • Yes this is a script that pulls data once a day but thank you that was my original thought. Thank you for your feedback, luckily I am sure I have a work around for inserting bulk data into c-tree – Bartholomew Allen Jul 24 '18 at 11:51