From: Glenn T. H. <gl...@ve...> - 2013-03-04 08:59:59
|
Hi! I'm noticing some strange behaviour with the Firebird server when I try to run a SQL script file using the FbBatchExecution command. In the log file I notice a couple of lines like this: GTHVIDSTEN (Server) Fri Mar 01 10:22:19 2013 Shutting down the server with 2 active connection(s) to 2 database(s), 0 active service(s) Followed by a message in the event log about the command gfix.exe giving an access violation. I'm guessing this is because the server has shut down and gfix.exe no longer being able to find the server and giving what is similar to a NullReferenceException. I have tried to run the script line by line in Database Workbench and there doesn't seem to be anything wrong with the script file itself. So why is this happening? Does this mean that some of the lines in the script are ignored? This is the code I use to run the script: using (FbConnection conn = new FbConnection(myConnectionString)) { conn.Open(); FbScript script = new FbScript(myScriptFileLocation); script.Parse(); FbBatchExecution fbe = new FbBatchExecution(conn); foreach (string cmd in script.Results) fbe.SqlStatements.Add(cmd); fbe.Execute(true); } I hope you'll be able to help me with this. Sincerely Glenn Thomas Hvidsten **************************************************************************** Denne epost har blitt kontrollert for virus av Comendo Norge AS This e-mail has been scanned for viruses by http://www.comendo.no **************************************************************************** |