StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


12»»

Auditor - Error - ConvertValueToBinaryExpand / Collapse
Author
Message
Posted 02/06/2010 2:52:35 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 08/30/2010 10:31:17 AM
Posts: 158, Visits: 521
Hello...

Field 'logradouro' is a 'int' datatype.

Link image: http://www.licitec.com.br/download/ErroSF2.jpg

 

Rogério Mauri


http://blog.licitec.com.br
Post #25817
Posted 02/07/2010 9:10:13 AM


Strategic Support Team Member

Strategic Support Team Member

Group: StrataFrame Users
Last Login: Today @ 8:26:56 AM
Posts: 1,180, Visits: 13,405
Hi Rogério!

You are adding auditing programatically, right?

Have a look at this post and check the data type you are passing:

http://forum.strataframe.net/FindPost16202.aspx

Abraços.

Post #25822
Posted 02/07/2010 5:46:55 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 08/30/2010 10:31:17 AM
Posts: 158, Visits: 521
Hi Ivan...

I am using the configurations standards. Without programming code.

a) On InitApplication void:

private static void InitApplication(InitializingApplicationEventArgs e)
{
...
SecurityBasics.AllowAuditDataChanges = true;
...
}


b) On BO Properties:

AuditDataChanges = true

c) On User Properties (Security):

[x] Sempre auditar eventos de dados para este usuário.

If the user modifies only values of the 'string' fields, the event is registered correctly. (SFSAuditDataActions and SFSAuditDataFields tables).

Abraços...


Rogério Mauri
http://blog.licitec.com.br
Post #25829
Posted 02/08/2010 7:24:44 AM


Strategic Support Team Member

Strategic Support Team Member

Group: StrataFrame Users
Last Login: Today @ 8:26:56 AM
Posts: 1,180, Visits: 13,405
Hi Rogério.

I think you would be better off using the Auditing programatically.

I do it this way, dealing with most of it on my BaseBO. Follow this post and get the idea of where to put it:

http://forum.strataframe.net/FindPost12173.aspx

You coud do the same before saving a record, when creating a new one and so on. This way, you can make sure you are passing the right data type.

Boa segunda-feira para você!

Post #25833
Posted 02/08/2010 4:05:41 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 08/30/2010 10:31:17 AM
Posts: 158, Visits: 521
Ok...

But what the staff of the developmente says?

Rogério Mauri


http://blog.licitec.com.br
Post #25840
Posted 02/08/2010 9:07:44 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/31/2010 2:36:53 PM
Posts: 6,287, Visits: 6,191
We haven't chimed in because we have been watching and Ivan's questions have been very good.  What answer are you looking for here?
Post #25846
Posted 02/09/2010 11:03:21 AM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 08/30/2010 10:31:17 AM
Posts: 158, Visits: 521
Hi Trent...

Help me, please.

I would like to use the 'Auditor' without code.

This is possible?

Rogério Mauri


http://blog.licitec.com.br
Post #25864
Posted 02/09/2010 1:57:07 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/31/2010 2:36:53 PM
Posts: 6,287, Visits: 6,191
Not in a widespread area. The reason we provided this class is so that you, the developer, could customize it to your needs. This control and logic will continue to grow, but for now, Ivan's suggestions are really the best to go with.
Post #25873
Posted 02/12/2010 7:39:59 AM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 08/30/2010 10:31:17 AM
Posts: 158, Visits: 521
Ivan... Help me please in the translation.

Econtrei a causa do erro na classe Auditor. Para isso, reconstrui a classe em C# a partir do código fonte que está no projeto "MicroFour.StrataFrame.Base.Security".

Após, identifiquei que o problema, na verdade, está no método "MicroFour.StrataFrame.Data.DataBasics.ConvertTypeToDbType(Type TypeToMap)" da classe "DataBasics" (Namespace Data).

Observe a imagem no link: http://www.licitec.com.br/download/erroSF3.jpg

Passando um "System.Int32" para ConvertTypeToDbType() o retorno está sendo um "AnsiString" e é exatamente isso que provoca o erro no método de conversão de tipos da classe Auditor (método ConverValueToBinary). Ou seja, o problema não é a classe Auditor com erro, mas sim o método de conversão de tipos que está em DataBasics.

Você poderia fazer esses testes?

Aguardo um retorno.

Rogério Mauri


http://blog.licitec.com.br
Post #25956
Posted 02/12/2010 9:16:12 AM


Strategic Support Team Member

Strategic Support Team Member

Group: StrataFrame Users
Last Login: Today @ 8:26:56 AM
Posts: 1,180, Visits: 13,405
Oi Rogério.

Vou passar isto para o pessoal, não sei se estarão dando ênfase ao Auditing neste momento, por isto te sugeri que trabalhasse com a auditoria inserindo código no seu BO base. Neste instante, acredito ser o melhor caminho para todos nós. Eu tenho feito desta maneira. Eles têm feito desta maneira na aplicação médica deles. Mas vou passar adiante o seu post.

Abraços.

Post #25958
« Prev Topic | Next Topic »

12»»

Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Trent L. Taylor, Steve L. Taylor, Dustin Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:36am

Powered by InstantForum.NET v4.1.4 © 2010
Execution: 0.156. 9 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.