Pass an array of buttons by parameter
Dear Java developers :
I am asking about how can I pass an array of JButton by parameter.
For example, I have a method that randomly picks a button that have an empty text (""), if not empty then the method recursively calls herself and so on until it finds an empty labeled button :
private void randomPick(JButton buttons[]) {
Random r = new Random();
int n = r.nextInt(8);
if (buttons[n].getText()!="") {
countClicks--;
randomPick(buttons[n]);
} else {
buttons[n].setText("O");
buttons[n].setEnabled(false);
countClicks++;
}The problem is that I don't know neither how to pass the buttons[] in parameter of a method nor how to write the calling of the method properly.
Thanks for your help,
Hassanova.
Ok sorry for my explanations I'll try to be more clear :
I have 2 classes at this point : one that draws the interface, the other makes the treatment
here is the 1st class :
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JFrame;
public class TTTGameJFrameView implements ActionListener {
JFrame frame = null;
JButton buttons[] = new JButton[10];
public TTTGameJFrameView() {
setView();
public void setView() {
// Building the window
frame = new JFrame("Tic Tac Toe Game");
frame.setSize(300,300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(new GridLayout(3,3));
//Positioning the buttons
for(int i = 0; i<=8; i++){
buttons[i] = new JButton();
frame.add(buttons);
buttons[i].addActionListener(this);
public void close() {
frame.dispose();
public void display() {
frame.setVisible(true);
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
And here is the 2nd class where I don't know how to pass by parameter the buttons declared in the 1st class to the methods and hpw to call them properly....
package test.TicTacToe;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
public class TTTGameModel {
JButton buttons[] = new JButton[10];
JFrame frame = null;
JButton buttons[] = new JButton[10];
private void setView() {
// Building the window
frame = new JFrame("Tic Tac Toe Game");
frame.setSize(300,300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(new GridLayout(3,3));
//Positioning the buttons
for(int i = 0; i<=8; i++){
buttons[i] = new JButton();
frame.add(buttons);
buttons[i].addActionListener(this);
frame.setVisible(true);
private int[][] winPositions = new int[][] {
{0,1,2}, {3,4,5}, {6,7,8},
{0,3,6}, {1,4,7}, {2,5,8},
{0,4,8}, {2,4,6}
private int countClicks = 0;
private boolean win = false;
private String buttonLetter = "";
private String xOrO = "";
public void actionPerformed(ActionEvent e, JButton buttons[]) {
for(int i=0; i<=8; i++) {
if(e.getSource().equals(buttons[i])) {
buttons[i].setText("X");
buttons[i].setEnabled(false);
if ((countClicks <= 8) && (win==false)) {
randomPick(buttons);
countClicks++;
whoWins(buttons);
System.out.println("click�");
//System.out.println(countClicks);
private void whoWins(JButton buttons[]) {
for (int i=0; i<=7; i++) {
if (buttons[winPositions[i][0]].getText().equals(buttons[winPositions[i][1]].getText()) &&
buttons[winPositions[i][1]].getText().equals(buttons[winPositions[i][2]].getText()) &&
buttons[winPositions[i][0]].getText()!="")
win = true;
System.out.println(countClicks + " " + win);
showWinner(win,countClicks);
private void showWinner(boolean isWin, int count) {
if(count % 2 == 0)
xOrO = "O";
else
xOrO = "X";
if (isWin == true){
JOptionPane.showMessageDialog(null,"The "+xOrO+" Player Wins!");
System.exit(0);
else if ((isWin == false) && (count >= 9)){
JOptionPane.showMessageDialog(null,"Draw Game");
System.exit(0);
private void buttonClick(ActionEvent e) {
private void randomPick(JButton buttons[]) {
Random r = new Random();
int n = r.nextInt(8);
if (buttons[n].getText()!="") {
countClicks--;
randomPick(buttons[n]);
} else {
buttons[n].setText("O");
buttons[n].setEnabled(false);
countClicks++;
private void randomPick(JButton button) {
// TODO Auto-generated method stub
public static void main(String[] args) {
TTTGameJFrameView tt = new TTTGameJFrameView();
tt.setView();
tt.display();
Thank you very much I appriciate your patience !
Hassanova.
Similar Messages
-
How to pass int array as an IN parameter to PLSQL Procedure
Hi,
How to pass int array in java to a stored procedure througn jdbc
and what type of data type I should declare to this IN parameter
in PLSQL Procedure.
Thanks,
SimiHi,
The best way to do what you want depends on what you want. Start by describing what you need to do. It's best to post some sample data (CREATE TABLE and INSERT statments) and what results you want from that sample data. (See the forum FAQ: https://forums.oracle.com/message/9362002)
If you have ideas about how to do the job (e.g., populating a temporary table) it can be helpful to include those, too, but distinguish clearly between WHAT you need to do and HOW you might do it.
As Bencol suggested, a SYS_REFCURSOR might be the best way to pass back the results.
Since you didn't post your table, or even describe what you wanted to do with it, I'll illustrate using scott.emp, which is probably on your system.
Say you wanted a procedure that took a DATE as an argument, and returned a some designated columns (empno, ename and hiredate in the example below) for all employees hired on or after the given DATE. You might write a procedure like this:
CREATE OR REPLACE PROCEDURE hired_since
( start_date IN DATE
, out_data OUT SYS_REFCURSOR
AS
BEGIN
OPEN out_data FOR
SELECT empno, ename, hiredate
FROM scott.emp
WHERE hiredate >= start_date;
END hired_since;
SHOW ERRORS
You can test it in SQL*Plus like this:
VARIABLE c REFCURSOR
EXEC hired_since (DATE '1982-01-01', :c);
PRINT :c
The output I got from this test was:
EMPNO ENAME HIREDATE
7788 SCOTT 19-APR-87
7876 ADAMS 23-MAY-87
7934 MILLER 23-JAN-82 -
Can I pass an array as an input parameter for a stored procedure on SQL Server 2000
I am trying to pass an array to a stored procedure residing on my SQL Server 2000 database server. Is this even possible? If it is possible, what is the syntax for this?
Any help would be greatly appreciated.
ThanksI have passed arrays to and from a database using SQL and ActiveX, including to and from stored procedures, but I cannot recall the precise method used to do so. If memory serves, everything is in the form of a string. You need to do a lot of parsing and 'unparsing' to get this data into your stored procedure.
You are left with a couple of options to get your data to the stored procedure. I recommend using SQL in LabVIEW wherever possible as it saves the amount of external code calls (and believe me, calling ActiveX procedures developed by someone else in Visual Basic is NOT much fun at all...). You can either send the array and other data to the stored procedure (you will find the syntax in the SQL references in LabVIEW help under SQL), or you can send
the array to the database, and have the database then act upon the array.
I strongly recommend making routines (subVIs) to handle these operations.
Sorry I don't have the syntax, I don't have SQL installed on this machine. If you can't find the syntax in the help, please post here again.
-Mike Du'Lyea -
Pass String[] (String Array) type to a parameter in "Edit Action Binding"
Hi
Hope you are doing fine. This is very important to me, kindly help me in this regad.
I have a scenario where I need to pass in a parameter of type String[] that has only one value {"Name"} to a webservice that returns some values.
I've created a WS datacontrol, dragged and dropped the return value on to a jspx, then it asks me to give the input value
How do I pass it to the Parameter in "Edit Action Binding"?
When I say new String[]{"Name"}, it gives me the following error
Cannot create an object of type:[Ljava.lang.String; from type:java.lang.String with value:new String[]{"Name"}
Similarly, I hardcoded this value in a managedBean, added it to requestScope/applicationScope and queried it using #{applicationScope.AppCreationBean.epsName}
But this time, it says, the value is null. I guess the value is not getting initialized properly. But if i hardcode the value in the getter method, I'm again getting the error as above.
Would some one tell me how to pass an array of type String (ie, String[]) with a value "Name" in the "Edit Action Binding" wizard itself?
Regards
RaviKiranHi Frank
Thanks for the reply.
Issue resolved by initializing it in the ManagedBean.
For some reason, when I put it in request/application scopes, it was coming as null, but when I registered the Bean in PageFlowScope, it was working!
Regards
RaviKiran -
Trouble while passing an array as a parameter to an JDBC Control
Hi everyone, recently I have upgraded my WLS Workshop 8.1 application to WLS 10gR3 using the workshop 8.1 application upgrade but after the upgrade to beehive controls I'm having troubles in a couple of methods that receive an array as a parameter. One of the methods is the following:
* @jc:sql array-max-length="all" max-rows="all"
* statement::
* select COUNT(*) FROM (
* SELECT la.lea_gkey,la.eme_gkey
* FROM (SELECT gkey, name, role FROM employees WHERE {sql:fn in(gkey,{emeGkeyArray})}) e,
* lead_assignees la,
* leads le,
* cities ct,
* (select lea_gkey,name,email,phone,title from contacts where principal = 'X') cn,
* (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TARGET') targets,
* (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP5') top5,
* (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP100') top100
* WHERE e.gkey = la.eme_gkey
* AND la.lea_gkey = le.gkey
* AND le.city = ct.gkey(+)
* AND le.gkey = cn.lea_gkey(+)
* AND le.gkey = targets.lea_gkey(+)
* AND le.gkey = top5.lea_gkey(+)
* AND le.gkey = top100.lea_gkey(+)
* {sql: whereClause}
* UNION
* SELECT DISTINCT la.lea_gkey,la.eme_gkey
* FROM (SELECT gkey, name, role FROM employees WHERE {sql:fn in(gkey,{emeGkeyArray})}) e,
* lead_assignees la,
* shared_accounts sa,
* leads le,
* cities ct,
* employees asign,
* (select lea_gkey,name,email,phone,title from contacts where principal = 'X') cn,
* (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TARGET') targets,
* (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP5') top5,
* (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP100') top100
* WHERE e.gkey = sa.eme_gkey
* AND asign.gkey = la.eme_gkey
* AND asign.active='X'
* AND sa.lea_gkey = le.gkey
* AND sa.lea_gkey = la.lea_gkey
* AND le.city = ct.gkey(+)
* AND le.gkey = cn.lea_gkey(+)
* AND le.gkey = targets.lea_gkey(+)
* AND le.gkey = top5.lea_gkey(+)
* AND le.gkey = top100.lea_gkey(+)
* {sql: assigneeClause}
* UNION
* SELECT DISTINCT la.lea_gkey,la.eme_gkey
* FROM (SELECT gkey, name, role FROM employees WHERE {sql:fn in(gkey,{emeGkeyArray})}) e,
* lead_assignees la,
* shared_accounts sa,
* leads le,
* cities ct,
* (select lea_gkey,name,email,phone,title from contacts where principal = 'X') cn,
* (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TARGET') targets,
* (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP5') top5,
* (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP100') top100
* WHERE e.gkey = la.eme_gkey
* AND sa.lea_gkey = le.gkey
* AND sa.lea_gkey = la.lea_gkey
* AND le.city = ct.gkey(+)
* AND le.gkey = cn.lea_gkey(+)
* AND le.gkey = targets.lea_gkey(+)
* AND le.gkey = top5.lea_gkey(+)
* AND le.gkey = top100.lea_gkey(+)
* {sql: sharedClause})::
@JdbcControl.SQL(arrayMaxLength = 0,
maxRows = JdbcControl.MAXROWS_ALL,
statement = "select COUNT(*) FROM ( SELECT la.lea_gkey,la.eme_gkey FROM (SELECT gkey, name, role FROM employees WHERE {sql:fn in(gkey,{emeGkeyArray})}) e, lead_assignees la, leads le, cities ct, (select lea_gkey,name,email,phone,title from contacts where principal = 'X') cn, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TARGET') targets, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP5') top5, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP100') top100 WHERE e.gkey = la.eme_gkey AND la.lea_gkey = le.gkey AND le.city = ct.gkey(+) AND le.gkey = cn.lea_gkey(+) AND le.gkey = targets.lea_gkey(+) AND le.gkey = top5.lea_gkey(+) AND le.gkey = top100.lea_gkey(+) {sql: whereClause} UNION SELECT DISTINCT la.lea_gkey,la.eme_gkey FROM (SELECT gkey, name, role FROM employees WHERE {sql:fn in(gkey,{emeGkeyArray})}) e, lead_assignees la, shared_accounts sa, leads le, cities ct, employees asign, (select lea_gkey,name,email,phone,title from contacts where principal = 'X') cn, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TARGET') targets, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP5') top5, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP100') top100 WHERE e.gkey = sa.eme_gkey AND asign.gkey = la.eme_gkey AND asign.active='X' AND sa.lea_gkey = le.gkey AND sa.lea_gkey = la.lea_gkey AND le.city = ct.gkey(+) AND le.gkey = cn.lea_gkey(+) AND le.gkey = targets.lea_gkey(+) AND le.gkey = top5.lea_gkey(+) AND le.gkey = top100.lea_gkey(+) {sql: assigneeClause} UNION SELECT DISTINCT la.lea_gkey,la.eme_gkey FROM (SELECT gkey, name, role FROM employees WHERE {sql:fn in(gkey,{emeGkeyArray})}) e, lead_assignees la, shared_accounts sa, leads le, cities ct, (select lea_gkey,name,email,phone,title from contacts where principal = 'X') cn, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TARGET') targets, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP5') top5, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP100') top100 WHERE e.gkey = la.eme_gkey AND sa.lea_gkey = le.gkey AND sa.lea_gkey = la.lea_gkey AND le.city = ct.gkey(+) AND le.gkey = cn.lea_gkey(+) AND le.gkey = targets.lea_gkey(+) AND le.gkey = top5.lea_gkey(+) AND le.gkey = top100.lea_gkey(+) {sql: sharedClause})")
public Long getProspectsCount(String[] emeGkeyArray, String whereClause, String assigneeClause, String sharedClause) throws SQLException;
The execution of the method is the following:
pendingApprovals = leadsListingDB.getProspectsCount(employeeHierarchyArray, pendingApprovalsClause, pendingApprovalsClause, pendingApprovalsClause);
When the method is executed all the String parameters (whereClause, assigneeClause & sharedClause) are replaced well except the array parameter (emeGkeyArray) so the execution throws the following exception because the array is not replaced:
<Jan 20, 2010 1:01:26 PM CST> <Debug> <org.apache.beehive.controls.system.jdbc.JdbcControlImpl> <BEA-000000> <Enter: onAquire()>
<Jan 20, 2010 1:01:26 PM CST> <Debug> <org.apache.beehive.controls.system.jdbc.JdbcControlImpl> <BEA-000000> <Enter: invoke()>
<Jan 20, 2010 1:01:26 PM CST> <Info> <org.apache.beehive.controls.system.jdbc.JdbcControlImpl> <BEA-000000> <PreparedStatement: select COUNT(*) FROM ( SELECT la.lea_gkey,la.eme_gkey FROM (SELECT gkey, n
me, role FROM employees WHERE (gkey IN ())) e, lead_assignees la, leads le, cities ct, (select lea_gkey,name,email,phone,title from contacts where principal = 'X') cn, (SELECT lea_gkey, tag FROM lead
tags WHERE tag = 'TARGET') targets, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP5') top5, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP100') top100 WHERE e.gkey = la.eme_gkey AND la.l
a_gkey = le.gkey AND le.city = ct.gkey(+) AND le.gkey = cn.lea_gkey(+) AND le.gkey = targets.lea_gkey(+) AND le.gkey = top5.lea_gkey(+) AND le.gkey = top100.lea_gkey(+) AND LA.ACTIVE = 'X' AND LE.WE
KLY_POTENTIAL > 0 AND (LE.APPROVED IS NULL OR LE.APPROVED != 'Y') AND LA.SALE_STAGE IN(3034,3005) UNION SELECT DISTINCT la.lea_gkey,la.eme_gkey FROM (SELECT gkey, name, role FROM employees WHERE (gkey I
())) e, lead_assignees la, shared_accounts sa, leads le, cities ct, employees asign, (select lea_gkey,name,email,phone,title from contacts where principal = 'X') cn, (SELECT lea_gkey, tag FROM lea
tags WHERE tag = 'TARGET') targets, (SELECT leagkey, tag FROM lead_tags WHERE tag = 'TOP5') top5, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP100') top100 WHERE e.gkey = sa.eme_gkey AND asi
n.gkey = la.eme_gkey AND asign.active='X' AND sa.lea_gkey = le.gkey AND sa.lea_gkey = la.lea_gkey AND le.city = ct.gkey(+) AND le.gkey = cn.lea_gkey(+) AND le.gkey = targets.lea_gkey(+) AND le.gkey
= top5.lea_gkey(+) AND le.gkey = top100.lea_gkey(+) AND LA.ACTIVE = 'X' AND LE.WEEKLY_POTENTIAL > 0 AND (LE.APPROVED IS NULL OR LE.APPROVED != 'Y') AND LA.SALE_STAGE IN(3034,3005) UNION SELECT DISTINCT
la.lea_gkey,la.eme_gkey FROM (SELECT gkey, name, role FROM employees WHERE (gkey IN ())) e, lead_assignees la, shared_accounts sa, leads le, cities ct, (select lea_gkey,name,email,phone,title from c
ntacts where principal = 'X') cn, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TARGET') targets, (SELECT lea_gkey, tag FROM lead_tags WHERE tag = 'TOP5') top5, (SELECT lea_gkey, tag FROM lead_tags
WHERE tag = 'TOP100') top100 WHERE e.gkey = la.eme_gkey AND sa.lea_gkey = le.gkey AND sa.lea_gkey = la.lea_gkey AND le.city = ct.gkey(+) AND le.gkey = cn.lea_gkey(+) AND le.gkey = targets.lea_gkey(+
AND le.gkey = top5.lea_gkey(+) AND le.gkey = top100.lea_gkey(+) AND LA.ACTIVE = 'X' AND LE.WEEKLY_POTENTIAL > 0 AND (LE.APPROVED IS NULL OR LE.APPROVED != 'Y') AND LA.SALE_STAGE IN(3034,3005)) Params:
{}>
<Jan 20, 2010 1:01:26 PM CST> <Debug> <org.apache.beehive.netui.pageflow.FlowController> <BEA-000000> <Invoking exception handler method handleException(java.lang.Exception, ...)>
[LeadsMailer] Unhandled exception caught in Global.app:
java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
So the big question is if that behavior is due to a bug of I'm doing something wrong. Do someone can give me an advice about this problem because the array parameter has no problems in workshop 8.1?
Thanks in advance!Greetings
I may not have an answer for you, but i am in the same boat! I am trying to pass an array to store in the database. I have 2 out of 8 columns that need to be stored as arrays. Everything saves EXEPT for the 2 arrays in question. I am using BEEHIVE with my web app. The strange thing is that i do not receive any syntax errors or runtime codes. I am still searching for an answer. If i find anything out, i will let you know.
John Miller
[email protected] -
Passing an array as parameter from java (java controls) to stored procedure
Hi,
I'm using java controls (BEA Weblogic Workshop 8.1) to call a stored procedure and send an array as a parameter to the stored procedure from java. The following code below throws an exception "Fail to convert to internal representation".
Java code
import com.bea.control.DatabaseControl.SQLParameter;
// Here i create the java array
int[] javaArray={12,13,14};
//The code below is used to create the oracle sql array for the procedure
SQLParameter[] params = new SQLParameter[1];
Object obj0=javaArray;
params[0] = new SQLParameter(obj0, oracle.jdbc.OracleTypes.ARRAY, SQLParameter.IN);
// the code below calls the testFunc method in OJDBCtrl.jcx file
String succ= dbControl.testFunc(params);
OJDBCtrl.jcx
* @jc:sql statement="call CMNT_TST_PROC(?))"
String testFunc(SQLParameter[] param);
The stored procedure used:
TYPE SL_tab IS TABLE OF number INDEX BY PLS_INTEGER;
Procedure cmnt_tst_proc (cmnt_tst sl_tab);
Procedure cmnt_tst_proc (cmnt_tst sl_tab) is
BEGIN
dbms_output.put_line('Hello');
END;
I am getting the following exception
Failure=java.sql.SQLException: Fail to convert to internal representation: [I@438af4 [ServiceException]>
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java:861)
at oracle.sql.ARRAY.toARRAY(ARRAY.java:210)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:7768)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7449)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7837)
at oracle.jdbc.driver.OracleCallableStatement.setObject(OracleCallableStatement.java:4587)
at weblogic.jdbc.wrapper.PreparedStatement.setObject(PreparedStatement.java:244)
at com.bea.wlw.runtime.core.control.DatabaseControlImpl._setParameter(DatabaseControlImpl.jcs:1886)
at com.bea.wlw.runtime.core.control.DatabaseControlImpl.getStatement_v2(DatabaseControlImpl.jcs:1732)
at com.bea.wlw.runtime.core.control.DatabaseControlImpl.invoke(DatabaseControlImpl.jcs:2591)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:377)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:433)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:406)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:249)
at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(JcsContainer.java:85)
at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean.java:224)
at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.java:109)
at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_ly05hg_ELOImpl.java:153)
Can you please let me know, what i'm doing wrong and how i can pass an array to a procedure/function using java controls.
Any help will be highly appreciated.
Edited by: user12671762 on Feb 24, 2010 5:03 AM
Edited by: user9211663 on Feb 24, 2010 9:04 PMThanks Michael.
Here's the final code that i used, this might be helpful for those who face this problem
Java Code
// Following code gets the connection object
InitialContext ctx = new InitialContext();
dataSource = (DataSource)ctx.lookup("<DataSourceName>");
conn=dataSource.getConnection();
// Following code is used to create the array type from java
String query="CREATE OR REPLACE TYPE STR_ARRAY AS VARRAY(3) OF NUMBER";
dbControl.runTypeQuery(query);
// Following code is used to obtain the oracle sql array as SQLParameter
ArrayDescriptor desc = ArrayDescriptor.createDescriptor("<schemaName>.STR_ARRAY", conn);
Object[] elements = new Object[3];
elements[0] = new Integer(12);
elements[1] = new Integer(13);
elements[2] = new Integer(14);
oracle.sql.ARRAY newArray = new oracle.sql.ARRAY( desc, conn, elements);
SQLParameter[] params = new SQLParameter[1];
params[0] = new SQLParameter(newArray, oracle.jdbc.OracleTypes.ARRAY, SQLParameter.IN);
String succ= dbControl.testFunc(params); -
Passing an array as IN parameter to call a function
I have a function the definition is
TYPE VAR_VALUE_RECORD IS RECORD(VAR VARCHAR2(100),
VALUE VARCHAR2(100));
TYPE VAR_VALUE_TAB IS TABLE OF VAR_VALUE_RECORD;
FUNCTION GENERIC_WF(P_MSG_TYPE IN VARCHAR2,P_CDCS_NBR IN VARCHAR2, P_CDCS_SEQ IN VARCHAR2, P_DEBTORID IN NUMBER,
P_EXTRAS IN VAR_VALUE_TAB) RETURN VARCHAR2;
I am trying to call this function
select WF_NOTIFICATIONS_PKG.GENERIC_WF('Manual Debt Establish Notification','2009A13636','001',105195359,'this is a test') from dual
ERROR at line 1:
ORA-06553: PLS-306: wrong number or types of arguments in call to 'GENERIC_WF'
I am getting the above error, how do I pass the array as parameter.
I will appreciate your help.
ThnaksHi,
try this,
Create OR Replace Package WF_NOTIFICATIONS_PKG Is
Type VAR_VALUE_RECORD Is Record( VAR Varchar2(100)
, Value Varchar2(100));
Type VAR_VALUE_TAB Is Table Of VAR_VALUE_RECORD Index BY Pls_Integer;
Function GENERIC_WF( P_MSG_TYPE IN Varchar2
, P_CDCS_NBR IN Varchar2
, P_CDCS_SEQ IN Varchar2
, P_DEBTORID IN Number
, P_EXTRAS IN VAR_VALUE_TAB ) Return Varchar2;
End WF_NOTIFICATIONS_PKG;
Create OR Replace Package Body WF_NOTIFICATIONS_PKG Is
Function GENERIC_WF( P_MSG_TYPE IN Varchar2
, P_CDCS_NBR IN Varchar2
, P_CDCS_SEQ IN Varchar2
, P_DEBTORID IN Number
, P_EXTRAS IN VAR_VALUE_TAB ) Return Varchar2 Is
Begin
Return ( P_EXTRAS(P_EXTRAS.First).var || ' - ' || P_EXTRAS(P_EXTRAS.First).Value );
End GENERIC_WF;
End WF_NOTIFICATIONS_PKG;
SQL> Declare
2 v_value_Tab WF_NOTIFICATIONS_PKG.VAR_VALUE_TAB;
3 v_return Varchar2(100);
4 Begin
5 v_value_Tab(1).var := 'this is a test 1';
6 v_value_Tab(1).value := 'this is a test 2';
7
8 v_return := WF_NOTIFICATIONS_PKG.GENERIC_WF( 'Manual Debt Establish Notification'
9 , '2009A13636'
10 , '001'
11 , 105195359
12 , v_value_Tab );
13
14 Dbms_Output.put_line(v_return);
15 End;
16 /
this is a test 1 - this is a test 2
PL/SQL procedure successfully completedRegards,
Christian Balz -
Pass a variable number into an Action method from an array of buttons
Hello,
I have created an array of buttons like so:
private javax.swing.JButton[] barray = new JButton[8];
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(K8055_Card_Control.JavaElectrodeSwitches1App.class).getContext().getActionMap(JavaElectrodeSwitches1View.class, this);
for (int i=0;i<8;i++) // Create Output Check Boxes
barray[i] = new JButton();
barray.setAction(actionMap.get("ButtonPressed"));
barray[i].setName("Outbox"+ String.valueOf(i+1));
barray[i].setText("Electrode " + String.valueOf(i+1));
BoxLayout layout = new BoxLayout(jPanel1,BoxLayout.PAGE_AXIS);
barray[i].setAlignmentX(JCheckBox.CENTER_ALIGNMENT) ;
jPanel1.setLayout(layout);
jPanel1.add(barray[i]);
When a button is pressed it calls the method ButtonPressed()@Action
public void ButtonPressed()
// button pressed code here
My problem is that once the button has been pressed I don't know how to find out which button called the method. Each button operates a different switch.
I tried testing barray.isSelected(); however the ButtonPressed() method is only called once the button has released and is no longer selected.
Any ideas?
Thanks,Actually the answer to both of these questions is ActionEvent
do for instance:
JButton b = new JButton("test");
JButon b2 = new JButton("test2");
ActionListener al = new ActionListener() {
public void actionPerformed(ActionEvent ae) {
Object src = ae.getSource();
String cmd = ae.getActionCommand();
if (src == b) { //won't work unless you make b final
//or
if ("test".equals(cmd)) {
b.addActionListener(al);
b2.addActionListener(al); -
How do I pass an array of structs to a C function using the dll flexible prototype adapter?
What I want to do is pass into a C dll function a variably sized Array of structs of type TPS_Data. My Code compiles but when I run it in TestStand, I get an error -17001; Program Error. "Cannot allocate 0 size buffer Error in parameter 2, 'OpenFrdData'."
I've allocated the Array of structs, and all of the information is there before I call my function, so is it my prototype? Or am I asking too much of the DLL Flexible Prototype Adapter to pass an Array of Structs?
I can pass in a single struct of type TPS_Data and that works, but not an array.
Here's the relevent code:
typedef struct TPS_DATA
char Report_Number[256];
char System_Name[256];
char Open_Date[256];
char UUT_Part_Number[256];
char UUT_Serial_Number[256];
char UUT_Name[256];
char Open_Employee_Name[256];
char Open_Employee_Number[256];
char Close_Employee_Name[256];
char Close_Employee_Number[256];
char Close_Date[256];
} TPS_Data;
typedef struct TPS_DATA_ARRAY
TPS_Data DataRecord;
} TPS_DataArray;
long __declspec(dllexport) __stdcall OpenDialog (CAObjHandle Context, TPS_DataArray *TpsData[], const char *psFaultStr, char *sComments, const int nCount);OK,
I can pass the data to the DLL function, using the following types:
typedef struct StringArrayType
char string[10][256];
} StringArray;
typedef struct MultiStringArrayType
StringArray Record[10];
} MultiStringArray;
void __declspec(dllexport) __stdcall ATP_TestStructPassing(StringArray Strings)
return;
void __declspec(dllexport) __stdcall ATP_TestMultiStructPassing(MultiStringArray *Strings)
return;
But when the MultiStruct function Exits, TestStand reports an Error:
-17501 "Unexpected Operating System Error" Source: 'TSAPI'
There doesn't seem to be a way around this, and once the error occurs, I have to force quit TestStand. I've included the sequence file, and the dll code can be compiled from the fun
ctions shown above.
Any thoughts on how to get around this error would be greatly appreciated.
Attachments:
StructArrayPassing.seq 16 KB -
Passing an array of objects to a named query
I'm trying to use a named query that will have a
in() expression operator (clause) to retrieve a set of objects.
The in() operator requires an array of objects to pass in.
Specifically I want to pass an array of BigDecimal of unknown size.
The query looks like that:
ExpressionBuilder seq = new ExpressionBuilder();
Expression exp = seq.get("id").in(keys);
ReadAllQuery query = new ReadAllQuery();
query.setReferenceClass(RegistrationNumberSequencer.class);
query.addArgument("keys");
query.setSelectionCriteria(exp);
And the "keys" would be:
Object[] keys = new Object[2];
keys[0]= new BigDecimal(1);
keys[1]= new BigDecimal(2);
I have got a conversion exception(Could not convert to BigDecimal class) when executing the query.
Can I pass this array as a parameter somehow ?
Thanks a lot
OvidiuHi Ovidiu,
My apologies for the missed code. You need to pass the vector of elements into another vector, so TopLink will interpret the single element of the second vector as the correct query argument, and expend the elements in the first vector into the IN clause.
The named query defined I sent in previous mail is still correct, but you need to pass in the argument like:
Vector keys = new Vector();
keys.addElement(new BigDecimal(1));
keys.addElement(new BigDecimal(2));
Vector arg = new Vector(1);
arg.addElement(keys);
Now you can pass the arg in when executing the query, and should get the correct result.
To stand my claim, I did a mini test using our TopLink Employee demo and here is the generated SQL:
Call:SELECT t0.VERSION, t1.EMP_ID, t0.L_NAME, t0.F_NAME, t1.SALARY, t0.EMP_ID, t0.GENDER, t0.END_DATE, t0.START_DATE, t0.MANAGER_ID, t0.START_TIME, t0.END_TIME, t0.ADDR_ID FROM EMPLOYEE t0, SALARY t1 WHERE ((t0.EMP_ID IN (1, 2)) AND (t1.EMP_ID = t0.EMP_ID))
You can see the IN clause in generated as expected!
As Doug said, we do not officially support array as query argument yet. I would use the proper way to build the query.
King -
How to Pass String array from Java to PL/SQL and this use in CURSOR
hi,
I cant understand how to pass Array String as Input Parameter to the Procedure and this array use in Cursor for where condition like where SYMPTOM in( ** Array String **).
This array containing like (SYMPTOM ) to be returned from the java to the
pl/sql (I am not querying the database to retrieve the information).
I cannot find an example on this. I will give the PL/SQL block
create or replace procedure DISEASE_DTL<*** String Array ***> as
v_SYMPTOM number(5);
CURSOR C1 is
select distinct a.DISEASE_NAME from SYMPTOM_DISEASE_RD a
where ltrim(rtrim(a.SYMPTOM)) in ('Fever','COUGH','Headache','Rash') ------- ***** Here use this array element(like n1,n2,n3,n4,n5..) ******
group by a.DISEASE_NAME having count(a.DISEASE_NAME) > 3 ----------- ***** 3 is no of array element - 1 (i.e( n - 1))*****
order by a.DISEASE_NAME ;
begin
for C1rec IN C1 loop
select count(distinct(A.SYMPTOM)) into v_SYMPTOM from SYMPTOM_DISEASE_RD a where A.DISEASE_NAME = C1rec.DISEASE_NAME;
insert into TEMP_DISEASE_DTLS_SYMPTOM_RD
values (SL_ID_SEQ.nextval,
C1rec.DISEASE_NAME,
(4/v_SYMPTOM), --------**** 4 is no of array element (n)************
(1-(4/v_SYMPTOM)));
end loop;
commit;
end DISEASE_DTL;
Please give the proper solution and step ..
Thanking you,
AsishI've haven't properly read through your code but here's an artificial example based on a sql collection of object types - you don't need that, you just need a type table of varchar2 rather than a type table of oracle object type:
http://orastory.wordpress.com/2007/05/01/upscaling-your-jdbc-app/ -
Pass an array of a user defined class to a stored procedure in java
Hi All,
I am trying to pass an array of a user defined class as an input parameter to a stored procedure. So far i have done the following:
Step 1: created an object type.
CREATE TYPE department_type AS OBJECT (
DNO NUMBER (10),
NAME VARCHAR2 (50),
LOCATION VARCHAR2 (50)
Step 2: created a varray of the above type.
CREATE TYPE dept_array1 AS TABLE OF department_type;
Step 3:Created a package to insert the records.
CREATE OR REPLACE PACKAGE objecttype
AS
PROCEDURE insert_object (d dept_array);
END objecttype;
CREATE OR REPLACE PACKAGE BODY objecttype
AS
PROCEDURE insert_object (d dept_array)
AS
BEGIN
FOR i IN d.FIRST .. d.LAST
LOOP
INSERT INTO department
VALUES (d (i).dno,d (i).name,d (i).location);
END LOOP;
END insert_object;
END objecttype;
Step 4:Created a java class to map the columns of the object type.
public class Department
private double DNO;
private String Name;
private String Loation;
public void setDNO(double DNO)
this.DNO = DNO;
public double getDNO()
return DNO;
public void setName(String Name)
this.Name = Name;
public String getName()
return Name;
public void setLoation(String Loation)
this.Loation = Loation;
public String getLoation()
return Loation;
Step 5: created a method to call the stored procedure.
public static void main(String arg[]){
try{
Department d1 = new Department();
d1.setDNO(1); d1.setName("Accounts"); d1.setLoation("LHR");
Department d2 = new Department();
d2.setDNO(2); d2.setName("HR"); d2.setLoation("ISB");
Department[] deptArray = {d1,d2};
OracleCallableStatement callStatement = null;
DBConnection dbConnection= DBConnection.getInstance();
Connection cn = dbConnection.getDBConnection(false); //using a framework to get connections
ArrayDescriptor arrayDept = ArrayDescriptor.createDescriptor("DEPT_ARRAY", cn);
ARRAY deptArrayObject = new ARRAY(arrayDept, cn, deptArray); //I get an SQLException here
callStatement = (OracleCallableStatement)cn.prepareCall("{call objecttype.insert_object(?)}");
((OracleCallableStatement)callStatement).setArray(1, deptArrayObject);
callStatement.executeUpdate();
cn.commit();
catch(Exception e){
System.out.println(e.toString());
I get the following exception:
java.sql.SQLException: Fail to convert to internal representation
My question is can I pass an array to a stored procedure like this and if so please help me reslove the exception.
Thank you in advance.OK I am back again and seems like talking to myself. Anyways i had a talk with one of the java developers in my team and he said that making an array of structs is not much use to them as they already have a java bean/VO class defined and they want to send an array of its objects to the database not structs so I made the following changes to their java class. (Again hoping some one will find this useful).
Setp1: I implemented the SQLData interface on the department VO class.
import java.sql.SQLData;
import java.sql.SQLOutput;
import java.sql.SQLInput;
import java.sql.SQLException;
public class Department implements SQLData
private double DNO;
private String Name;
private String Location;
public void setDNO(double DNO)
this.DNO = DNO;
public double getDNO()
return DNO;
public void setName(String Name)
this.Name = Name;
public String getName()
return Name;
public void setLocation(String Location)
this.Location = Location;
public String getLoation()
return Location;
public void readSQL(SQLInput stream, String typeName)throws SQLException
public void writeSQL(SQLOutput stream)throws SQLException
stream.writeDouble(this.DNO);
stream.writeString(this.Name);
stream.writeString(this.Location);
public String getSQLTypeName() throws SQLException
return "DOCCOMPLY.DEPARTMENT_TYPE";
Step 2: I made the following changes to the main method.
public static void main(String arg[]){
try{
Department d1 = new Department();
d1.setDNO(1);
d1.setName("CPM");
d1.setLocation("LHR");
Department d2 = new Department();
d2.setDNO(2);
d2.setName("Admin");
d2.setLocation("ISB");
Department[] deptArray = {d1,d2};
OracleCallableStatement callStatement = null;
DBConnection dbConnection= DBConnection.getInstance();
Connection cn = dbConnection.getDBConnection(false);
ArrayDescriptor arrayDept = ArrayDescriptor.createDescriptor("DEPT_ARRAY", cn);
ARRAY deptArrayObject = new ARRAY(arrayDept, cn, deptArray);
callStatement = (OracleCallableStatement)cn.prepareCall("{call objecttype.insert_array_object(?)}");
((OracleCallableStatement)callStatement).setArray(1, deptArrayObject);
callStatement.executeUpdate();
cn.commit();
catch(Exception e){
System.out.println(e.toString());
and it started working no more SQLException. (The changes to the department class were done manfully but they tell me JPublisher would have been better).
Regards,
Shiraz -
Is there a way to pass an array or structure for example as parameters, in addition to a query, or multiple queries to the Report Builder in CF8? I believe this was recommended by users to be in CF8.
BrianO,
Although it's been a while, I thought I'd provide the code to do this for you. It works for me in CF8, and probably will in CF7.
Here I create a structure called My, and provide that one parameter to my CFReportParam tag.
<CFSet My = {
Client = "Client Name",
ReportDateFrom = DateFormat(ThisStartDate, DateMask),
ReportDateTo = DateFormat(ThisEndDate, DateMask),
PageHeaderImage = ImagePath & "\Logos\Page_Header.png",
WatermarkImage = ImagePath & "\Logos\Watermark.png",
GetBarSummary = GetBarSummary,
GetPieSummary = GetPieSummary
}>
<CFReport Template="#ReportPath#\SpendSummary.cfr" Format="PDF" Query="GetSummary">
<CFReportParam Name="My" Value="#My#">
</CFReport>
Inside the report itself, reference the given parameter as Param.My.PageHeaderImage for example. It can be referenced that way from any expression inside the report builder. You can even use the queries as the data source for charts (using the Data From a Query -> Query Builder -> Advanced) by entering "Param.My.GetPieSummary" where it says "Variable containing query object".
HTH
Swift -
Error passing byte array in soap request
Hi,
i am trying to pass byte arrays (and also java.lang.Byte array) as parameter in
a soap request.
to do so i have defined a simple web service under weblogic 7.0.
then i test it through the WebLogic Webservice standard testing home page.
the value field for testing my web service is already filled by weblogic with:
<bytes xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xsd:base64Binary">aopd</bytes>
i only need to invoke my web service to test it.
then an exception is raised:
javax.xml.soap.SOAPException: failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException:
error decoding base64binary - with nested exception: [java.io.IOException: Error
in encoded stream] javax.xml.soap.SOAPException: failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException:
error decoding base64binary - with nested exception: [java.io.IOException: Error
in encoded stream] at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:301)
at weblogic.webservice.tools.pagegen.SampleInstance.getJavaObject(SampleInstance.java:130)
at weblogic.webservice.server.servlet.ServletBase.getJavaParams(ServletBase.java:296)
at weblogic.webservice.server.servlet.ServletBase.invokeOperation(ServletBase.java:239)
at weblogic.webservice.server.servlet.WebServiceServlet.invokeOperation(WebServiceServlet.java:306)
at weblogic.webservice.server.servlet.ServletBase.handleGet(ServletBase.java:198)
at weblogic.webservice.server.servlet.ServletBase.doGet(ServletBase.java:124)
at weblogic.webservice.server.servlet.WebServiceServlet.doGet(WebServiceServlet.java:224)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5412)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:744)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3086)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2544)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
any idea?Hi,
Looks like a known bug (CR087883).
Thanks,
Bruce
cyrille puget wrote:
Hi,
i am trying to pass byte arrays (and also java.lang.Byte array) as parameter in
a soap request.
to do so i have defined a simple web service under weblogic 7.0.
then i test it through the WebLogic Webservice standard testing home page.
the value field for testing my web service is already filled by weblogic with:
<bytes xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xsd:base64Binary">aopd</bytes>
i only need to invoke my web service to test it.
then an exception is raised:
javax.xml.soap.SOAPException: failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException:
error decoding base64binary - with nested exception: [java.io.IOException: Error
in encoded stream] javax.xml.soap.SOAPException: failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException:
error decoding base64binary - with nested exception: [java.io.IOException: Error
in encoded stream] at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:301)
at weblogic.webservice.tools.pagegen.SampleInstance.getJavaObject(SampleInstance.java:130)
at weblogic.webservice.server.servlet.ServletBase.getJavaParams(ServletBase.java:296)
at weblogic.webservice.server.servlet.ServletBase.invokeOperation(ServletBase.java:239)
at weblogic.webservice.server.servlet.WebServiceServlet.invokeOperation(WebServiceServlet.java:306)
at weblogic.webservice.server.servlet.ServletBase.handleGet(ServletBase.java:198)
at weblogic.webservice.server.servlet.ServletBase.doGet(ServletBase.java:124)
at weblogic.webservice.server.servlet.WebServiceServlet.doGet(WebServiceServlet.java:224)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5412)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:744)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3086)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2544)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
any idea? -
Dear All.
Help Me...
English is not very good. Google translator is used.
How do I pass an array of strings?
Please refer to the VB program
===========================================
Private Sub m_btn_Click()
Dim nReturn As Long
Dim sPpid As String
Dim sMdln As String
Dim sSoftRev As String
Dim nCount As Long
Dim saCCodes(2) As String
Dim naPCount(2) As Long
Dim saPNames(10) As String
sPpid = "PPID001"
sMdln = "Mdln"
sSoftRev = "Rev001"
nCount = 2
saCCodes(0) = "1"
naPCount(0) = 5
saPNames(0) = "Param001"
saPNames(1) = "Param002"
saPNames(2) = "Param003"
saPNames(3) = "Param004"
saPNames(4) = "Param005"
saCCodes(1) = "2"
naPCount(1) = 5
saPNames(5) = "Param006"
saPNames(6) = "Param007"
saPNames(7) = "Param008"
saPNames(8) = "Param009"
saPNames(9) = "Param010"
nReturn = m_XGem.GEMReqSend(sPpid, sMdln, sSoftRev, nCount, saCCodes(0), naPCount(0), saPNames(0))
If (nReturn = 0) Then
Call Me.AddMessage("[EQ ==> XGEM] GEMReqSend successfully")
Else
Call Me.AddMessage("[EQ ==> XGEM] Fail to GEMReqSend (" & nReturn & ")")
End If
End Sub
=================================================
nCount, naPCount enough saCCodes, saPNames value must be sent.
How to handle an array of strings in LabView is impatient.
I want to VB program implemented in LabView.Have you actually tried to right click on the according node parameter and select Create->Constant or Create-Control??
And I don't see any string array in the parameter list. That are all simple strings and the VB code in your first post clearly shows that the call to the function only indexes the first element of those arrays to be passed to the function, not the entire array.
If the function really reads arrays despite being declared as only taking strings then it is using some weirdo VB trickery and there will be no way to replicate that in LabVIEW.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions
Maybe you are looking for
-
How do you check if your iphone 5s is unlocked?
how do you check if your iphone 5s is unlocked.... tried to check it through imei.info not showing any data
-
Hi all, I have a rather complex WD4A application with many windows and views. As it seems, one of its component has become to large now, I get the following error at every activation: "Load unit of component is very large (generation limit)" I have l
-
Safari stops responding arter using reading list.
I had a problem with my computer today. My iMac 2012 haven't been launching. After desctop shows of earlier everything have been shuting down and I could see the screen like Kernel Panic, but with the message "there was a problem...press a key or wai
-
When I need to get a photo book printed from an online photo book printer, I first have to rasterize all of my pages from InDesign. To do this I export a high res PDF and then rasterize each page in photoshop. My question is about the sRGB color spac
-
I am trying to find out why the Photo books I ordered from Iphoto cant be sent to france which is where I live most of the time