Esta nova versão tenho que pagar de novo? Meu projeto agora as vezes dá o erro "Lost MySql connection during query", vi vc postar algo sobre isso uma vez, li a a ajuda mas é em inglês, e o inglês será minha próxima etapa de aprendizado hehehe.
----- Original Message ----- From: "Eduardo Silva dos Santos" <[EMAIL PROTECTED]> To: <delphi-br@yahoogrupos.com.br> Sent: Sunday, May 11, 2008 9:14 PM Subject: Re: [delphi-br] Delphi 2007 Com DBExpress com MYSQL 5 e MyDac Olá Otávio, aproveita e entra na página do cliente e baixa a nova versão, ja ta na *5.20.1.15,* ja fizeram bastante coisa. olha o historico. *5.20.1.15 04-Apr-08* - Added support for Boolean parameters in TMyStoredProc - Fixed access violation on local sorting - Fixed bug with locating records using the LocateEx method and the lxNext option - Fixed bug with executing scripts from files larger than 2GB - Fixed bug with executing queries in DisconnectedMode - Fixed bug with executing prepared stored procedures - Fixed bug with calculating string fields length for queries containing string functions - Fixed bug with the QueryRecCount option queries containing the 'LIMIT' clause - Fixed bug in TMyDump with backup data without tables structure - Fixed bug in TMyDump with backup BLOB fields to hex - Fixed bug with processing Unicode in BLOBs *5.20.1.14 18-Feb-08* - Enhanced local sorting with new options (DefaultSortType option, BIN sort type in IndexFieldNames) - Added support for SQLInsert, SQLUpdate, SQLDelete properties for updating with TDataSetProvider - Improved bookmarks comparison - Improved stability of the TMyEmbConnection component - Added TCustomMyConnectionOptions.OptimizedBigInt property to map LargeInt fields to Integer fields - Added TMyDataSetOptions.BinaryAsString property for processing Binary fields - Fixed bug with corrupting BLOB fields on CancelUpdates method call - Fixed bug with accessing persistent BLOB fields in closed dataset - Fixed bug with including fields from wrong table into update queries - Fixed bug with updating tables whose names contain special symbols like spaces - Fixed bug in TMyDump with backup data in Unicode mode - Fixed bug with fetching BLOB data when using MySQL client library - Fixed bug with memory leak in FetchAll=False mode - Fixed bug with case of table names in demo projects *5.20.0.13 09-Jan-08* - Improved stability of the TMyEmbConnection component - Improved the BreakExec method to break data fetch - Fixed bug in master/detail for shifting columns count in the detail dataset - Fixed several bugs with records location - Bug with TCRBathMove which source dataset works in FetchAll=False fixed - Fixed several bugs with auto-generated update queries - Fixed bug with freezing when executing some stored procedures - Fixed design-time editors for Delphi 8 - Fixed bug with QueryRecCount option for queries with the DISTINCT clause - Fixed bug with determining length for string fields returned by miscellaneous MySQL functions (INET_NTOA, etc.) - Avoided bug of MySQL 5.1 with field length for SHOW CREATE TABLE statement *5.20.0.12 14-Nov-07* - Added support for TVariantField in VirtualTable - Optimized describing of stored procedure parameters - Added ability to upgrade MyDAC without uninstallation of previous MyDAC builds - Now an exception is raised when uaFail is assigned to UpdateAction in OnUpdateRecord event handler - Fixed bug with parsing numbers followed by parameters whose names consist of digits - Fixed bug with second script execution after the first execution failed with an exception - Fixed bug with locating variant values in TVirtualTable - Fixed bug with InsertID in the AfterExecute event - Fixed bug with executing scripts that contain BLOB values - Fixed bug with updating field definitions for queries that assign a variable value - Fixed bug with obtaining InsertId when the Assertions project option is disabled *5.20.0.11 27-Sep-07* - CodeGear RAD Studio 2007 supported - Added the OnProgress event in TMyLoader - Improved color schema of syntax highlighting with SynEdit - Optimized memory utilization when loading XML files by the TVirtualTable.LoadFromFile method - Added an option to include the field list in INSERT queries generated by TMyDump - Now TMyConnection.GetTableNames returns an empty list when Database is not set - Added ability to send the DataSetChange event after dataset open - Fixed bug with using the Filter property for FindFirst and similar methods when Filtered is False - Fixed bug with calling First after changing UpdateRecordTypes in Edit mode - Fixed bug with Disconnected Model and Pooling - Fixed bug with committing updates in CachedUpdates mode - Fixed Assert with TCRBatchMove and BLOB fields - Avoided design-time bug with UniSynEdit - Bug with save/load data to/from XML fixed - Fixed bug with IDE startup failure - Fixed bug with locking records in detail datasets - Fixed bug with parameters and string constants in Unicode mode - Fixed bug with MySQL Developer Tools integration under Windows Vista - Fixed bug with the GetFieldEnum method and MySQL 4.1 - Fixed bug with truncation results for the SHOW CREATE PROCEDURE command - Fixed bug with design-time editor of MyEmbConnection - Avoided MySQL bug with field length returned by the SHOW CREATE PROCEDURE statement 2008/5/11 Otavio <[EMAIL PROTECTED]>: > blz, vou olhar, minha versão é 5.10.0.10 > achei o problema, mas ainda vou tentar achar algo mais, pois dessa forma > acredito que não vou poder ativar o Reconcilieerror para o ClientDataset > da > > tabela de log. > > > ----- Original Message ----- > From: "Eduardo Silva dos Santos" > <[EMAIL PROTECTED]<eduardo.drd%40gmail.com> > > > To: <delphi-br@yahoogrupos.com.br <delphi-br%40yahoogrupos.com.br>> > Sent: Sunday, May 11, 2008 3:12 AM > Subject: Re: [delphi-br] Delphi 2007 Com DBExpress com MYSQL 5 e MyDac > > Olá Otávio, que bom que achou o problema, fico feliz. > > quanto ao MyDAC, qual versão vc ta usando? caso estaja usando a Versão 5, > de > uma olhada no Help sobre o Pooling, melhora e muuito o desempenho, sem > contar em outros recursos como o LocalFailOver e o DisconnectedModel. > > sucesso ae. > > 2008/5/11 Otavio <[EMAIL PROTECTED] <htiuk%40yahoo.com.br>>: > > > Legal a idéia de preparar um projeto para reproduzir o erro, fazendo > > isso, > > notei que ao inserir, alterar e excluir registros, estava tbem populando > > uma > > tabela de log, e era nela que estava dando o "Key Violation". > > Então para a tabela de log usei o CommandText do ClientDataSet. > > Fiz assim : > > Na aplicação servidora: > > // > > TMyConnection <- MyConsulta(TMyQuery) <- dspMyConsulta(TDatasetProvider) > > MyConsulta.Sql := ''; > > <- MyGrupos(TMyQuery) <- > > dspMyGrupos(TDatasetProvider) > > MYgrupos.sql := 'select * from grupos > > where _ativo = 1 order by _grupo limit 200' > > <- MyLOGGrupos(TMyQuery) <- > > dspMyLOGGrupos(TDatasetProvider) > > MyLOGGrupos.Sql := 'select * from > > grupos_log limit 200' > > // > > Na aplicação Cliente: > > // > > TSocketConnection <- cdsMyGrupos(TClientDataSet) <- > > dsMyGrupos(TdataSource) > > cdsMyGrupos.ProviderName := > > dspMyGrupos; > > <- cdsMyConsulta(TClientDataSet) > > cdsMyConsulta.Providername := > > dspMyConsulta; > > // > > no mais, dbGrid, buttons(salvar,incluir excluir etc.. Não é dbnavigator) > e > > dbedits. > > // > > > > procedure TAFGrupos.bSalvarClick(Sender: TObject); > > if cdsMyGrupos.State in [dsInsert] then > > begin > > // > > cdsMyGrupos_data_cad.Value := date; > > cdsMyGrupos_hora_cad.Value := time; > > cdsMyGrupos_user_cad.Value := Vcod_Usuario; > > cdsMyGrupos.ApplyUpdates(0); > > //cdsMyGrupos > > myLOGGruposInserir; > > //inserir log > > cdsMyGrupos.Refresh; > > end; > > if cdsMyGrupos.State in [dsEdit] then > > begin > > // > > cdsMyGrupos_data_alt.Value := date; > > cdsMyGrupos_hora_alt.Value := time; > > cdsMyGrupos_user_alt.Value := Vcod_Usuario; > > cdsMyGrupos.ApplyUpdates(0); > > // > > myLOGGruposAlterar; > > //alterar log > > end; > > HabilitaBotoes; > > end; > > > > procedure TAFGrupos.MyLOGGruposInserir; > > var > > sqlInserir : string; > > begin > > sqlInserir := 'insert into grupos_log' + > > ' (_codigo,_ativo,_data_cad,_hora_cad, _user_cad,_grupo,' + > > '_estado) values (' + > > ':_codigo,' + > > ':_ativo,' + > > ':_data_cad,' + > > ':_hora_cad,' + > > ':_user_cad,' + > > ':_grupo,' + > > ':_estado' + > > ')'; > > with dm do > > begin > > cdsMyConsulta.CommandText := sqlInserir; > > cdsMyConsulta.Params.ParamByName('_codigo').AsInteger := > > cdsMyGrupos_codigo.AsInteger; > > cdsMyConsulta.Params.ParamByName('_ativo').AsInteger := > > cdsMyGrupos_ativo.AsInteger; > > cdsMyConsulta.Params.ParamByName('_data_cad').AsDate := Date; > > cdsMyConsulta.Params.ParamByName('_hora_cad').AsTime := Date; > > cdsMyConsulta.Params.ParamByName('_user_cad').AsInteger := > > cdsMyGrupos_user_cad.AsInteger; > > cdsMyConsulta.Params.ParamByName('_grupo').AsString := > > cdsMyGrupos_grupo.AsString; > > cdsMyConsulta.Params.ParamByName('_estado').AsString := 'inserir'; > > cdsMyConsulta.Execute; > > end;//dm > > end; > > > > procedure TAFGrupos.MyLOGGruposAlterar; > > var > > cod : integer; > > sqlInserir : string; > > begin > > sqlInserir := 'insert into grupos_log' + > > ' (_codigo,_ativo,_data_cad,_hora_cad, _user_cad,_grupo,' + > > '_estado) values (' + > > ':_codigo,' + > > ':_ativo,' + > > ':_data_cad,' + > > ':_hora_cad,' + > > ':_user_cad,' + > > ':_grupo,' + > > ':_estado' + > > ')'; > > with dm do > > begin > > cdsMyConsulta.CommandText := sqlInserir; > > cdsMyConsulta.Params.ParamByName('_codigo').AsInteger := > > cdsMyGrupos_codigo.AsInteger; > > cdsMyConsulta.Params.ParamByName('_ativo').AsInteger := > > cdsMyGrupos_ativo.AsInteger; > > cdsMyConsulta.Params.ParamByName('_data_cad').AsDate := Date; > > cdsMyConsulta.Params.ParamByName('_hora_cad').AsDate := Date; > > cdsMyConsulta.Params.ParamByName('_user_cad').AsInteger := > > cdsMyGrupos_user_cad.AsInteger; > > cdsMyConsulta.Params.ParamByName('_grupo').AsString := > > cdsMyGrupos_grupo.AsString; > > cdsMyConsulta.Params.ParamByName('_estado').AsString := 'alterar'; > > cdsMyConsulta.Execute; > > end;//dm > > end; > > > > Valeu o incentivo. > > > > > > ----- Original Message ----- > > From: "Eduardo Silva dos Santos" > > <[EMAIL PROTECTED] <eduardo.drd%40gmail.com><eduardo.drd%40gmail.com > > > > > > > To: <delphi-br@yahoogrupos.com.br > > <delphi-br%40yahoogrupos.com.br><delphi-br% > 40yahoogrupos.com.br>> > > Sent: Saturday, May 10, 2008 8:10 PM > > Subject: Re: [delphi-br] Delphi 2007 Com DBExpress com MYSQL 5 e MyDac > > > > Provavelmente vc tem um indice único.. prepare um projeto que reproduza > > o > > problema e vamos verificar. > > > > 2008/5/10 Otavio <[EMAIL PROTECTED] <htiuk%40yahoo.com.br> <htiuk% > 40yahoo.com.br>>: > > > > > substitui, e acontece o famoso "Key violation", insere e atualiza, mas > > > exibe > > > a msg de "Key Violation", > > > e não uso campo auto_increment na tabela, apenas índices, sabes me > dizer > > o > > > pq? > > > Obrigadão. > > > > > > ----- Original Message ----- > > > From: "Eduardo Silva dos Santos" > > > <[EMAIL PROTECTED] <eduardo.drd%40gmail.com> <eduardo.drd% > 40gmail.com><eduardo.drd%40gmail.com > > > > > > > > > > To: <delphi-br@yahoogrupos.com.br <delphi-br%40yahoogrupos.com.br> > > > <delphi-br%40yahoogrupos.com.br><delphi-br% > > 40yahoogrupos.com.br>> > > > Sent: Saturday, May 10, 2008 12:17 PM > > > Subject: Re: [delphi-br] Delphi 2007 Com DBExpress com MYSQL 5 e MyDac > > > > > > Funciona perfeitamente, inclusive nos demos do myDac tem um exemplo de > > > DataSnap > > > > > > 2008/5/10 Otavio <[EMAIL PROTECTED] <htiuk%40yahoo.com.br> <htiuk% > 40yahoo.com.br> <htiuk% > > 40yahoo.com.br>>: > > > > > > > Na aplicção servidora TSQLConnection <- TSQLDataset <- > > > > TDataSetProvider > > > > > > > > Na aplicação cliente TSocketConnection <- TClientDataSet > > > > > > > > Se Substituir na Aplicação servidora o TSQLConnection pelo > > TMyConnection > > > e > > > > o TSQLDataSet pelo TMyQuery funciona? > > > > > > > > Versão do MyDac = 5.10.0.10 > > > > Versão do Mysql = 5.0.22 > > > > > > > > [As partes desta mensagem que não continham texto foram removidas] > > > > > > > > > > > > > > > > > > -- > > > ....................................................... > > > Eduardo Silva dos Santos > > > DRD Sistemas. > > > (27) 3218-4201 > > > MSN: [EMAIL PROTECTED] <eduardo.drd%40gmail.com> <eduardo.drd% > 40gmail.com> <eduardo.drd% > > 40gmail.com> > > > Site: http://www.drdsistemas.com.br/ > > > ....................................................... > > > > > > [As partes desta mensagem que não continham texto foram removidas] > > > > > > ------------------------------------ > > > > > > -- > > > <<<<< FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM >>>>> > > > > > > > > > > > > > -- > > ....................................................... > > Eduardo Silva dos Santos > > DRD Sistemas. > > (27) 3218-4201 > > MSN: [EMAIL PROTECTED] <eduardo.drd%40gmail.com> <eduardo.drd% > 40gmail.com> > > Site: http://www.drdsistemas.com.br/ > > ....................................................... > > > > [As partes desta mensagem que não continham texto foram removidas] > > > > ------------------------------------ > > > > -- > > <<<<< FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM >>>>> > > > > > > > > -- > ....................................................... > Eduardo Silva dos Santos > DRD Sistemas. > (27) 3218-4201 > MSN: [EMAIL PROTECTED] <eduardo.drd%40gmail.com> > Site: http://www.drdsistemas.com.br/ > ....................................................... > > [As partes desta mensagem que não continham texto foram removidas] > > ------------------------------------ > > -- > <<<<< FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM >>>>> > > > -- ....................................................... Eduardo Silva dos Santos DRD Sistemas. (27) 3218-4201 MSN: [EMAIL PROTECTED] Site: http://www.drdsistemas.com.br/ ....................................................... [As partes desta mensagem que não continham texto foram removidas] ------------------------------------ -- <<<<< FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM >>>>>