Hi,
Got this C# WebService I must Use :
[WebMethod]
public double BackwardPerf(ref double[] pRet, double[] pValues)
{
FinanceLibMapperClass mapperLib = new UBPFinanceLibMapperClas();
System.Array pRetArray = (System.Array) pRet;
System.Array pValuesArray = (System.Array) pValues;
double res=mapperLib.BackwardPerf(ref pRetArray, ref pValuesArray);
//pRetArray is correctly filled
return res;
}
So, in my app, I try this :
Dim pRetVector() As Double
ReDim pRetVector(pValues.Rows.Count - 1)
oWsLibFin.AAMG_BackwardPerf(pRetVector, pValues)
'pRetVector = {(0,0,0.....)
Return pRetVector
If I make a break point in the Web Service when the doubleArray is
filled, I can see the values... But in the end, pRetVector is a All
Zero Values array...
The ByRef declaration does not seem to work.
Do I Miss something ?
Thks for help. 2 2429
I have the same problem using dataset as parameter.
may someone help us?
"Franck" wrote: Hi, Got this C# WebService I must Use : [WebMethod] public double BackwardPerf(ref double[] pRet, double[] pValues) { FinanceLibMapperClass mapperLib = new UBPFinanceLibMapperClas(); System.Array pRetArray = (System.Array) pRet; System.Array pValuesArray = (System.Array) pValues; double res=mapperLib.BackwardPerf(ref pRetArray, ref pValuesArray); //pRetArray is correctly filled return res; }
So, in my app, I try this : Dim pRetVector() As Double ReDim pRetVector(pValues.Rows.Count - 1) oWsLibFin.AAMG_BackwardPerf(pRetVector, pValues) 'pRetVector = {(0,0,0.....) Return pRetVector
If I make a break point in the Web Service when the doubleArray is filled, I can see the values... But in the end, pRetVector is a All Zero Values array...
The ByRef declaration does not seem to work. Do I Miss something ?
Thks for help.
Ref value, especially array, often work badly.
I suggest you use DataSet instead.
"Mauricio Pires" <Ma***********@discussions.microsoft.com> wrote in message
news:D0**********************************@microsof t.com... I have the same problem using dataset as parameter. may someone help us?
"Franck" wrote:
Hi, Got this C# WebService I must Use : [WebMethod] public double BackwardPerf(ref double[] pRet, double[] pValues) { FinanceLibMapperClass mapperLib = new UBPFinanceLibMapperClas(); System.Array pRetArray = (System.Array) pRet; System.Array pValuesArray = (System.Array) pValues; double res=mapperLib.BackwardPerf(ref pRetArray, ref pValuesArray); //pRetArray is correctly filled return res; }
So, in my app, I try this : Dim pRetVector() As Double ReDim pRetVector(pValues.Rows.Count - 1) oWsLibFin.AAMG_BackwardPerf(pRetVector, pValues) 'pRetVector = {(0,0,0.....) Return pRetVector
If I make a break point in the Web Service when the doubleArray is filled, I can see the values... But in the end, pRetVector is a All Zero Values array...
The ByRef declaration does not seem to work. Do I Miss something ?
Thks for help.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Alin Popovici |
last post by:
Hi!
I have this problem. I am sending as a parameter for a
webmethod a string containing '\r\n' sequences. For some
reason, when I debug my webmethod, the paramter is
received with the carriage...
|
by: Peter McEvoy |
last post by:
Folks,
I've been building a Webservice API for a contract that will be exposed to
the internet at large. There are two endpoints, and each endpoint contains a
number of webmethods. Every...
|
by: **Developer** |
last post by:
Notice below I sometimes used the "A" version. I found by cut-and-try that
only the "A" version would work correctly. Anyone have a suggestion of why
the "W" version would not work correctly?
...
|
by: Brien King |
last post by:
If I have a parameter that has an Object type (as opposed to something like
a string), can I make that parameter a CONST?
Right now, if you pass an object into a sub/function, that sub/function...
|
by: DazedAndConfused |
last post by:
I converted a C# example of using dll crypt32 to VB .NET. The converted
example fails when Encypting/Decypting. I found that if instead of defining
a variable as and setting the values for...
|
by: MrDotNet |
last post by:
Hi
I want pass NameValueCollection as parameter in webmethod.
I try it but that give me error.
Here is Error.
You must implement the Add(System.String) method on...
|
by: John |
last post by:
Hi
Is it possible to pass a whole record to a webmethod? How?
Thanks
Regards
|
by: Geoff |
last post by:
In this code I am trying to pass an image, as a parameter, out of the
procedure PickCard. The code will not support this. How do I pass an image
as a parameter?
Thanks again
Geoff
|
by: JB |
last post by:
Hi All,
I'm pulling my hair over this and could really do with a bit of help.
I'm using various different enums as bit fields and I'd like to create
a set of generic Functions or Subs to...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |