Reputation: 1
I am trying to make a program that process data that comes but send it to a container first before executing the query so the program still could receive data if the previous data has not been sent successfully.
basically
if NewData.Exists() :
ProcessNewDataToContainer()
and then
while Container.isNotEmpty() :
BuildQuery()
ExecuteQuery()
I was also looking for a way to do the query everytime it was called so it would be one straight process like
if NewData.Exists() :
ProcessNewDataToContainer()
BuildQuery()
ExecuteQuery()
but I haven't find the right way to do it since everytime the query is executed, the program is blocked from doing the query while new data is still being sent to the program. so the program doesn't receive all data because the query is blocking it from processing new data
is there any way that I could do to make sure the program would receive all data and process it to database without the program being blocked by the query process?
Upvotes: 0
Views: 31
Reputation: 153
Why not make sure the data is sent by:
Using End Using
that way you control when the connection for the query is disposed/closed
Upvotes: 0