Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field passing
Message
From
15/02/2006 12:26:43
 
 
To
15/02/2006 12:07:00
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Miscellaneous
Thread ID:
01096481
Message ID:
01096525
Views:
16
I get the compile error when I call the method. Is there something different to do when passing an array as a parameter?

Here's the code I have now:
// server is defined elsewhere and is working just fine. One row is returned in ds
DataSet ds = server.GetDemoByPk(100);

// Two errors occur on the next line
ArrayList dso = ConvertField(ds.Tables["Demo"].Rows[0][10]);

// ConvertField is defined in the same class as the above code
ArrayList ConvertField(byte[] theData)
{
  ArrayList result = new ArrayList();
  return result;
}
Error 1:
The best overload method match for 'ConvertField(byte[])' has some invalid arguments.

Error 2:
Argument '1': cannot convert from 'object' to 'byte[]'

I tried casting the field to byte[], then got the following error on the same line:
An object reference is required for the nonstatic field, method, or property 'ConvertField(byte[])'

>And what line gives you the error message?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform