Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
AutoPLANT | OpenPlant | PlantWise
  • Product Communities
  • More
AutoPLANT | OpenPlant | PlantWise
AutoPLANT | OpenPlant | PlantWise Wiki [Microsoft][ODBC Excel Driver] too few parameters. Expected 2
    • Sign in
    • -AutoPLANT | Bentley Raceway and Cable Management | OpenPlant | PlantWise Wiki
      • -OpenPlant
        • +CONNECT Services - OpenPlant
        • +Example Configuration - CONNECT Edition
        • +Installations - OpenPlant CONNECT Edition Applications
        • +OpenPlant Download Links & Videos
        • OpenPlant Product Compatibility
        • +OpenPlant Modeler CONNECT
        • +OpenPlant PID CONNECT
        • +OpenPlant Isometrics Manager CONNECT
        • +OpenPlant Orthographics Manager CONNECT
        • +OpenPlant Support Engineering CONNECT
        • +OpenPlant Project Administrator CONNECT
        • +OpenPlant CONNECT Edition-PlantSight Integration
        • +OpenPlant Modeler v8i
        • -OpenPlant Isometrics Manager v8i
          • -OpenPlant Isometrics Manager for OpenPlant
            • Installation/Upgradation Steps for OpenPlant Isometrics Manager
            • +Errors, Logs, Messages, Crashes - OpenPlant Isometrics Manager
            • +Open/Save - OpenPlant Isometrics Manager
            • +Processing - OpenPlant Isometrics Manager
            • -Settings/Attributes - OpenPlant Isometrics Manager
              • +Configuring the BOM and Reports
              • -DBQuery : usage, logging, debugging
                • How to Get Updated Revision in Isometrics Drawing Using DBQuery
                • [Microsoft][ODBC Excel Driver] too few parameters. Expected 2
              • +Grid Lines - OpenPlant Isometrics Manager
              • Connectivity Information Lost in Isometric After Detaching/Attaching Reference Model
              • How To Add Detail Sketches in OpenPlant Isometrics Manager Using OpenPlant Modeler
              • How to Add NEW Schema Field to Component for Custom Tagging in OpenPlant Isometrics Manager
              • How to Adjust Imperial Accuracy in OpenPlant Isometrics Manager
              • How to Assign FieldFit Weld Allowances or Other Weld Types for BOM & Cut List in OpenPlant Isometrics Manager
              • How to Change Numbering Sequences For Spools, Welds & CUTID
              • How to Control Socket Weld Symbols in OpenPlant Isometrics Manager
              • How to Define Existing lines in OpenPlant Isometrics Manager
              • How to Delete Levels and Create Custom Level List in OPIM Seed File
              • How To Display Co-ordinates Using Multipliers
              • How to Display Nozzle Rating and Facing Information on Connection & Continuation in OpenPlant Isometrics Manager
              • How To Display Pipe Length using Multipliers
              • How To Feature Microstation Tags And AutoCAD Attributes
              • How to Format Data in Fractions Listed Under Drawing Tag Data
              • How to Get Exclusive Support PARTID Report with Prefix
              • How to Hide Sizes Of Bolts in Bill Of Material
              • How To Modify Valve Tag
              • How to Obtain Different Descriptions for Trimmed Elbow in OpenPlant Isometrics Manager BOM
              • How to Remove Information from Isometric Output
              • How to Rotate Support Symbols in OpenPlant Isometrics Manager
              • How to Round Off Values After Decimal For Support Co-ordinates
              • How to Split the Components on Different Description and to Avail Different PartID in BOM
              • Managing Isometrics Styles
              • +Modifying Dimensions
              • +Modifying Symbols in OpenPlant Isometrics Manager
              • +Modifying Text and Annotation Settings
              • +Modifying the Isometric Content
              • +Setting File Type (DGN or DWG) and Paper Setting
              • To Specify Various Imperial Value Output Type in OpenPlant Isometrics Manager
              • To Concatenate Length Property in Description Field for BOM
              • To Define Symbology for Multiple Component State in OpenPlant Isometrics Manager
              • To Display Handwheel Orientation For GearBox Operator in OpenPlant Isometrics Manager
              • To Display Multiple Rows for Notes as Labels
              • To Display New Property in Description Field For BOM in OpenPlant Isometrics Manager
              • To Display Right Angle Operator Direction with Spindle in OpenPlant Isometrics Manager
              • To Display Support Orientation in OpenPlant Isometrics Manager
              • Additional 3D.DWG file Created in OpenPlant Isometrics Manager
              • How to insert spaces between PARTID labels in OpenPlant Isometrics Manager
          • +OpenPlant Isometrics Manager for AutoPLANT
          • +Release Notes - OpenPlant Isometrics Manager
          • OpenPlant Isometrics Manager [FAQ]
        • +OpenPlant Project Administrator v8i
        • +OpenPlant PID v8i
        • +OpenPlant Orthographics Manager v8i
        • +OpenPlant Support Engineering v8i
        • +OpenPlant ModelServer v8i
        • +OpenPlant Reporting v8i
        • How to Connect with Bentley Technical Support Team using Microsoft Teams
        • How to Connect with Bentley Technical Support Team using Microsoft Teams via Browser
      • +Bentley AutoPLANT
      • +Bentley Navigator
      • +Bentley PlantSpace
      • +Plant Project Tools
      • +Bentley Raceway and Cable Management
      • i-model Composition Service for S3D
      • Working from home with OpenPlant
      • Working from home with Bentley Raceway and Cable Management
      • Working from home with AutoPLANT Modeler
    • How to Associate the Specification Based on Service in OpenPlant Modeler Connect

     
     Questions about this article, topic, or product? Click here. 

    [Microsoft][ODBC Excel Driver] too few parameters. Expected 2

    Applies To
    Product(s): OpenPlant Isometrics Manager
    Version(s): 08.11.09.XXX (SS5) | 08.11.11.XX (SS6) 
    Environment:  Windows 7/8.1/10 (64bit)
    Area:  Settings/Attributes
    Subarea:  DBQuery
    Original Author:  Rahul Kumar, Bentley Product Advantage Group

    Problem Description

    While using database query with MS excel driver, and debugging the log file, there is a message [Microsoft][ODBC Excel Driver] too few parameters. Expected 2 which does not allow software to output correct data. This is the common message while querying excel file which happens because of not selecting column/cell as desired with correct format. 

    Steps to Resolve

    1. As a prerequisite, OpenPlant Isometrics Manager needs 32 bit ODBC drivers. In case DBQUERYs are used on Microsoft products like Access (*.Mdb) or Excel (*.xls, *.xlsx) one must check if the Windows OS contains recent 32 bit ODBC drivers.
    2. Start this application: C:\Windows\SysWOW64\odbcad32.exe
    3. Go to the drivers tab and check if the following driver is present:

         

      Note: If not it is advised to install a more recent driver set, to be found here - >>>>

    4. Create/Use excel file with which contains data to be queried inside OpenPlant Isometrics Manager. 
    5. Store it in desired location, say C:\LineList.xlsx.



    6. User requirement is to check any field , say at 76th column value based on LINENUMBER at 14th column from sheet name say Sheet11. see Below image. 
      For Line number at N column should be counted as F14


      For Value to be queried for BX column should be counted as F76

      Note - 
      Prefix F is mandatory for all count and to query any field

    7. Navigate to style folder for corresponding project. See path mentioned below for default project. 



    8. Open Textnodes.txt file. 

    9. Add query as mentioned below. 

      exds=Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};Dbq=$(IE_EXCELPATH)
      LDP=DBQUERY($(exds), Select [F76] from [Sheet11$] where[F14]='$(LINENUMBER)')
      LDT=DBQUERY($(exds), Select [F76] from [Sheet11$] where[F14]='$(LINENUMBER)')



    10. Save & close file. 
    11. Launch OpenPlant Isometrics Manager & verify results.

    NOTE: If you are going to follow the above method, please make sure that the first row of the Excel Sheet is blank

    For example, if below is the format of the excel sheet to be used

              

    Writing a query like

              

    will give an error like

              

    The reason being if the first row is not blank, the [F_] nomenclature can't be used to refer to columns in the Query. In that case,add a blank row on the top as shown.

              

    Still a Problem

    If there is still some problem, then please create a Service Request and contact Bentley Product Advantage group along with the list of all relevant details to get in depth analysis and for possible solution or workarounds. 

    See Also

    http://communities.bentley.com/products/plant/design___engineering/w/plant_design_and_engineering__wiki/18475.dbquery-usage-logging-debugging

    Comments or Corrections?

    Bentley's Product Advantage Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!

    • Drawing Tag
    • OpenPlant Modeler
    • xls
    • MS Excel
    • OPIM
    • DB Query
    • Too Few Parameters
    • xlsx
    • Microsoft Excel Driver
    • Share
    • History
    • More
    • Cancel
    • Rahul Kumar Created by Bentley Colleague Rahul Kumar
    • When: Fri, Sep 30 2016 9:46 AM
    • Kestutis Mitkus Last revision by Bentley Colleague Kestutis Mitkus
    • When: Tue, Dec 18 2018 8:17 AM
    • Revisions: 7
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies