Hi,
Unfortunately there isn't any direct solution to accomplish this issue. But I written Visual Basic code in my asp.net project then I could use querybean data which return from CFC service.how??
That's it:
Imports System.Data
Partial Class test
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim srv As New tr.com.domain.www.Service
Dim qbean As tr.com.domain.www.QueryBean
qbean = srv.iller 'returns city names and their ids in querybean
Dim dtable As New DataTable
dtable = maketable(qbean.columnList)
Dim odata As Object
Dim row As DataRow = Nothing
Dim icount As Integer = 0
Dim i As Integer
For i = 0 To qbean.data.Length - 1
odata = qbean.data(i)
row = dtable.NewRow
For Each oloopdata As Object In odata
row(icount) = oloopdata
icount = icount + 1
Public Function maketable(ByVal scolumns() As String) As DataTable
Dim dtable As DataTable
dtable = New DataTable("dtable")
Dim dcolumn As DataColumn
Dim columnname As String
For Each columnname In scolumns
dcolumn = New DataColumn(columnname, Type.GetType("System.String"))
dtable.Columns.Add(dcolumn)
Next
Return dtable
End Function
<cffunction name="iller" access="remote" returntype="query" output="false">
<cfset var qryIslem = ""/>
<cfquery name="qryIslem" datasource="#request.dsn#">
select IL_ID as ID, AD
from TBL_ILLER
where 0=0
order by AD
</cfquery>
<cfreturn qryIslem/>
</cffunction>
To improve your example, I sent above ColdFusion web service code. This ColdFusion function, returns a Query datatype. Your ASP.NET code converts the ColdFusion query (QueryBean) datatype to ASP.NET DataTable datatype.
---
Esref Atak
Say It With You're In Good Hand With Ottoman.
<cffunction name="iller" access="remote" returntype="query" output="false">
<cfset var qryIslem = ""/>
<cfquery name="qryIslem" datasource="#request.dsn#">
select IL_ID as ID, AD
from TBL_ILLER
where 0=0
order by AD
</cfquery>
<cfreturn qryIslem/>
</cffunction>
To improve your example, I sent above ColdFusion web service code. This ColdFusion function, returns a Query datatype. Your ASP.NET code converts the ColdFusion query (QueryBean) datatype to ASP.NET DataTable datatype.
---
Esref Atak
Say It With You're In Good Hand With Ottoman.
esrefatak,
Can you explain further on your example. I have a CFC that looks identical to that (except the query) but i still cant parse the QueryBean data with VB.net.
Or is there any other solutions?
Any help would be greatly appreciated.
I'm using VB.net 2005
Can you explain further on your example. I have a CFC that looks identical to that (except the query) but i still cant parse the QueryBean data with VB.net.
Or is there any other solutions?
Any help would be greatly appreciated.
I'm using VB.net 2005
gk
Did occur an error? Write in here the error message. Did you applied above solution? Are you sure that your CFC function is correct? To sure; call the function via:
Bookmarks