Results 1 to 4 of 4

Thread: Error # = 80040E14(-2147217900)

  1. #1
    Ron Guest

    Error # = 80040E14(-2147217900)

    Error # = 80040E14(-2147217900)
    Description = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name '99-DK-0042'.
    Source = Microsoft OLE DB Provider for ODBC Drivers
    SQL State = S0022
    Native Error = 207
    mydb.dbSQL = "SELECT count(distinct pt_mpi) from protocol" & condition

    I have specified the condition to be "where pcl_id = "98-dk-0042"
    I get this error stating invalid column name. But when i give the same statement in query analyser it works.
    Any clue why this happens?
    Thanks,
    Ron

  2. #2
    Mark Guest

    Error # = 80040E14(-2147217900) (reply)

    Ron,
    You might try adding an "AS" in your SQL statement, like this:

    "SELECT count(distinct pt_mpi) AS CT from protocol"

    Hope that helps.
    Mark.


    ------------
    Ron at 4/14/00 10:53:01 AM

    Error # = 80040E14(-2147217900)
    Description = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name '99-DK-0042'.
    Source = Microsoft OLE DB Provider for ODBC Drivers
    SQL State = S0022
    Native Error = 207
    mydb.dbSQL = "SELECT count(distinct pt_mpi) from protocol" & condition

    I have specified the condition to be "where pcl_id = "98-dk-0042"
    I get this error stating invalid column name. But when i give the same statement in query analyser it works.
    Any clue why this happens?
    Thanks,
    Ron

  3. #3
    Dai Williams Guest

    Error # = 80040E14(-2147217900) (reply)

    If this is a literal transcript you have used double inverted rather than single inverted for the value of pcl_id, should be pcl_id = '98-dk....'

    HTH

    Dai
    ------------
    Ron at 4/14/00 10:53:01 AM

    Error # = 80040E14(-2147217900)
    Description = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name '99-DK-0042'.
    Source = Microsoft OLE DB Provider for ODBC Drivers
    SQL State = S0022
    Native Error = 207
    mydb.dbSQL = "SELECT count(distinct pt_mpi) from protocol" & condition

    I have specified the condition to be "where pcl_id = "98-dk-0042"
    I get this error stating invalid column name. But when i give the same statement in query analyser it works.
    Any clue why this happens?
    Thanks,
    Ron

  4. #4
    Guest

    Error # = 80040E14(-2147217900) (reply)


    If i give it in a single quotes, it shows the following message
    Error # = 80040E14(-2147217900)
    Description = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'DK'.
    Source = Microsoft OLE DB Provider for ODBC Drivers
    SQL State = S0022
    Native Error = 207



    ------------
    Ron at 4/14/00 10:53:01 AM

    Error # = 80040E14(-2147217900)
    Description = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name '99-DK-0042'.
    Source = Microsoft OLE DB Provider for ODBC Drivers
    SQL State = S0022
    Native Error = 207
    mydb.dbSQL = "SELECT count(distinct pt_mpi) from protocol" & condition

    I have specified the condition to be "where pcl_id = "98-dk-0042"
    I get this error stating invalid column name. But when i give the same statement in query analyser it works.
    Any clue why this happens?
    Thanks,
    Ron

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •