I want to use code similar to the following code to fetch thousands of values from my database
with a SQL statement per value. I don't want to use a Transact Rollback Query but would rather open
the connection once then if one of the SQL statements fails just ignore that and move onto the next.
How would I achieve that? Thanks.
Dim connection As New SqlConnection(oConnectionString)
Dim cmd As New SqlCommand(sSQL, connection)
cmd.CommandTimeout = oTimeOut
Get_Primary_Key = cmd.ExecuteScalar().ToString