0
I have a small desktop application (Windows Forms - .NET 2.0 - C#) in which I just use it to perform a check on a given time-to-time path and in case this check finds a file. txt in this path, an import of this file is performed.
But this file has a column with a specific ID and what I do today, is row by row check if this ID exists in the database. If yes, ignore it, if you don’t mind.
What I would like to have a help with is there any way I can do this in batch? Without a "loop" line-to-line. Something that I sent to the bank this list of Ids and he performed an "IN" and returned me which were not found, and then yes perform the insertion (Bulk Insert).
You can add the verification code snippet of the id you currently use ?
– stringnome
You can use a stored Procedure with a table parameter, thus sending a datatable with the ids and making the logic within the stored Precedent. Add the relevant code snippets to the question that we can help you best.
– Marciano.Andrade
@stringName to which end? ^~
– Antônio Filho
@Marciano.Andrade I did exactly that when I published the post here and it was sensational! Thanks!
– Antônio Filho