Announcement

Collapse
No announcement yet.

SQL Server / SQL Tools

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQL Server / SQL Tools

    Posting this on behalf of a customer who is not a member of the forums. I don't have enough experience with SQL Server to answer authoritatively.

    Good afternoon,

    I have SQLT_Pro.dll version 2.1.4.0 and I’m having running this Stored Procedure. Initially it had a couple of parameters, but I removed them to see if it will run, but not having any luck.

    The driver I’m using is ODBC DRIVER 17 FOR SQL SERVER. I looked a Microsoft’s site and they said to call is “{call spName}”

    In Power Basic I’m calling it but it just doesn’t seem to run it

    sqlQuery = “{call spName}"
    SQL_Stmt %SQL_STMT_IMMEDIATE, sqlQuery


    Thanks.
    Tommy
    "Not my circus, not my monkeys."

  • #2
    What does the SP do? Is it supposed to return a recordset? or multiple recordsets or a return value ? Or is it doing something with data such as insert, update, delete?




    Comment


    • #3
      New info: After some additional checking he reports that the driver is returning a "COUNT field incorrect or syntax error", which is a horse of a different... breed. He also emailed some other clues, so I'll post here again if I can narrow it down better. Thanks Stuart.
      "Not my circus, not my monkeys."

      Comment


      • #4
        Initially it had a couple of parameters, but I removed them to see if it will run, but not having any luck.
        I was reading up on this. ODBC syntax correct (assuming no params to specify).

        Procedure code not shown?

        Maybe you did not remove the params completely and still have a reference to one in your procedure code? That could get you a "COUNT field incorrect or syntax error" right quick.

        I think I'd also run the procedure outside ODBC first using a command-line tool or via OLE (ADO) just to be sure it's correct and your user is looking in the right place for his issues.

        Also, SQL/Server can be really sensitive to "User" and can give some strange results when there is a mismatch.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Likely he just needs to add a set nocount on to his SP to sort the issue.

          Comment


          • #6
            Thanks Michael and Carlo, when I saw "stored procedure" I made the same assumptions you did. This was problem with not understanding the benefits of checking for errors at least once before your program exits.

            "Not my circus, not my monkeys."

            Comment

            Working...
            X