Node.js ver: 9.2
Oracledb driver ver: 2.0.15
I have written an anonymous PL/Sql procedure with declaration, execution and exception sections of 200 lines of coding.
This runs perfectly fine when running directly on Oracle server or using any tool that can run it. However, running from within the .js file gives an error:
"detailed_message":"ORA-06550: line 1, column 3681:\nPL/SQL: ORA-00905: missing keyword\nORA-06550: line 1, column 3467:\nPL/SQL: SQL Statement ignored\nORA-06550: line 1, column 3736:\nPLS-00103: Encountered the symbol \"ELSE\" when expecting one of the following:\n\n ( begin case declare end exception exit for goto if loop mod\n null pragma raise return select update while with\n
Since the code runs fine on the server directly, I would not suspect any issues with the procedure itself. And I also have another anonymous procedure with less than 100 lines of code seems to run fine from .js file.
I would like to know if there is any limitations with the db driver running such a long procedure. (I would not want to store this procedure in the db either)
There's no artificial limit on the PL/SQL block size in node-oracledb.
Check your syntax, e.g. quote handling. Note the current examples use backticks.
If you're concatenating quoted strings together, make sure each string ends or begins with whitespace:
"BEGIN " +
"FORALL ... " +
...
Related
I have a JMeter test where a CSV file containing multiple rows of comma separated values example:- internalID,drivername, usreg,canadareg. I am basically using the CSV file to compare the values with the database table values. To compare the values to database values, I am adding a JDBC request with a query 'select internalID,drivername,usreg,canadareg from data where internalid ='${internalID'}' and providing the variables names to store the column data result. I use the groovy JSR233 and call the variables names in the script by declaring String a = vars.get("dintID_${counter}") where dintID is the variable name provided in the JDBC . The issue is when I run the script the first line of data in CSV files gets executed successfully, then the second line data in CSV file is passed to SQL statement correct, however the vars.get("dintid_${counter}") always stays at previous record meaning it does not go to next internalid(dintID). I have checked that my counter is incrementing. No idea how to resolve the issue. Does anyone know what mistake I am doing.
If you take a look at JSR223 Sampler documentation you will see that:
The JSR223 test elements have a feature (compilation) that can significantly increase performance. To benefit from this feature:
Use Script files instead of inlining them. This will make JMeter compile them if this feature is available on ScriptEngine and cache them.
Or Use Script Text and check Cache compiled script if available property.
When using this feature, ensure your script code does not use JMeter variables or JMeter function calls directly in script code as caching would only cache first replacement. Instead use script parameters.
So if the counter is a JMeter Variable - it will always be the initial value and it won't increment on subsequent iterations.
So you need to change the line to:
String a = vars.get('dintID_' + vars.get('counter'))
More information on Groovy scripting in JMeter: Apache Groovy - Why and How You Should Use It
After running below command :
sh cqlsh --request-timeout=3600 -f test.cql
I am getting below error :
Incomplete statement at end of file
Even when my first line is use sample; followed by 50 insert queries.
What could be the reasons for this error?
That error is returned if the statement at the end of the file either (a) has invalid syntax, or (b) not terminated correctly.
Sometimes the issue can occur several lines up from the last statement in the input file.
Check that the CQL statements have valid syntax. It might be necessary to do a process of elimination and split the file so there's only 10 statements in each so you can identify the offending statement. Cheers!
Using VBA, I tried to use the NI-488.2 calls directly, instead of using VISA COM. However, when I try to use NI-488.2 commands in VBA, I get the following error message :
''Sub or Function not defined''.
That is, when calling Call SendIFC(BOARD_ID) or Call EnableRemote(BOARD_ID, intAddrList()), Call SendGPIB(osa, ":mmem:stor:grap color,bmp,""test"",int"), = RecieveBinaryGPIB(osa, byteData()), etc...
My first guess would be that I am simply missing the correct library. (Or is there any deeper issue here?). For now, I added the VISA COM 3.0 Type Library and the VISA COM 488.2 Formatted I/O 1.0 to the Excel references.
Here is a sample code from YOKOGAWA (slightly edited) that can be found online and applies to Visual Basics, but that I could not run in VBA. I removed most of the code for clarity purpose. It simply saves a screenshot in internal memory.
Private Sub SaveImage()
Const BOARD_ID = 0 'GP-IB Interface card Address
Const osa = 1 'OSA GP-IB Address
Dim intAddrList(31) As Integer
'----- GP-IB Interface setting
' send IFC
Call SendIFC(BOARD_ID)
' assert th REN GPIB line
intAddrList(0) = NOADDR
Call EnableRemote(BOARD_ID, intAddrList())
' GPIB time out setting
Call ibtmo(BOARD_ID, T30s) 'Time out = 30sec
'----- send command to OSA
Call SendGPIB(osa, "CFORM1") ' Command mode set(AQ637X mode)
Call SendGPIB(osa, ":mmem:stor:grap color,bmp,""test"",int")
'----- Disconnect
Call EnableLocal(BOARD_ID, intAddrList())
End Sub
Now we have the code... you have now edited out the useful bits... I'm going to backtrack a bit and say that even if you get direct calls to work you’re still going to have a problem extracting the files.
I’m going to guess you’re getting "Undefined header" errors if you query the OSA with "SYST:ERR:ALL?" and this is quite possibly because the query command for the data is invalid.
I’ve notice you’re using including the data type your command:
":mmem:data? ""test.bmp"",int"
"test.bmp",int,0 is what you might see if you query the directory, however, it is not needed when extracting the file.
try using:
":mmem:data? ""test.bmp"""
(The number of quotations are to include them in the string)
If not, what is the GPIB error?
I am a newbie to mainframes and JCl. I am getting the error:
"Procedure was expanded as instream procedure definition"
this is my JCL.
I am getting the message IEFC001I . Somone please help me to solve this issue.
I think the title of this question should be renamed to What means IEFC001I message "Procedure was expanded as instream procedure definition"? Even though you seem to have forgotten to include your JCL (as per your "This in my JCL"), I don't think there is a need for including such JCL to be able, to answer your question.
When a JCL is submitted, the job that starts running may result in a message like so:
Procedure was expanded as instream procedure definition
The message identifier related to that message is IEFC001I. Note the "I" at the end of this message, which stands for something like "Informational only" (instead of "E" for error, or "A" for Abend"). So this is not to be considered as an error.
What it is actually trying to say, is that your JCL contained the details of some "procedure", which in this case was added to the JCL itself (= instream). An alternative could have been that some JCL jobstep was executing a procedure, with a member that can be found in one of the typical libraries where lots of such procedures are located also, like DSN=SYS1.PROCLIB .
Note: as a variation to using "instream procedures", you may also want to use the "JCLLIB ORDER = ..." statement. That allows you to specify 1 or more DSNs in which you want you r JCL to go look for any proclib members you are using in your JCL. I often use that technique when I'm testing an updated procedure member (before actually installing it in the "official proclib DSNs", and which is used if you do not specify any such JCLLIB ORDER ...
I get this exception error whenever I want to write data to a firebird db:
No mapping for the Unicode character exists in the target multi-byte code page
I tried to change the string in my write-function to UnicodeString, but I still get the same error.
I have 2 computers:
Delphi XE2, with Intraweb 12 (12.2.25)
Delphi XE6 with Intraweb 14 (14.0.32)
Everything works fine on the IW12 PC, but I have these strange problems in my application on the IW14 computer.
I'm not doing any special string manipulations, only simple read/write to the DB.
If i understand it correctly, this is a Delphi error and not the intraweb's. How can I make it go away?
here is a simple write example to an IBX ibTable that doesn't work :
With ibTable Do begin
Open;
Try
Append;
Post; // <<--- error when try to Post
Finally
Close;
End;//Try