Hi Francisco, thank.
Other code with problem:
MembershipUser user = Membership.GetUser("testuser"); //ok
string pass = user.GetPassword(); //error
Error:
Unable to cast object of type 'System.DBNull' to type 'System.String'.
D:\Sigem7\src\Npgsql2.0.4.src\src\Npgsql\NpgsqlDataReader.cs Line: 306
public override String GetString(Int32 i)
Line 305: {
Line 306: return (String) GetValue(i); //error
Line 307: }
Stack Trace:
[InvalidCastException: Unable to cast object of type 'System.DBNull' to
type 'System.String'.]
Npgsql.NpgsqlDataReader.GetString(Int32 i) in
D:\Sigem7\src\Npgsql2.0.4.src\src\Npgsql\NpgsqlDataReader.cs:306
NauckIT.PostgreSQLProvider.PgMembershipProvider.GetPassword(String
username, String answer) in
D:\Sigem7\src\NauckIT.PostgreSQLProvider-1.2.4.0\PgMembershipProvider.cs:782
Error Npgsql 2.0.4 or not ?
Rodrigo Cuevas.
Francisco Figueiredo Jr. escribió:
On Sat, Mar 14, 2009 at 18:11, Rodrigo Cuevas <[email protected]> wrote:
Hi,
The problem is in the method GetParseCommandText() in file NpgsqlCommand.cs
Comment lines:
if (parameters[i].TypeInfo.UseSize && (parameters[i].Size > 0))
{
parseCommand += string.Format("({0})", parameters[i].Size);
}
Now work.
It is a bug in Npgsql 2.0.4 or not?
Hi, Rodrigo!
It seems to be a bug in Npgsql indeed.
We received today a report about it:
http://pgfoundry.org/forum/message.php?msg_id=1004741
I'll be working to get a testcase for this and apply the fix so we
don't get this problem again in future releases.
Thank you and Daniel for your feedback on this.
begin:vcard
fn:Rodrigo Cuevas
n:Cuevas;Rodrigo
adr:;;;Santiago;;;Chile
email;internet:[email protected]
title:Consultor TI
url:http://bellinux.net.tf/
version:2.1
end:vcard
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list