Quantcast
Channel: OpenPlant | AutoPLANT
Viewing all articles
Browse latest Browse all 12277

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

$
0
0
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 As a prerequisite, OpenPlant Isometrics Manager needs 32 bit ODBC drivers. In case DBQUERYs are used on Microsoft products like Access or Excel one must check if the Windows OS contains recent 32 bit ODBC drivers. Start this application: C:\Windows\SysWOW64\odbcad32.exe 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 - >>>> Create/Use excel file with which contains data to be queried inside OpenPlant Isometrics Manager. Store it in desired location, say C:\LineList.xlsx. 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 Navigate to style folder for corresponding project. See path mentioned below for default project. Open Textnodes.txt file. 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)') Save & close file. Launch OpenPlant Isometrics Manager & verify results. IMPORTANT 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 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!

Viewing all articles
Browse latest Browse all 12277

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>