How does one pull data from SQL Server and insert that same data into ctreeACE? (in real time)

157 views Asked by At

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!

1

There are 1 answers

1
Kelly On

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.