[Mono-dev] System.Data.SqlConnection fails on 2nd invalid login attempt

Daniel Morgan monodanmorg at yahoo.com
Sun Apr 29 20:18:10 UTC 2012

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:

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?


Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120429/08df66e5/attachment.html>

More information about the Mono-devel-list mailing list