Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005

    Unanswered: SQL0301 ERROR on INSERT


    We have a SQL Server Win2000 box that exposes a web service. When called with an ADODB.Recordset object, the web service creates an instance of a COM+ DLL which then uploads data to our AS400 box.

    The DLL is custom written in VB6 and I have debugged it on my development machine, it seems OK - I can write to the destination tables in the AS400 Library & call an RPG to manipulate the data.

    However, when running from the SQL server, the DLL generates the following error...

    -2147467259|Microsoft OLE DB Provider for ODBC Drivers in source [IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0301 - Input host variable UPHSUP

    The field UPHSUP was changed from character to numeric recently (kind of like a 'type mismatch' error?).

    I've rebooted the SQL Server a few times, thought it's connection might have still be holding info about the schema before the field change? Could this be down to catalog caching or SQL package caching - so the server is not aware of the field definition change?

    If this is my problem, them any pointers about how to reset the cache appreciated! Otherwise, any other hints please...!

    Additional sys info.
    Win 2000 - SQL Server 2000
    MDAC 2.7
    Client Access (V5R2)


  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    Try re-creating the ODBC data source.

  3. #3
    Join Date
    Jan 2005
    Removing the packages fixed the problem...

    Depending on the client application connecting to the box, they will use a different package. Removed them all to be sure!

    Object DLLHOSTVBA in QGPL type *SQLPKG deleted.
    Object EXCELVBA in QGPL type *SQLPKG deleted.
    Object MSACCESVBA in QGPL type *SQLPKG deleted.
    Object MSQRY32VBA in QGPL type *SQLPKG deleted.
    Object PROJECTVBA in QGPL type *SQLPKG deleted.
    Object VB6VBA in QGPL type *SQLPKG deleted.

Posting Permissions

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