[Mono-dev] System.Data.SqlConnection fails on 2nd invalid login attempt
Rob Wilkens
robwilkens at gmail.com
Sun Apr 29 23:13:41 UTC 2012
I'll make this easier to debug - i'll post my "full" source....
http://robssoftwareprojects.com/ga.zip
Just run "unzip ga.zip" and it should extract the folder GhettoGtkAdmin
It's a full monodevelop project
IT's very limited though, at this point all it does is log in (or not),
depending on whether or not you put in the right password.
I am not giving out the password though.
But you don't need the password to reproduce the error: Just use
username 'test' and password 'test' - leave the ftp password/username
blank, it doesn't do anything at this point in time. I'm porting this
from a program i wrote in windows in .net 4.0 with xaml, but only one
portion at a time, and at low priority.
The first time you click login it will say: Login failed for user test
The second time you click login it will say: Object Reference not set to
an instance of an object.
The second error message is the problem.
-Rob
On 04/29/2012 04:18 PM, Daniel Morgan wrote:
> I saw your example.
>
> SqlConnection with the constructor with the connnection string does
> not automatically connect to the database. You have to explicitly
> call the Open method.
>
> Mono is working correctly.
>
> ------------------------------------------------------------------------
> *From:* Rob Wilkens <robwilkens at gmail.com>
> *To:* mono-devel-list at lists.ximian.com
> *Sent:* Friday, April 27, 2012 2:57 PM
> *Subject:* [Mono-dev] System.Data.SqlConnection fails on 2nd invalid
> login attempt
>
> I probably shouldn't cross-post, but i wasn't sure where to put this,
> or if i should file a bug report (I'm new-ish to mono). After reading
> the mailing list description, this seemed like a more appropriate
> place to ask.
>
> First, let me say this is not a critical problem, and i'm not sure
> whether it is a bug on mono or not. I might be interested in trying
> to fix this myself if i can figure out where to start (later), just as
> a time waster project.
>
> When I create an SqlConnection called, say, MyConnection, and then
> call MyConnection.Open() - the second time i call it (though the first
> time with each new object it is called on) with an invalid login
> name/password, it fails with what appears to be an exception message
> that implies something was null when it shouldn't have been (object
> reference not set to instance of an object). If i call it with a
> valid login name/password on any attempt, it doesn't raise any errors,
> as is expected.
>
> From what i can tell, this is happening inside of MyConnection.Open()
> ... and not in my code. I've verified that MyConnection is not null
> when i call Open().
>
> If you want to see sample code, i'll point you to my other post on
> this topic:
> http://stackoverflow.com/questions/10355669/using-system-data-sqlconnection-in-mono-second-invalid-login-attempt-results-in
>
>
> Does this sound like something i should file a bug on? Also, if i'm
> interested in contributing, would it be wisest to file a bug first,
> then attempt to resolve it?
>
> -Rob
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com <mailto:Mono-devel-list at lists.ximian.com>
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120429/72e8b5ae/attachment-0001.html>
More information about the Mono-devel-list
mailing list