how to pass query to dataset

Posted by Oswaldlily under ASP.NET on 9/26/2011 | Points: 10 | Views : 1424 | Status : [Member] | Replies : 7
I have written my query in stored procedure

In mapper,I have created a function and called this storedprocedure as follows:

Public Function Report(ByVal Id As String, ByVal name As String, ByVal employAs String)
dim dc as DataContextDataContext = New DataContextDataContext
Dim a = dc.storedprocedurename(id,name,employ)
Return a
End Function

In my vb.net codings,I have called this mapper as follows
dim mapper as linqmapper
Dim b= mapper.Report(id,name,employ)

Now i need to pass this "b" to dataset..
Suggest me some ideas




Responses

Posted by: Blessyjees on: 9/26/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi,

Your question is not clear. What is the value of "b". what is the purpose to pass these value to dataset.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 9/26/2011 [Member] Starter | Points: 25

Up
0
Down

@Blessyjees
"b" is just object....

I need count of my tables..so i need to pass to dataset

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 9/26/2011 [Member] Bronze | Points: 25

Up
0
Down
hi,

I know that is object. I am asking the type of object, i.e. dataset, datatable etc..

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 9/26/2011 [Member] Starter | Points: 25

Up
0
Down
that is assigned not as dataset or datatable

just dim a-one variable...

If i assigned to dataset directly it gives me error..
thats what i assigned in this way

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Niladri.biswas on: 9/26/2011 [Member] Platinum | Points: 25

Up
0
Down
Hi,
you have to type cast it to dataaset object inorder to get the dataset properties.

Best Regards,
Niladri Biswas

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 9/26/2011 [Member] Starter | Points: 25

Up
0
Down
how to use cast here??

can u suggest one code

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 9/26/2011 [Member] Bronze | Points: 25

Up
0
Down
Oswaldlily,

Ok. But what will return the method mapper.Report(id,name,employ)
I am not asking the return type, what is the data i.e is it the storedprocedure result(data from the database)

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response