Passing boolean values to DLL
Hi,
Currently I am using VB .NET to pass a boolean to a DLL... i've tried this with Strings and did not have a problem... but when i want to pass booleans over, i got a 'System.EntryPointNotFoundException' error ...
i suspect the problem lies with LabVIEW not accepting boolean as 'True' or 'False', or '1' or '0'... or am i wrong?? any help is greatly appreciated ...
attached is a simple code... hope i did it correctly...
Best Regards,
JQ
LV 8.0 user...
Attachments:
display.zip 66 KB
JQ wrote:
thanks tst and dave... i think this may be the problem ...
In LabVIEW, a Boolean is one byte. In Microsoft Visual Basic, a Boolean is two bytes. In Microsoft Visual Basic, if you declare variables as Booleans, the memory becomes corrupted or overwritten. Instead, you must declare each variable as one byte. The Booleans are passed by ref because they are set up as pointers to values.
quoted from: http://zone.ni.com/devzone/cda/tut/p/id/3188#toc1
although this is VB... but i think VB and VB .NET should be using the same data type.. if i succeed i'll inform you guys again... thanks a lot for the help...
And in Win32 API a BOOL is 32 bit. It's amazing how even Microsoft can not decide what is best.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions
Similar Messages
-
Java & Acces: pass boolean values
Ok I'm totally new at this so the following text will hopefully be understandable. I hope you guys can give me a hand over here.
The case:
I'm making a java function that has to create a new user of my database. This user is supposed to get a name, a password and can have 4 functions (Administrator, Author, Reader, Coreader).
To identify the 4 functions i used a checkbox in my database. So when the box is checked the person is a Admin/author/... Now I was wondering how i can use Java (using a query) to set these values checked or non-checked.
I thought I'd use booleans, however, my compiler says there is a General Error (all the names of the columns are right, so that's not the deal, my database is working properly and such, ...)
So here's my code:
(note that i used these marks ' ' here for the booleans, i tried all kinds of things such as dropping them, using them, ... it doesn't seem the problem...)
public void addNewUser(String username, String password, boolean admin, boolean author, boolean reader, boolean coreader)
String query1 = "UPDATE user SET username = '" + username + "' AND password = '"
+ password + "' AND administrator = '" + admin + "' AND author ='" + author
+ "' AND reader ='" + reader + "' AND coreader ='" + coreader + "'";
try
stmt = global.createStatement();
stmt.executeUpdate(query1);
global.showMessage("The new user, " + username + ", has been added successfuly", "Succesfuly added");
catch(Exception e)
global.showError("An error has occured while connecting to the database" + e.toString(), "SQL Error");
finally
global.closeConnection();
Hope you guys can help. Thanks a lot!It's possible to do this; it's just that your SQL syntax is completely wrong. An SQL UPDATE statement looks as follows:
UPDATE table SET column1 = value1, column2 = value2, column3 = value3 WHERE expression
You're using 'AND' instead of commas, which is the first thing that goes wrong. The second thing that goes wrong is that you're building the SQL statement from bits of string and values. This is a habit that many novice programmers use, and open the door wide for SQL injection attacks. I you do this sort of thing on a web site, you could end up with your customers' credit card details being exposed.
But because you're just passing the boolean values into the string, they get expanded to a string value, hence TRUE or FALSE. However, because they are string literals, they should be surrounded by single quotes.
This brings us to the third problem: you're using an UPDATE statement to insert a new record. Use an INSERT statement instead.
It would be better to use a PreparedStatement. In this case, your code would look as follows:
PreparedStatement stmt =
global.prepareStatement( "INSERT INTO user " +
"( username, password, administrator, author, reader, coreader ) " +
"VALUES ( ?, ?, ?, ?, ?, ? )" );
stmt.setString( 1, username );
stmt.setString( 2, password );
stmt.setBoolean( 3, admin );
stmt.setBoolean( 4, author );
stmt.setBoolean( 5, reader );
stmt.setBoolean( 6, coreader );I have no idea whether this will work: I don't know Access, and booleans are not a standard feature of SQL. I also don't know whether Microsoft have created their own flavour of SQL, as they are wont to do with any standard.
All in all, though, you have to really work on your SQL. Three major mistakes in such a simple piece of code means that you don't understand SQL syntax. You may copy and paste this for your assignment, but unless you understand what you're actually doing, you're going to run into trouble again very soon.
- Peter -
Passing booleans to LabView dll
I have created a Labview vi (7.1) that I have converted to a dll which uses a cluster of Booleans as a input. I set Test Stand (2.0) to pass a Structure (1 byte boundary) with Booleans as the data type (Test Stand also asks for a numeric type for some reason); is this the correct method? I get the message 'no type information in the dll' when loading the dll from Test Stand, is this normal for Structure/Cluster passing?
Hi Steve,
the No type information relates to the parameters being passed, so you have to make it up yourself in TestStand to match the setup you've given in LabVIEW when you built the .dll
LabVIEW packages booleans as U8's, so that's why it's asking for a number - there is no BOOL type itself - we address by byte only.
http://digital.ni.com/public.nsf/websearch/DBCE27265FFB554986256C9400026FE8?OpenDocument
This means that booleans are essentially a complex type, however useing U8s instead uses the same amount of space, and if you're not using clusters to simply keep them together, then you'll get prototype information out.
Useful other threads below :
http://forums.ni.com/ni/board/message?board.id=170&message.id=122260&requireLogin=False
http://forums.ni.com/ni/board/message?board.id=330&message.id=6140&requireLogin=False
Hope that helps
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer -
Pass a value to a dll under labview
I have to build a dll under cvi and use it under labview. my problem is to pass a value to this dll from labview.
But when I use it, labview return an error code and close the software...
I can return value from the dll to labwiew but not the contrary. can you help me please.
I am a beginner and I am sorry for my english..."
don't think it's a calling convention beceause When I use the box "call a dll" in labview and I select my dll, I can see all functions I have create in the dll (just the extern functions). for the datatype, I use int or unsigned int and sometimes char. and I can receive this value in labwiew...
but for the pointer that's certainly my problem
this is the sourcecode of my function. I drive a digital
to analogue converter and I want to select the exit (There is 4 exit 0x00,01,10,11 )and a voltage (0 to 255 in décimal):
void __stdcall dac_sortie_tension (int sortie, int tension)
outp(LPT1+0x000,4); /* not important*/
outp(LPT1+0x400,sortie);
outp(LPT1+0x000,2); /* ecriture de l'adresse2*/
outp(LPT1+0x400,0x00); /* not important*/
outp(LPT1+0x000,3); /* not important*/
outp(LPT1+0x400,tension);/*write voltage*/
if I use a constant to "sortie" & "tension" it's OK...
I try to use this:
void __stdcall dac_sortie_tension (int *sortie, int *tension)
but it's the same..."
when I select the fonction in labview, I can see them
but there isn't argument' ("sortie" & "tension") and I have a void like this:
void fonction (void)
what is the problem..
I can give argument to the function but there aren't used..."/*draven*/;
You need to configure the function manually. Once you select the dll and select the function, select the button Add a Parameter After. You can change the name of the parameter to sortie, keep the Data Type as long and then change the Pass field to Pointer to Value. Click again the Add a Parameter After button and do the same for the your variable "tension".
For more information about calling external code in LabVIEW, refer to the following document (which should be also included with LabVIEW):
Using External Code in LabVIEW
Instructions on-line are here:
An Overview of Accessing DLLs or Shared Libraries from LabVIEW
Check also examples here:
Communicating with External Applications
Regards;
Enrique Vargas
www.visecurity.com
www.vartortech.com -
How to Pass Parameter/Value to the second page????
Hi,
I am trying to display same popup window when I click on ADD,UPDATE and VIEW buttons. I don’t have any problem in displaying the popup when I click on ADD and UPDATE button but with VIEW button I wanted to display the popup at read only mode. In order to do that I have created a bean with session scope and set a ‘SetActionListener‘on VIEW button and set ‘from’ property to true and ‘to’ property to "#{IndividualSummaryDetails.readOnlyAddress}". I could not pass the value of readOnlyAddress to the popup. How can I pass the value of readOnlyAddress to the popup?
This value becomes true when I click on view button. If I pass that value to the popup then I can set the read only property of the fields on the popup with that value. So that the fields become read only.
Here is my View button
<af:commandButton text="#{CoreProperties['Global.commandButton.View']}"
windowHeight="450" windowWidth="600"
useWindow="true"
action="dialog:FromIndividualSummaryDetailsToAddress"
id="justView">
<af:setActionListener from="#{true}"
to="#{IndividualSummaryDetails.readOnlyAddress}"/>
Here is my Bean
public class IndividualSummaryDetails {
private Boolean readOnlyAddress;
public IndividualSummaryDetails() {
readOnlyAddress = true;
public Boolean isReadOnlyAddress() {
return readOnlyAddress;
public void setReadOnlyAddress(Boolean readOnlyAddress) {
this.readOnlyAddress = readOnlyAddress;
This value becomes true when I click on view button. If I pass that value to the popup then I can set the read only property of the fields on the popup with that value. So that the fields become read only.
Message was edited by:
V.PirabaWe need to use portlet events for sending parameters across different pages.
Following documents can give you insight on this :
1. http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/PRIMER.PORTLET.PARAMETERS.EVENTS.HTML
2. http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/DESIGNING.PAGES.USING.PDKJAVA.SAMPLE.EVENT.WEB.PROVIDER.HTML
-AMJAD. -
Passing multiple values to the QUERY BDOC parameter?
hi All,
Below is my Query BDOC Anchor Before Query Execute even handler... I'm trying to pass multiple values to the bq.Z_PartnerFunction query parameter... i.e.
PARTNER_FCT in( '00000012','ZDIVMGR','ZAREADR')
is it possible without creating new Query Bdoc ?
====================================
Private Sub aempchoicewinTCWSearchTAnchor_beforeQueryExecute(ByRef bq As BusinessQuery, ByRef cancel As Boolean)
If Not bq Is Nothing Then
If sWcDummy = "Yes" Then
bq.WcDummy = sWcDummy
End If
bq.Z_PartnerFunction = "00000012"
If ctrlZ_Territory.Value <> "" Then
bq.PRNB_TerrID = "*" & ctrlZ_Territory.Value
End If
End If
End Sub
================================
Thanks in advance
HetalHi,
it looks that you already enhanced the query BDoc because you have a new query parameter bq.Z_PartnerFunction, right?
To which BDoc parameter is this BQ parameter mapped? And how looks the related where clause?
For a single filter normally a "=" operator is used. Therefore your example with "in" won't work.
If these three partner functions are fixed then you might hardcoded them directly in the where clause (supposed the BDoc is not used somewhere else where you don't want to have this filter).
Or you might add 3 new BDoc parameters, add 3 new where clauses using a disjunction for them (and using an embracing bracket). In this case always all these 3 BQ parameters need to be filled (or all stay empty) to avoid a SQL syntax error.
Regards,
Wolfhard -
Passing variant values in job_submit FM
Hi Guys,
I am running a report in background using job_submit FM.
Currently I am using Get and Set parameters to pass selection screen values.
But these values are not effective when run in background.
If variant is an option, how to populate the variant from selection screen values.
ThanksHi,
U follow the given code. If u have taken varinat as parameter then ok.
other wise u have to pass rs_create_varaint* function module in the program.
DATA : v_jobhead LIKE tbtcjob.
DATA : v_jobcount LIKE tbtcjob-jobcount.
DATA : v_eventparm LIKE tbtcjob-eventparm.
DATA : v_flg_released TYPE c.
DATA: e_error.
DATA: running LIKE tbtcv-run.
TYPES: esp1_boolean LIKE boole-boole.
CONSTANTS: esp1_false TYPE esp1_boolean VALUE ' ',
esp1_true TYPE esp1_boolean VALUE 'X'.
CONSTANTS: true TYPE boolean VALUE esp1_true,
false TYPE boolean VALUE esp1_false.
PARAMETERS: v_jobnam LIKE tbtcjob-jobname,
v_report LIKE sy-repid,
v_varian LIKE raldb-variant,
v_uname LIKE sy-uname.
START-OF-SELECTION.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = v_jobnam
IMPORTING
jobcount = v_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
e_error = true.
ELSE.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = v_uname
jobcount = v_jobcount
jobname = v_jobnam
report = v_report
variant = v_varian
EXCEPTIONS
bad_priparams = 1
bad_xpgflags = 2
invalid_jobdata = 3
jobname_missing = 4
job_notex = 5
job_submit_failed = 6
lock_failed = 7
program_missing = 8
prog_abap_and_extpg_set = 9
OTHERS = 10.
IF sy-subrc <> 0.
e_error = true.
ELSE.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = v_jobcount
jobname = v_jobnam
strtimmed = 'X'
IMPORTING
job_was_released = v_flg_released
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
e_error = true.
ELSE.
DO.
CALL FUNCTION 'SHOW_JOBSTATE'
EXPORTING
jobcount = v_jobcount
jobname = v_jobnam
EXCEPTIONS
jobcount_missing = 1
jobname_missing = 2
job_notex = 3
OTHERS = 4.
IF sy-subrc <> 0.
e_error = true.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF running = space.
exit.
endif.
enddo.
endif.
endif.
endif.
Regards,
Naveen M. -
How can I pass a value to the command prompt?
I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?
Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
There are also overloaded forms of exec(),
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
Another lower level approach that does not require extension associations to be quite as well set up is:
Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
Note that
rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
Start the script with #!bash or whatever the interpreter's name is.
Mark the script file itself with the executable attribute.
Alternatively start the script interpreter, e.g.
Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}"; -
Pass a value to a class that extends AbstractTableModel
Hi
I have a problem with a table model that I cannot find a way of overcoming.
I have created a class called MyTableModel that extends AbstractTableModel.
MyTableModel creates and uses another class that I have defined in order to retrieve records from a database, MyTableModel fills the table with these records.
However, I wish to alter my class in order to provide an int parameter that will act as a �where� value in the classes sql query.
The problem is this, I cannot work out how to pass a value into MyTableModel. I have tried creating a simple constructor in order to pass the value but it doesn�t work.
My code is shown below:
import BusinessObjects.JobItemClass;
import DBCommunication.*;
import java.util.ArrayList;
import javax.swing.table.AbstractTableModel;
public class MyJobItemTableModel extends AbstractTableModel
public MyJobItemTableModel(int j)
jobNo = j;
int jobNo;
JobAllItems jobItems = new JobAllItems(jobNo);
ArrayList items = jobItems.getItems();
String columnName[] = { "Item Number", "Item Description", "Cost per item", "Quantity" };
int c = items.size();
Class columnType[] = { Integer.class, String.class, Double.class, Integer.class };
Object table[][] = new Object[c][4];
public void fillTable()
if(c > 0)
for (int i = 0; i < c; i = i + 1)
this.setValueAt(((JobItemClass) items.get(i)).getItemNumber(), i, 0);
this.setValueAt(((JobItemClass) items.get(i)).getDescription(), i, 1);
this.setValueAt(((JobItemClass) items.get(i)).getCostPerItem(), i, 2);
this.setValueAt(((JobItemClass) items.get(i)).getQuantity(), i, 3);
public void setJobNo(int s)
jobNo = s;
public int getColumnCount()
if(c > 0)
return table[0].length;
else
return 0;
public int getRowCount()
return table.length;
public Object getValueAt(int r, int c)
return table[r][c];
public String getColumnName(int column)
return columnName[column];
public Class getColumnClass(int c)
return columnType[c];
public boolean isCellEditable(int r, int c)
return false;
public void setValueAt(Object aValue, int r, int c)
table[r][c] = aValue;
}Any advice will be appreciated.
Many Thanks
GByour JobAllItems is created before constructor code is run (since it is initialized in class member declaration)
use something like
public MyJobItemTableModel(int j)
jobNo = j;
items = (new JobAllItems(jobNo)).getItems();
c = items.size();
table = new Object[c][4];
int jobNo;
ArrayList items;
String columnName[] = { "Item Number", "Item Description", "Cost per item", "Quantity" };
int c;
Class columnType[] = { Integer.class, String.class, Double.class, Integer.class };
Object table[][] ;instead of
public MyJobItemTableModel(int j)
jobNo = j;
int jobNo;
JobAllItems jobItems = new JobAllItems(jobNo);
ArrayList items = jobItems.getItems();
String columnName[] = { "Item Number", "Item Description", "Cost per item", "Quantity" };
int c = items.size();
Class columnType[] = { Integer.class, String.class, Double.class, Integer.class };
Object table[][] = new Object[c][4]; -
Pass report values to another dashboard?
HI all,
I have two reports say, Report1, Report2 in a Dashboard. Report1 is in one page and Report2 in another page of that dashboard.
Say Report2 has these columns.
gl company |||||||| gl account |||||||||||product||||||||||||||| balance
User has to click on any product value in this report and then, it should take the user to another report Report3 in another dashboard(or same dashboard). BUT, Report3 is from a different fact than Report1, Report2.
When the user clicks on Product values of Report2, the corresponding gl company, gl account, product values must be passed on to REPORT 3 (they act as criteria for Report 3) How can we pass on these values to REPORT3 which is based on another fact?
I can use "navigation" But, that passes the values to report3 ONLY if that is based off the same fact as of the other two reports.correct?
Btw I am using OBIEE 10.1.3.4.1I was using this link for the Go URL .
I have used this code for "Product" field of REPORT 2.
'<--a href=http://localhost:9704/analytics/saw.dll?GO&
path=/shared/Development/Report3
&Action=Navigate
&P0=1
&P1=eq
&P2="Fact - Table1"."product"
&P3='||" Fact - Table2"."product"||'
style="text-decoration:none;">'
||
'<--/a>'
I have used text -decoration : none attribute too. But I am unable to see any values in PRODUCT column in REPORT2. It is BLANK
One more thing is that, I tried replacing the spaces in table name by %20 in the above code. But it was throwing an error. hence I had to keep it as it is.
Any idea why it wouldn't show me the product values?
Any help appreciated. Thanks, -
About passing multiple values in parameter for oracle report
https://docs.google.com/file/d/0B0dx7wf68mD0QzdpbWU4UGNURTQ/edit
Hi all,
i want to pass multiple value using , to separate them 1,2,3....
here is my query
SELECT DISTINCT
oh.header_id
,oh.org_id
,to_char(oh.ordered_date,'DD-MON-YYYY') d_date
,to_char(oh.ordered_date+31,'DD-MON-YYYY') d_validity
,oh.ship_to_org_id
,oh.invoice_to_org_id
,oh.cust_po_number d_po_num
,rcust.customer_id AS customer_id
,oh.order_number d_salesorder_no
,oh.cust_po_number d_project
,oh.attribute1 second_addr
,oh.attribute2 remark1
,oh.attribute3 remark2
,substr(oh.transactional_curr_code,1,3) as currency
,tyl.name ordertype
,oh.salesrep_id
,rat.name as d_payment_term
,rat.description d_payment_desc
,rsa.name
,rsa.email_address as sales_phone
,rcust.customer_name||' - #'||rcust.customer_number d_to_custname
,rcust.customer_name d_cust_sign
,rcust.attribute1
,rcust.customer_number
-- ,raddr.ship_to_flag
,oh.sold_to_contact_id AS attn_id
,rcust.party_id
,tyl.name AS SO_type
-- ,net_org.ORG_LOGO
FROM
oe_order_headers_all oh
,ra_customers rcust
,ra_addresses_all raddr
,ra_site_uses_all rsite --double_line
,ra_terms rat
,hz_party_sites hps
,hz_contact_points hcp
,ra_salesreps_all rsa
,oe_transaction_types_tl tyl
-- ,apps.ar_contacts_v acv
-- ,net_org
WHERE oh.sold_to_org_id = rcust.customer_id
AND oh.payment_term_id = rat.term_id(+)
--AND rcust.customer_id = acv.customer_id(+)
AND oh.salesrep_id = rsa.salesrep_id
AND oh.order_type_id = tyl.transaction_type_id
AND rcust.party_id = raddr.party_id
AND raddr.address_id = rsite.address_id
AND rcust.party_id = hps.party_id
AND hps.party_site_id = hcp.owner_table_id(+)
AND hcp.owner_table_name(+) = 'HZ_PARTY'
--AND hcp.contact_point_type (+)='PHONE'
AND tyl.LANGUAGE = userenv('LANG')
--AND raddr.ship_to_flag IS NULL
AND upper(tyl.name) in ('SW SALES CONTRACT','SW-NSC SALES CONTRACT','TILES SALES CONTRACT','VBP SAMPLE ORDER', 'VBP INTERNAL ORDER')
AND oh.order_number =:P_CONTRACT_NO
and oh.org_id = :P_ORG_ID
--and net_org.org_id = :P_ORG_ID
&CP_Param
and after para form
function AfterPForm return boolean is
begin
:CP_Param := 'where oh.order_number in ('||:P_CONTRACT_NO||')';
return (TRUE);
end;
it said ora-00933 but my query can run i dont need the multiple values para, can anyone help me how to modify the report so it can pass multipel values thanksHI I tried changing the parameter width to a larger value, it can output , and the field where I show the order_number i used source P_CONTRACT_NO,
it will display as 102005000,102005001 and I also tried using the column from the query directly, it will be separated , it has some other problem
I have the header part and main part,
and also there are page numbering, with the order number field set as order_number it will output single number , but the page order is wrong
102005000,102005001 will be like header page: 102005000 1/4 102005001 2/4, main page 102005000 3/4, 102005001 3/4
DO you have any idea how I can set the page numbering setting so it will output as header page:102005000 1/2 102005000 2/2
header page:102005001 1/2 102005001 2/2
?? thanks -
Passing boolean parameters to Oracle
Hello there everyone.
I have just started to work with Oracle stored procedures. I
have written a procedure that takes a boolean value as one of its
input parameters, but I cannot find out how to get Coldfusion to
pass the value in correctly. If I execute the procedure within the
Oracle client itself it works OK but CF always gives the error
"PLS-00306: wrong number or types of arguments in call to
'PROC_TEST' ORA-06550: line 1, column 7: PL/SQL: Statement
ignored", no matter how I try to pass my boolean value. I have
tried to use all combinations of CF_SQL_BIT and CF_SQL_INTEGER and
"1" and "true" and "TRUE" in the <cfprocparam> tag, but none
of them are working. I guess I could change the code to use an
integer instead, but using a boolean for this example makes the
most sense.
If anyone has any ideas, that would be great.
Regards
Barry.Hi Phil thanks for replying!
I continued searching Google and came up with the same
conclusion you mention. Here are a couple of links:
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#34_05
http://www.utexas.edu/its/unix/reference/oracledocs/v92/B10501_01/java.920/a96654/tips.htm #1005343
What a strange situation to be in. On one hand they say that
"booleans" can't be used outside of PL/SQL, but what ARE stored
procedures if not PL/SQL? Musing about this does not move us
forward though I think.
I will change my boolean parameter to be something more SQL
(without the PL!) friendly.
Thanks for getting back to me.
Barry -
Passing Enum Values to a common method.Please see
How do I pass the value of an Enum to a method?
I have an Enum called myEnums with several values to a common method
public enum MYEnums {
FULL,
EMPTY,
PARTIAL
CPTY_CODE;
//Invoke
isEmpty(myEnums.FULL)
isEmpty(myEnums.EMPTY)
// common method
isEmpty(String enumValue){
myEnum.enumValue
ERROR: enumValue cannot be resolvedYou could also write this:
public enum FillLevel
FULL,
EMPTY,
PARTIAL;
public boolean isEmpty() {
return this == EMPTY;
public boolean isFull() {
return this == FULL;
}By the way. What does CPTY_CODE mean? It doesn't seem as if it belongs into the enum. Also, why doesn't the enum have a name that tells us what it's all about? -
//Initialize the Engine
EngineClass myEngine = new EngineClass();
myEngine.LoadTypePaletteFilesEx(TypeConflictHandlerTypes.ConflictHandler_Prompt, 0);
Step myStep = myEngine.NewStep(AdapterKeyNames.DotNetAdapterKeyname,StepTypes.StepType_Action);
myStep.Name = "object";
DotNetModule dotnetmodule = myStep.Module as DotNetModule;
dotnetmodule.SetAssembly(DotNetModuleAssemblyLocations.DotNetModule_AssemblyLocation_File,@"C:sequence.dll");
dotnetmodule.ClassName = "CN";
dotnetmodule.MemberType = DotNetModuleMemberTypes.DotNetMember_GetProperty;
dotnetmodule.MemberName = "ISI";
mySequence.Locals.NewSubProperty("object", PropertyValueTypes.PropValType_Reference, false, "", 0);
Sequence mySequence = myEngine.NewSequence();
mySequence.Locals.NewSubProperty(varName, PropertyValueTypes.PropValType_Reference, false, String.Empty, 0);
mySequence.InsertStep(myStep, 0, StepGroups.StepGroup_Main);
SequenceFile seqFile = myEngine.NewSequenceFile();
seqFile.InsertSequence(mySequence);
seqFile.Save("C:\\mySeq.seq");
I have done this,dynamically creating a sequence file in teststand programatically through c#.
Problem is
1.I created an action step and object Reference variable for the step, but i am not able to pass parameter values to the objectReference
2.I am not able to load the sequence in to the main Sequence of the sequence file in the teststand. How can I do these two things.Hi,
have you ever followed on my Links ?!?!?
If not please jump to this one
http://forums.ni.com/ni/board/message?board.id=330&thread.id=26880
and read the the answer from Mannoch
starting with this words:
Anthony -
Currently, functionality for retrieving the Metadata Token for a class constructor or member is not fully provided in the TestStand .NET Adapter API. The DotNetModule.GetConstructorMetadataToken() and DotNetModule.GetMetadataToken() methods only return the correct Metadata Token when the member/constructor prototypes have already been loaded. Thus, in the case of your code, when you call DotNetModule.GetMetadataToken(), the method is returning -1 because the member prototype for the Step you are referring to has not yet been loaded.
That means have to do a workaround for your stuff.
Juergen
=s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e= -
TryParse not passing correct values?
All,
I'm trying to parse text box input to an integer. Then based on the value of that integer a sub will set values for various other variables (integers). Then the integers that are obtained from the sub are passed to a sb.appendline.
I am doing this for about 20 text boxes. However, sometimes it works and sometimes it doesn't. Sometimes every line in the text file will contain the correct quotas (integers). Sometimes the first line in the text file contains
all zeros for the quotas and the rest of the lines in the text file contain the correct quotas. Sometimes all of the lines will contain either incorrect values for the quotas or all zeros for the quotas.
I am baffled as to why. Any help would be greatly appreciated.
James
Public Class Form1
Public inBW As Integer
Public outBW As Integer
Public inTCP As Integer
Public inUDP As Integer
Public inICMP As Integer
Public inIGMP As Integer
Public outTCP As Integer
Public outUDP As Integer
Public outICMP As Integer
Public outIGMP As Integer
Public tempInt As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim FileName As String
Dim FileNameAndPath As String
FileName = "Test.txt"
FileNameAndPath = IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, FileName)
Dim sb As New System.Text.StringBuilder
'Get Bandwidth 1 Quotas
Integer.TryParse(txtInboundBW1.Text, inBW)
Integer.TryParse(txtOutboundBW1.Text, outBW)
Get_Quotas()
'Write Bandwidth 1 quotas to file
sb.AppendLine(("create Quotas -bw_in ") & txtInboundBW1.Text & (" -bw_out ") & txtOutboundBW1.Text & (" -in_tcp_quota " & inTCP & " -in_udp_quota " & inUDP & " -in_icmp_quota " & inICMP & " -in_igmp_quota " & inIGMP & " -out_tcp_quota " & outTCP & " -out_udp_quota " & outUDP & " -out_icmp_quota " & outICMP & " -out_igmp_quota " & outIGMP))
'Get Bandwidth 2 Quotas
Integer.TryParse(txtInboundBW2.Text, inBW)
Integer.TryParse(txtOutboundBW2.Text, outBW)
Get_Quotas()
'Write Bandwidth 2 quotas to file
sb.AppendLine(("create Quotas -bw_in ") & txtInboundBW2.Text & (" -bw_out ") & txtOutboundBW2.Text & (" -in_tcp_quota " & inTCP & " -in_udp_quota " & inUDP & " -in_icmp_quota " & inICMP & " -in_igmp_quota " & inIGMP & " -out_tcp_quota " & outTCP & " -out_udp_quota " & outUDP & " -out_icmp_quota " & outICMP & " -out_igmp_quota " & outIGMP))
SaveFileDialog1.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.Desktop
SaveFileDialog1.FileName = FileName
SaveFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"
If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
IO.File.WriteAllText(SaveFileDialog1.FileName, sb.ToString)
Process.Start(SaveFileDialog1.FileName)
End If
End Sub
Public Sub Get_Quotas()
'5,000 kbps = 80,50,10,10
'10,000 kbps = 75,50,9,9
'100,000 kbps= 75,50,2,2
'1,000,000 kbps= 75,50,1,1
'10,000,000 kbps= 75,50,1,1
'40,000,000 kbps= 75,50,1,1
If inBW > 0 And inBW <= 5000 Then
inTCP = 80
inUDP = 50
inICMP = 10
inIGMP = 10
End If
If outBW > 0 And outBW <= 5000 Then
outTCP = 80
outUDP = 50
outICMP = 10
outIGMP = 10
End If
If inBW > 5000 And inBW <= 10000 Then
inTCP = 70
inUDP = 50
inICMP = 9
inIGMP = 9
End If
If outBW > 5000 And outBW <= 10000 Then
outTCP = 70
outUDP = 50
outICMP = 9
outIGMP = 9
End If
If inBW > 10000 And inBW <= 100000 Then
inTCP = 70
inUDP = 50
inICMP = 2
inIGMP = 2
End If
If outBW > 10000 And outBW <= 100000 Then
outTCP = 70
outUDP = 50
outICMP = 2
outIGMP = 2
End If
If inBW > 100000 And inBW <= 4000000 Then
inTCP = 70
inUDP = 50
inICMP = 1
inIGMP = 1
End If
If outBW > 100000 And outBW <= 4000000 Then
outTCP = 70
outUDP = 50
outICMP = 1
outIGMP = 1
End If
End Sub
End ClassVersion with XML comments (IntelliSense support):
Option Strict On
Option Explicit On
Option Infer Off
Namespace James
Public Class BandwidthPolicy
''' <summary>
''' An enumerator for the policy type (currently five).
''' </summary>
''' <remarks></remarks>
Public Enum PolicyType
Global_Policy
Web_Policy
Mail_Policy
FTP_Policy
DNS_Policy
End Enum
Private _global_PolicyQuota As BandwidthQuota
Private _web_PolicyQuota As BandwidthQuota
Private _mail_PolicyQuota As BandwidthQuota
Private _fTP_PolicyQuota As BandwidthQuota
Private _dNS_PolicyQuota As BandwidthQuota
Public Sub New()
End Sub
''' <summary>
''' Gets the DNS policy quota.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property DNS_PolicyQuota As BandwidthQuota
Get
Return _dNS_PolicyQuota
End Get
End Property
''' <summary>
''' Gets the FTP policy quota.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property FTP_PolicyQuota As BandwidthQuota
Get
Return _fTP_PolicyQuota
End Get
End Property
''' <summary>
''' Gets the Global policy quota.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property Global_PolicyQuota As BandwidthQuota
Get
Return _global_PolicyQuota
End Get
End Property
''' <summary>
''' Gets the Mail policy quota.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property Mail_PolicyQuota As BandwidthQuota
Get
Return _mail_PolicyQuota
End Get
End Property
''' <summary>
''' Gets the Web policy quota.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property Web_PolicyQuota As BandwidthQuota
Get
Return _web_PolicyQuota
End Get
End Property
''' <summary>
''' A method to set the policy quota for any of the policy types.
''' This method requires that you have already created/initialized
''' the BandwidthQuota.
''' </summary>
''' <param name="type">The enumerator to indicate which policy type
''' to initialize.</param>
''' <param name="bq">The instance of PolicyType to set this policy
''' to.</param>
Public Sub SetPolicy(ByVal type As PolicyType, _
ByVal bq As BandwidthQuota)
Try
Select Case type
Case PolicyType.DNS_Policy
_dNS_PolicyQuota = bq
Case PolicyType.FTP_Policy
_fTP_PolicyQuota = bq
Case PolicyType.Global_Policy
_global_PolicyQuota = bq
Case PolicyType.Mail_Policy
_mail_PolicyQuota = bq
Case PolicyType.Web_Policy
_web_PolicyQuota = bq
End Select
Catch ex As Exception
Throw
End Try
End Sub
''' <summary>
''' A method to set the policy quota for any of the policy types.
''' This method will create/initialize the BandwidthPolicy for any
''' of the policy types.
''' </summary>
''' <param name="type">The enumerator to indicate which policy
''' type to initialize.</param>
''' <param name="bandwidthIn">The bandwidth input value.</param>
''' <param name="bandwidthOut">The bandwidth output value.</param>
''' <remarks></remarks>
Public Sub SetPolicy(ByVal type As PolicyType, _
ByVal bandwidthIn As Integer, _
ByVal bandwidthOut As Integer)
Try
Select Case type
Case PolicyType.DNS_Policy
_dNS_PolicyQuota = New BandwidthQuota(bandwidthIn, bandwidthOut)
Case PolicyType.FTP_Policy
_fTP_PolicyQuota = New BandwidthQuota(bandwidthIn, bandwidthOut)
Case PolicyType.Global_Policy
_global_PolicyQuota = New BandwidthQuota(bandwidthIn, bandwidthOut)
Case PolicyType.Mail_Policy
_mail_PolicyQuota = New BandwidthQuota(bandwidthIn, bandwidthOut)
Case PolicyType.Web_Policy
_web_PolicyQuota = New BandwidthQuota(bandwidthIn, bandwidthOut)
End Select
Catch ex As Exception
Throw
End Try
End Sub
''' <summary>
''' A method which will return a formatted string indicating the
''' values of the BandwidthQuota for any of the policy types.
''' </summary>
''' <param name="type">The enumerator to indicate which policy type
''' to retrieve.</param>
''' <param name="throwIfNotInitialized">OPTIONAL: A boolean value
''' indicating whether or not to throw an exception if the policy
''' type chosen has not been initialized. Default: False.</param>
''' <returns></returns>
''' <remarks></remarks>
Public Function GetFormattedString(ByVal type As PolicyType, _
Optional ByVal throwIfNotInitialized As Boolean = False) As String
Dim retVal As String = String.Empty
Try
Dim bq As BandwidthQuota
Select Case type
Case PolicyType.DNS_Policy
If _dNS_PolicyQuota.BW_In > 0 AndAlso _dNS_PolicyQuota.BW_Out > 0 Then
bq = _dNS_PolicyQuota
With bq
retVal = _
String.Format("create DNSPolicy" & _
" -bw_in {0}" & _
" -bw_out {1}" & _
" -in_tcp_quota {2}" & _
" -in_udp_quota {3}" & _
" -in_icmp_quota {4}" & _
" -in_igmp_quota {5}" & _
" -out_tcp_quota {6}" & _
" -out_udp_quoata {7}" & _
" -out_icmp_quota {8}" & _
" -out_igmp_quota {9}", _
.BW_In, .BW_Out, .TCP_In, _
.UDP_In, .ICMP_In, .IGMP_In, _
.TCP_Out, .UDP_Out, .ICMP_Out, _
.IGMP_Out)
End With
Else
If throwIfNotInitialized Then
Throw New ArgumentException("The DNS policy has not been initialized.")
End If
End If
Case PolicyType.FTP_Policy
If _fTP_PolicyQuota.BW_In > 0 AndAlso _fTP_PolicyQuota.BW_Out > 0 Then
bq = _fTP_PolicyQuota
With bq
retVal = _
String.Format("create FTPPolicy" & _
" -bw_in {0}" & _
" -bw_out {1}" & _
" -in_tcp_quota {2}" & _
" -in_udp_quota {3}" & _
" -in_icmp_quota {4}" & _
" -in_igmp_quota {5}" & _
" -out_tcp_quota {6}" & _
" -out_udp_quoata {7}" & _
" -out_icmp_quota {8}" & _
" -out_igmp_quota {9}", _
.BW_In, .BW_Out, .TCP_In, _
.UDP_In, .ICMP_In, .IGMP_In, _
.TCP_Out, .UDP_Out, .ICMP_Out, _
.IGMP_Out)
End With
Else
If throwIfNotInitialized Then
Throw New ArgumentException("The FTP policy has not been initialized.")
End If
End If
Case PolicyType.Global_Policy
If _global_PolicyQuota.BW_In > 0 AndAlso _global_PolicyQuota.BW_Out > 0 Then
bq = _global_PolicyQuota
With bq
retVal = _
String.Format("create GlobalPolicy" & _
" -bw_in {0}" & _
" -bw_out {1}" & _
" -in_tcp_quota {2}" & _
" -in_udp_quota {3}" & _
" -in_icmp_quota {4}" & _
" -in_igmp_quota {5}" & _
" -out_tcp_quota {6}" & _
" -out_udp_quoata {7}" & _
" -out_icmp_quota {8}" & _
" -out_igmp_quota {9}", _
.BW_In, .BW_Out, .TCP_In, _
.UDP_In, .ICMP_In, .IGMP_In, _
.TCP_Out, .UDP_Out, .ICMP_Out, _
.IGMP_Out)
End With
Else
If throwIfNotInitialized Then
Throw New ArgumentException("The Global policy has not been initialized.")
End If
End If
Case PolicyType.Mail_Policy
If _mail_PolicyQuota.BW_In > 0 AndAlso _mail_PolicyQuota.BW_Out > 0 Then
bq = _mail_PolicyQuota
With bq
retVal = _
String.Format("create MailPolicy" & _
" -bw_in {0}" & _
" -bw_out {1}" & _
" -in_tcp_quota {2}" & _
" -in_udp_quota {3}" & _
" -in_icmp_quota {4}" & _
" -in_igmp_quota {5}" & _
" -out_tcp_quota {6}" & _
" -out_udp_quoata {7}" & _
" -out_icmp_quota {8}" & _
" -out_igmp_quota {9}", _
.BW_In, .BW_Out, .TCP_In, _
.UDP_In, .ICMP_In, .IGMP_In, _
.TCP_Out, .UDP_Out, .ICMP_Out, _
.IGMP_Out)
End With
Else
If throwIfNotInitialized Then
Throw New ArgumentException("The Mail policy has not been initialized.")
End If
End If
Case PolicyType.Web_Policy
If _web_PolicyQuota.BW_In > 0 AndAlso _web_PolicyQuota.BW_Out > 0 Then
bq = _web_PolicyQuota
With bq
retVal = _
String.Format("create WebPolicy" & _
" -bw_in {0}" & _
" -bw_out {1}" & _
" -in_tcp_quota {2}" & _
" -in_udp_quota {3}" & _
" -in_icmp_quota {4}" & _
" -in_igmp_quota {5}" & _
" -out_tcp_quota {6}" & _
" -out_udp_quoata {7}" & _
" -out_icmp_quota {8}" & _
" -out_igmp_quota {9}", _
.BW_In, .BW_Out, .TCP_In, _
.UDP_In, .ICMP_In, .IGMP_In, _
.TCP_Out, .UDP_Out, .ICMP_Out, _
.IGMP_Out)
End With
Else
If throwIfNotInitialized Then
Throw New ArgumentException("The Web policy has not been initialized.")
End If
End If
End Select
Catch ex As Exception
Throw
End Try
Return retVal
End Function
End Class
Public Structure BandwidthQuota
Private Enum InOut
Input
Output
End Enum
''' <summary>
''' Gets the minimum value for bandwidth.
''' </summary>
''' <remarks>Note that this is "hard-coded".</remarks>
Public Shared ReadOnly MinValue As Integer = 1
''' <summary>
''' Gets the maximum value for bandwidth.
''' </summary>
''' <remarks>Note that this is "hard-coded".</remarks>
Public Shared ReadOnly MaxValue As Integer = 40000000
Private _bW_In As Integer
Private _bW_Out As Integer
Private _tCP_In As Integer
Private _tCP_Out As Integer
Private _uDP_In As Integer
Private _uDP_Out As Integer
Private _iCMP_In As Integer
Private _iCMP_Out As Integer
Private _iGMP_In As Integer
Private _iGMP_Out As Integer
''' <summary>
''' The constructor for this structure.
''' </summary>
''' <param name="bandwidthIn">The value of the input bandwidth.</param>
''' <param name="bandwidthOut">The value of the output bandwidth.</param>
''' <remarks></remarks>
Public Sub New(ByVal bandwidthIn As Integer, _
ByVal bandwidthOut As Integer)
Try
If bandwidthIn < MinValue Then
Throw New _
ArgumentOutOfRangeException("Bandwidth In", _
"The minimum value is " & _
MinValue.ToString & _
" kBPS")
ElseIf bandwidthIn > MaxValue Then
Throw New _
ArgumentOutOfRangeException("Bandwidth In", _
"The maximum value is " & _
MaxValue.ToString & _
" kBPS")
ElseIf bandwidthOut < MinValue Then
Throw New _
ArgumentOutOfRangeException("Bandwidth Out", _
"The minimum value is " & _
MinValue.ToString & _
" kBPS")
ElseIf bandwidthOut > MaxValue Then
Throw New _
ArgumentOutOfRangeException("Bandwidth Out", _
"The maximum value is " & _
MaxValue.ToString & _
" kBPS")
Else
_bW_In = bandwidthIn
_bW_Out = bandwidthOut
ComputeValues(bandwidthIn, InOut.Input)
ComputeValues(bandwidthOut, InOut.Output)
End If
Catch ex As Exception
Throw
End Try
End Sub
''' <summary>
''' Gets the value of the input bandwidth.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property BW_In() As Integer
Get
Return _bW_In
End Get
End Property
''' <summary>
''' Gets the value of the output bandwidth.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property BW_Out() As Integer
Get
Return _bW_Out
End Get
End Property
''' <summary>
''' Gets the value for the input ICMP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property ICMP_In() As Integer
Get
Return _iCMP_In
End Get
End Property
''' <summary>
''' Gets the value for the output ICMP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property ICMP_Out() As Integer
Get
Return _iCMP_Out
End Get
End Property
''' <summary>
''' Gets the value for the input IGMP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property IGMP_In() As Integer
Get
Return _iGMP_In
End Get
End Property
''' <summary>
''' Gets the value for the output IGMP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property IGMP_Out() As Integer
Get
Return _iGMP_Out
End Get
End Property
''' <summary>
''' Gets the value for the input TCP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property TCP_In() As Integer
Get
Return _tCP_In
End Get
End Property
''' <summary>
''' Gets the value for the output TCP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property TCP_Out() As Integer
Get
Return _tCP_Out
End Get
End Property
''' <summary>
''' Gets the value for the input UDP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property UDP_In() As Integer
Get
Return _uDP_In
End Get
End Property
''' <summary>
''' Gets the value for the output UDP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property UDP_Out() As Integer
Get
Return _uDP_Out
End Get
End Property
Private Sub ComputeValues(ByVal value As Integer, _
ByVal io As InOut)
If value > 0 AndAlso value <= 5000 Then
SetValues(80, 50, 10, 10, io)
ElseIf value > 5000 AndAlso value <= 10000 Then
SetValues(75, 50, 9, 9, io)
ElseIf value > 10000 AndAlso value <= 100000 Then
SetValues(75, 50, 2, 2, io)
ElseIf value > 100000 AndAlso value <= 40000000 Then
SetValues(75, 50, 1, 1, io)
End If
End Sub
Private Sub SetValues(ByVal tcp As Integer, _
ByVal udp As Integer, _
ByVal icmp As Integer, _
ByVal igmp As Integer, _
ByVal io As InOut)
Select Case io
Case InOut.Input
_tCP_In = tcp
_uDP_In = udp
_iCMP_In = icmp
_iGMP_In = igmp
Case InOut.Output
_tCP_Out = tcp
_uDP_Out = udp
_iCMP_Out = icmp
_iGMP_Out = igmp
End Select
End Sub
End Structure
End Namespace
Still lost in code, just at a little higher level.
Maybe you are looking for
-
Error while exporting data from ABAP to Excel
Hello All, iam trying to download data from ABAP scrn to Excel using I_OI_SPREADSHEET METHODS. I get an error in method 'SET_RANGES_DATA' - 'Memory protection fault occurred in document interface'. I have pasted my code below. Kindly help me to solve
-
Since upgrading to I-Tunes 5.0 (and 5.0.1.4), I can no longer synch my Ipod. I must manually add songs and update playlists. When the Ipod is set to automatically update songs and playlists, during connection ITunes flashes "Ipod is Updating", but no
-
Crackled phone line and incredibly slow BB connect...
Hi Im having serious issues with my phone line and BB connection. It has been ongoing for some time, roughly 6-8 weeks. The line becomes crackly with noise becoming so bad at times, you cannot hear the other person on the phone. This usually occurs i
-
Download install error because it is not supported in iTunes
I just downloaded Flash Player update (Adobe) but when I go to install it an error pops up that it is not authorized? i.e. flash player no longer resides in iTunes though it is a FREE app. I know this happened only because I did an OS (Mountain Lion)
-
Soundcloud Widget in Flash CS4 with AS2?
Hi I am making a band website for a friend and they want me to put their soundcloud widget onto the website so people can listen to their music on the website, I've looked all over for a tutorial or even a code I could put in but no luck! I have thei