From: Mike S. <mi...@mi...> - 2003-04-11 09:33:14
|
Hi Carlos I'm still finding that your sample code you sent a few days ago gives: FbException: Dynamic SQL Error SQL error code = -501 Attempt to reclose a closed cursor Here is the sample code exactly as I have it. If you have a moment, could you try it and see if it fails for you: File.Delete( @"c:\Temp\New.gdb" ) ; FbConnection.CreateDatabase( "localhost", 3050, @"c:\Temp\New.gdb", "SYSDBA", "masterkey", 3 ) ; FbConnection connection = new FbConnection(connectionString); connection.Open(); FbTransaction transaction = connection.BeginTransaction(); StringBuilder batchCommand = new StringBuilder(); batchCommand.Append("CREATE DOMAIN LOGICO AS SMALLINT DEFAULT 0;"); batchCommand.Append("CREATE DOMAIN NIF AS CHAR(10) DEFAULT '';"); batchCommand.Append("CREATE DOMAIN ID AS INTEGER DEFAULT 0"); FbCommand command = new FbCommand(batchCommand.ToString(), connection, transaction); FbDataReader reader = command.ExecuteReader(); while ( reader.NextResult() ) { } reader.Close(); transaction.Commit(); connection.Close(); Cheers, Mike. |