I have an application (VB.net) which has two routines that process nonquery SQL command requests.
One routine queues commands up as they come in and the other pulls them out of the queue on a timed basis FIFO style. I essentially just pre-create a SQL command, enqueue it, and then execute it when it gets pulled from the queue.
My question is this: does SqlClient.SqlConnection.CreateCommand require a specific connection string to create a command or can that be left for when the command is actually processed?
Due to the asymmetric nature of the processing of these commands I would prefer only to have to open connections to the database on the executing end. The examples I have seen all show a command being created with a specific connection string and usually an opened connection.
I can provide code snippets but I really just need to find out what is mandatory in order to create a SQL command.