Trying to execute a delete command from .NET with OleDb driver I get an error: File in Use. It seems strange that a similar command appeared to have executed once before. That command is downstream of this one and that worked while the code around this one was not yet debugged and this ExecuteNonQuery was simply bypassed
cmdm.CommandText = "execscript('USE crossRefTable in 0 EXCLUSIVE ' + chr(13) + chr(10) + ' SELECT [crossRefTable]' + chr(13) + chr(10) + ' " +
comndText + "' + chr(13) + chr(10) + ' PACK' )";
Console.WriteLine ( cmdm.CommandText );
cmdm.ExecuteNonQuery ( );
The comndText string is built by a StringBuilder and the resulting overall CommandText (from a Console printout) looks like this:
execscript('USE crossRefTable in 0 EXCLUSIVE ' + chr(13) + chr(10) + ' SELECT [crossRefTable]' + chr(13) + chr(10) + ' DELETE FROM crossRefTable WHERE (pointer_one = [C000149] and pointer_two = [C004116]) ' + chr(13) + chr(10) + ' PACK' )
Any hope for any insight
Thanks.