tclodbc appears to connect to db but doesn’t return anything

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf tclodbc appears to connect to db but doesn’t return anything

  • Creator
    Topic
  • #54610
    Donna Bailey
    Participant

      Anyone experience this issue?  I’m on CL 6.0 and on a Windows 2008 server.

      I’m using the package require tclodbc and the following code to connect/query the db:

      set returndberr [database connect db law-test username password]

      set sql “select NBR_LINES from TEST.lawtest.PURCHORDER where PO_NUMBER = ‘$rec_po_num'”

      set returnvals [db $sql]

      echo “Looked for PO Line Number using $sql – Found $returnvals”

      My output in the testing tool is:

      Looked for PO Line Number using select NBR_LINES from TEST.lawtest.PURCHORDER where PO_NUMBER = ‘      1-448301’ – Found

      If I do the same thing opening tcl at the command line I get:

      tcl>select NBR_LINES lawtest.PURCHORDER

      Error: can not find channel named “NBR_LINES”

      law-test is set up as User and System DSN, TEST is the DB and lawtest the schema..client supposedly has given me “proper” access.

      Anyone have any suggestions??!!??

      Thanks,

      Donna

      Donna Bailey
      Tele: 315-729-3805
      dbailey@microstar.health
      Micro Star Inc.

    Viewing 0 reply threads
    • Author
      Replies
      • #82211
        Donna Bailey
        Participant

          Little more investigating and I figured it out..I needed to pad my field with spaces to find the correct PO in the file!!

          Thanks for your support!!

          😀  ðŸ˜€  ðŸ˜€

          Donna

          Donna Bailey
          Tele: 315-729-3805
          dbailey@microstar.health
          Micro Star Inc.

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.