Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Execute SQLQueryValue using Application.Run (Read 2260 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Execute SQLQueryValue using Application.Run
11.07.11 at 15:52:38
 
Execute SQLQueryValue using Application.Run
 
Quote:
In my VBA macro code I am trying to use the SQLQueryValue function as follows:


sqlStmt = "Select DB.PACKAGE.get_person_role_assign(UPPER('userID'))
ROLE_ID from dual"



When I ran it in SQL*XL:

getSqlDataString = Application.Run("sqlxl.xla!SQLQueryValue", sqlStmt,
1)

It gave the following error:

getSqlDataString = "#SQL*XL Universal error: unhandled error (please
report): 424:Object required"

 
It was not the intention for the SQL*XL functions to be used in this way. The usage is intended in Excel cell formulas.
 
I have programmed a workaround to it will be possible for you to run the function in this way. I have restricted it to only return one value (row 1, column 1).
 
It will be released in SQL*XL 5.0.10.
Back to top
 
« Last Edit: 11.07.11 at 15:57:05 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1