[Firebird-net-provider] [FB-Tracker] Created: (DNET-972) AppendSQLStatements - drop/create index exception in use
AppendSQLStatements - drop/create index exception in use Key: DNET-972 URL: http://tracker.firebirdsql.org/browse/DNET-972 Project: .NET Data provider Issue Type: Bug Components: ADO.NET Provider Environment: - Visual Studio 2019 Community, - Net FrameWork 4.5.2 - FirebirdSql.Data.FirebirdClient 6.4.0 / 7.5.0 Reporter: Marcos R. Weimer Assignee: Jiri Cincura Delete a second index (unique desc) in the PK and create it again (desc). It is not the PK index, it is a secondary index in field. Execute at IBExpert works perfectly. Code: ASQL = " SET TERM ^ ; EXECUTE BLOCK AS BEGIN IF(EXISTS(SELECT 1 FROM RDB$INDICES WHERE UPPER(RDB$INDEX_NAME) = 'PK_PARCEIROS_DESC')) THEN BEGIN EXECUTE STATEMENT 'DROP INDEX PK_PARCEIROS_DESC;'; EXECUTE STATEMENT 'CREATE DESCENDING INDEX PK_PARCEIROS_DESC ON PARCEIROS (PARCEIRO);'; END END^ SET TERM ; ^" FbScript sc = new FbScript(ASql); sc.Parse(); FbBatchExecution fbe = new FbBatchExecution(FConexao); fbe.AppendSqlStatements(sc); fbe.Execute(); Exeption: "An exception was thrown when executing command: -- Author: Thiago Cousseau\r\n-- 2589\r\n-- 24/07/2020\r\n-- Description: Já existe o indice da PK\r\nEXECUTE BLOCK AS\r\nBEGIN\r\nIF(EXISTS(SELECT 1\r\n FROM RDB$INDICES\r\n WHERE UPPER(RDB$INDEX_NAME) = 'PK_PARCEIROS_DESC')) THEN\r\nBEGIN\r\n EXECUTE STATEMENT ('DROP INDEX PK_PARCEIROS_DESC;') WITH AUTONOMOUS TRANSACTION;\r\n EXECUTE STATEMENT ('CREATE DESCENDING INDEX PK_PARCEIROS_DESC ON PARCEIROS (PARCEIRO);') WITH AUTONOMOUS TRANSACTION;\t \r\nEND\r\nEND.\r\nBatch execution aborted.\r\nThe returned message was: unsuccessful metadata update\r\nobject INDEX \"PK_PARCEIROS_DESC\" is in use\r\nAt block line: 11, col: 7." StackTrace: em FirebirdSql.Data.Isql.FbBatchExecution.Execute(Boolean autoCommit) em UltraBanco.Banco.ExecuteScript(String ASql) em C:\Ultra\CSharp\UltraBanco\UltraBanco.cs:linha 576 em UltraAtualizador.Funcoes.AtualizarSistema(DataRow LinhaAtual, Int32 UltimaVersaoBanco, List`1 executaveisBaixar, DataTable excecoes, String nomeArquivoZip, List`1 EMailEquipe, Boolean VerificarConexoesAtivas, Boolean& aAtualizarFirebird) em C:\Ultra\CSharp\UltraAtualizador\Funcoes.cs:linha 586 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
[Firebird-net-provider] [FB-Tracker] Created: (DNET-859) ExecuteScriptFromFile, Execute Block, UnknowStatement
ExecuteScriptFromFile, Execute Block, UnknowStatement - Key: DNET-859 URL: http://tracker.firebirdsql.org/browse/DNET-859 Project: .NET Data provider Issue Type: Bug Components: ADO.NET Provider Affects Versions: 6.4.0.0 Environment: 5.9.1.0 a 6.4.0.0 Reporter: Marcos R. Weimer Assignee: Jiri Cincura on execute: ExecuteScriptFromFile("filescript.sql", false); Error: The type of the SQL statement could not be determined. See also UnknownStatement event. Statement: BEGIN IF ((SELECT COUNT(*) FROM CAIXA_MOVTO WHERE MOVTOCAIXA_ID_ORIGEM = 442 AND DATACAIXA IS NULL ) = 0) THEN DELETAR = TRUE. "filescript.sql" is a file with several sqls (approximately 230 thousand) SQL statement that displays the error: EXECUTE BLOCK AS DECLARE VARIABLE DELETAR BOOLEAN; BEGIN IF ((SELECT COUNT(*) FROM CAIXA_MOVTO WHERE MOVTOCAIXA_ID_ORIGEM = 42483 AND DATACAIXA IS NULL ) = 0) THEN DELETAR = TRUE; ELSE DELETAR = FALSE; IF (DELETAR) THEN DELETE FROM CAIXA_MOVTO WHERE MOVTOCAIXA_ID_ORIGEM = 42483; ELSE UPDATE OR INSERT INTO CAIXA_MOVTO( MOVTOCAIXA_ID, OPERADOR_CAIXA, DATACAIXA, SEQCAIXA, DATA, OPERACAO_CAIXA, HISTORICO, VALOR, TIPO, TIPO_DC, IDNACERTO_PENDENTE, MOVTOCAIXA_CONTRAPARTIDA, MOVTOCAIXA_ESTORNADO, OPERADOR, TOTAL_PAGAMENTOS, TOTAL_RECEBIMENTO, TOTAL_RECEITAS, TOTAL_FATURAS_RECEBIDAS, TOTAL_FATURAS_PAGAS, TOTAL_DESPESAS, TOTAL_CHEQTERC_ENT, TOTAL_CHEQTERC_SAI, TOTAL_CHEQUES_EMITIDOS, TOTAL_DEBITOS_BANCARIOS, TOTAL_CREDITOS_BANCARIOS, TOTAL_RECEBIMENTOS, TOTAL_CARTAO, CODFILIAL, DESCONTO_CHEQUE_ID, LOTE_LIQUIDACAO, LOTE_NUMERARIO, TOTAL_DINHEIRO, TROCO, DESCONTO_DUPL_ID, PDV_NUMERO_CAIXA, PDV_ID_CAIXA_ABERTURA, PDV_NUM_CAIXA, TOTAL_CONTRAVALES_ENT, TOTAL_CONTRAVALES_SAI, MOVTOCAIXA_ID_ORIGEM) VALUES( IIF((SELECT COUNT(*) FROM CAIXA_MOVTO CM WHERE CM.MOVTOCAIXA_ID_ORIGEM = 42483) > 0, (SELECT CM.MOVTOCAIXA_ID FROM CAIXA_MOVTO CM WHERE CM.MOVTOCAIXA_ID_ORIGEM = 42483), GEN_ID(GEN_CAIXA_MOVTO, 1)), 4, '08.11.2018', 401, '08.11.2018', 'TRANSFERÊNCIA', '', 55, 'N', 'D', 'N', 42484, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, NULL, NULL, 57, 0, 0, NULL, '4', 59, NULL, 0, 0, 42483) MATCHING (MOVTOCAIXA_ID); END; -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
[Firebird-net-provider] [FB-Tracker] Created: (DNET-755) System.IndexOutOfRangeException
System.IndexOutOfRangeException --- Key: DNET-755 URL: http://tracker.firebirdsql.org/browse/DNET-755 Project: .NET Data provider Issue Type: Bug Components: ADO.NET Provider Affects Versions: 5.8.1.0 Environment: Framework 4.0 / Firebird 3.0.2.32703 / Visual Studio 2015 Occurs eventually in windows 10 Pro/Enterprise / Windows 7 Enterprise Reporter: Marcos R. Weimer Assignee: Jiri Cincura public void DisparaEvento(string evento) { using (FbCommand q = conexao.CreateCommand()) { q.CommandType = CommandType.Text; q.CommandText = "execute block as begin POST_EVENT '" + evento + "'; end"; q.ExecuteNonQuery(); } } Multiple calls in a row... DisparaEvento("EnviarNF"); DisparaEvento("ReciboNF"); DisparaEvento("CancelarNF"); DisparaEvento("DownloadNF"); DisparaEvento("ConsDestNF"); DisparaEvento("NFSe"); eventually: An unhandled exception of type 'System.IndexOutOfRangeException' occurred in FirebirdSql.Data.FirebirdClient.dll Stack: em FirebirdSql.Data.Common.StatementBase.ProcessStatementTypeInfoBuffer(Byte[] buffer) em FirebirdSql.Data.Client.Managed.Version11.GdsStatement.Prepare(String commandText) em FirebirdSql.Data.FirebirdClient.FbCommand.Prepare(Boolean returnsSet) em FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior behavior, Boolean returnsSet) em FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery() em UltraNFe.EventosFB.DisparaEvento(String evento) na C:\ultra\UltraNFe2\EventosFB.cs:linha 100 em UltraNFe.EventosFB.DispararEventos() na C:\ultra\UltraNFe2\EventosFB.cs:linha 110 em UltraNFe.FPrincipal.btnAutomatico_Click(Object sender, EventArgs e) na C:\ultra\UltraNFe2\Form1.cs:linha 506 em UltraNFe.FPrincipal.Form1_Shown(Object sender, EventArgs e) na C:\ultra\UltraNFe2\Form1.cs:linha 195 em System.Windows.Forms.Form.OnShown(EventArgs e) em System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) em System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) em System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) em System.Windows.Forms.Control.InvokeMarshaledCallbacks() em System.Windows.Forms.Control.WndProc(Message& m) em System.Windows.Forms.Form.WndProc(Message& m) em System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) em System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) em System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) em System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) em System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) em UltraNFe.Program.Main() na C:\ultra\UltraNFe2\Program.cs:linha 64 em System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) em System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) em Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() em System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) em System.Threading.ThreadHelper.ThreadStart() Not ocurred in Firebird 2.5.7.27050 with FirebirdSQL.Data.FirebirdClient 2.7.7.0 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
[Firebird-net-provider] [FB-Tracker] Created: (DNET-746) FbScript Exception
FbScript Exception -- Key: DNET-746 URL: http://tracker.firebirdsql.org/browse/DNET-746 Project: .NET Data provider Issue Type: Bug Components: ADO.NET Provider Affects Versions: 5.8.0.0 Environment: Visual Studio 2015 / target .Net Framework 4.0 Reporter: Marcos R. Weimer Assignee: Jiri Cincura - Read script file and execute: - Multiple lines with comments - null except in execute this specific line: "delete from custo_reposicao_atual; -- deletar tudo pq na 514 teve alteracoes e pode estar errado o custo" Example: ExecuteScript("delete from custo_reposicao_atual; -- deletar tudo pq na 514 teve alteracoes e pode estar errado o custo") public void ExecuteScript(string ASQL) { FbScript sc = new FbScript(ASql); sc.Parse(); ---> exception here FbBatchExecution fbe = new FbBatchExecution(FConexao); fbe.AppendSqlStatements(sc); fbe.Execute(); } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
[Firebird-net-provider] [FB-Tracker] Created: (DNET-395) CREATE OR ALTER TABLE
CREATE OR ALTER TABLE - Key: DNET-395 URL: http://tracker.firebirdsql.org/browse/DNET-395 Project: .NET Data provider Issue Type: Bug Components: ADO.NET Provider Affects Versions: 2.6.5 Reporter: Marcos R. Weimer Assignee: Jiri Cincura include support to CREATE OR ALTER TABLE -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider