Error7Argument not specified for parameter 'record' of 'Public Shared Function Create(record As System.Data.IDataRecord) As oUserApplication'.C:\VisualStudio\SourceControl\Replatform\WebServices\UserWS\UserWS\ProcessUser.vb111777UserWS
any ideas ?
O lawal
Asp.net/Ajax Developer/Freelancer
Minneapolis Minnesota
You should add 'AddressOf ' before your reference to the Create method in the GetData call. So
Dim result = Myextentions.GetData(Of oUserApplication)(oRD, AddressOf oUserApplication.Create)
Or even better:
Dim result = oRD.GetData(Of oUserApplication)(AddressOf oUserApplication.Create)
You know; extension method style. That should work.
Menno
DOh sorry I was an idiot , the seccond call worked as well, Just had to recompile lol
thanks !! , this new code will add a ton of efficeincy and speed to my application , using generic collections and no more datasets , we used to fill a dataset and then convert it to our generic collection of objects ugh!
O lawal
Asp.net/Ajax Developer/Freelancer
Minneapolis Minnesota
ola_lawal
Member
35 Points
22 Posts
Problem Calling a VB extention method
Feb 23, 2012 05:13 PM|LINK
I converted some code from c# for a VB.net project
I have an object declared as this :
here is the extention method i am trying to call
Asp.net/Ajax Developer/Freelancer
Minneapolis Minnesota
Menno van de...
Contributor
2764 Points
391 Posts
Re: Problem Calling a VB extention method
Feb 23, 2012 06:18 PM|LINK
You should add 'AddressOf ' before your reference to the Create method in the GetData call. So
Or even better:
You know; extension method style. That should work.
Menno
ola_lawal
Member
35 Points
22 Posts
Re: Problem Calling a VB extention method
Feb 23, 2012 06:51 PM|LINK
You are Awesme Menno, thanks the AddressOf before the refrence worked for my original call.
you are right I should use the extention method properly with youe secceond way of calling it however
I cannot Access Getdata using oRD which is actually a record set
Not sure why any ideas on why ? My extention method is part of an external library which is imported into the calling Project
:
Asp.net/Ajax Developer/Freelancer
Minneapolis Minnesota
ola_lawal
Member
35 Points
22 Posts
Re: Problem Calling a VB extention method
Feb 23, 2012 06:56 PM|LINK
DOh sorry I was an idiot , the seccond call worked as well, Just had to recompile lol
thanks !! , this new code will add a ton of efficeincy and speed to my application , using generic collections and no more datasets , we used to fill a dataset and then convert it to our generic collection of objects ugh!
Asp.net/Ajax Developer/Freelancer
Minneapolis Minnesota