Unable to cast object of type 'System.DBNull' to type 'System.String'.


Unable to cast object of type 'System.DBNull' to type 'System.String'....
Author
Message
Luiz Carneiro Lima
Luiz Carneiro Lima
StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)
Group: Forum Members
Posts: 25, Visits: 87
Olá,

Configurei o meu projeto no Business Object Mapper mas quando mando executar aparece a mensagem de erro que segue em anexo...

No Custom Wizard eu configurei pra quando for null string passa a ser "" e int passa a ser 0... Mas continua dando o erro...

Podem me ajudar?

Fico no aguardo.

Abraços

Angela

Attachments
ProblemaNull.jpg (194 views, 205.00 KB)
Replies
Luiz Carneiro Lima
Luiz Carneiro Lima
StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)
Group: Forum Members
Posts: 25, Visits: 87
Boa tarde Ivan,

Continuo com o problema de cast ao usar o StrataFrame...

Seguindo o tutorial consegui criar uma tela e listar alguns registros do banco de dados; mas quando mando incluir dá um erro de Cast.. Ele tenta converter 1 para inteiro...

Segue em anexo uma imagem do erro. Isso acontece quando o campo perde o foco.

Olhei na pasta de log mas não tem nenhum arquivo criado com a data de hoje...

Fico no aguardo de um contato.

Obrigada.

Angela

Attachments
problema.jpg (116 views, 252.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
If you put a breakpoint on the line where it fails, add the loValue.GetType() to the watch window to see what the type actually is.  It is indicating that the type cannot be casted, so we need to know what is in loValue.  I know the display value is "1" but I would like to know what the GetType() method indicates the data type as.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Luiz Carneiro Lima - 18 Years Ago
Trent L. Taylor - 18 Years Ago
     Entendeu Angela?
Ivan George Borges - 18 Years Ago
Luiz Carneiro Lima - 18 Years Ago
Ivan George Borges - 18 Years Ago
Luiz Carneiro Lima - 18 Years Ago
Ivan George Borges - 18 Years Ago
Luiz Carneiro Lima - 18 Years Ago
             Foi feito também "Build Partial"?
Ivan George Borges - 18 Years Ago
     Foi feito sim...
Luiz Carneiro Lima - 18 Years Ago
StrataFrame Team - 18 Years Ago
Ivan George Borges - 18 Years Ago
Ivan George Borges - 18 Years Ago
Luiz Carneiro Lima - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Luiz Carneiro Lima - 18 Years Ago
             Good you got it! ;)
Ivan George Borges - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search