Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#33 JOIN error does not throw exception

open
nobody
None
5
2005-04-04
2005-04-04
Julien Hamaide
No

I try to use a join select, but some field were
ambiguous. Insteaed of launching an exception, the
system just act weird, closing connection.

Is this a bug??

Discussion

  • Robert Foster
    Robert Foster
    2005-04-21

    Logged In: YES
    user_id=526041

    Could you please supply more information... a Code sample
    (including the actual Join expression) would be helpful.

     
  • Julien Hamaide
    Julien Hamaide
    2005-04-22

    Logged In: YES
    user_id=782916

    let's say we have 2 tables : both contains a field called
    Name, if i ask for this

    select someField, Name from Table1 join Table2 on
    Table1.tab2ID = Table2.ID where ....;

    If I run this in sqlite command line tool, I have this error :
    SQL error: ambiguous column name: Name

    If I run this with this code :

    SQLiteConnection Conn;

    string cmd = "select ....";

    SQLiteCommand Cmd = new SQLiteCommand(cmd, Conn);

    SQLiteDataReader dr = Cmd.ExecuteReader();

    if(dr.Read())
    {
    //display code
    }

    dr.Close();

    The dr.Read() return 0, but does not throw exception about
    wrong command (such as when other error are made)

    Furthermore, the connection is close ( as far as I know,
    cause all my other bindings are behaving strangely)

    I've planned to look at it in the source code, but got no
    time for now

    Hope it help you