Help!
I am a VS .NET ASP rookie, I would like to retrive XML data from a web service, and place the data in a local dataset in a web form and display in a datagrid on the screen. I am just tring to ask a simple question on the form.
Enter Booking # textbox1
Then I have a button to click to get the results XML via the web service.
I have the ASP form working with a textbox, button, and a web referance to my XML data. I placed the code to retrive the XML data in the button. When I click the button it gets
stuck on the lcRetVal = Myservice.FindBookNo(textbox1.text) line, I never get to the response line. If I rem out this line I get the response. I thought if I can get this simple display to work, then I would try using the local dataset again. Any help with just having the XML go right to a dataset would be great, I cant seam to find any good examples in the help or microsoft kb.
Thanks,
Current code in the button click on the ASP page.
Dim lcRetVal As String
Dim Myservice As New server1.GetUnitData()
lcRetVal = Myservice.FindBookNo(Textbox1.Text)
Response.Write("The booking data. " & lcRetVal)
I would like to loose the Response line and add a dataset.
This is the working VFP8 web service that I created, this works from foxpro and other sources. The VB .NET web reference read the site and methods fine.
DEFINE CLASS GetUnitData AS Session OLEPUBLIC
PROCEDURE FindContNo(contno AS Character) AS String
LOCAL loXMLAdapter AS XMLAdapter
LOCAL lcXMLUnits AS String
mUnitNo=ALLTRIM(contno)+'%'
loXMLAdapter = CREATEOBJECT("XMLAdapter"
USE c:\ds3_320\data\curunits shared
SELECT container,chassis,booking_no ;
FROM curunits ;
WHERE container LIKE mUnitno ;
INTO CURSOR xmlUnits
loXMLAdapter.AddTableSchema("xmlUnits"
loXMLAdapter.UTF8Encoded = .T.
loXMLAdapter.ToXML("lcXMLUnits"
CLOSE DATABASES ALL
RETURN lcXMLUnits
ENDPROC
PROCEDURE FindChasNo(chasno AS Character) AS String
LOCAL loXMLAdapter AS XMLAdapter
LOCAL lcXMLUnits AS String
mUnitNo=ALLTRIM(chasno)+'%'
loXMLAdapter = CREATEOBJECT("XMLAdapter"
USE c:\ds3_320\data\curunits shared
SELECT container,chassis,booking_no ;
FROM curunits ;
WHERE chassis LIKE mUnitno ;
INTO CURSOR xmlUnits
loXMLAdapter.AddTableSchema("xmlUnits"
loXMLAdapter.UTF8Encoded = .T.
loXMLAdapter.ToXML("lcXMLUnits"
CLOSE DATABASES ALL
RETURN lcXMLUnits
ENDPROC
PROCEDURE FindBookNo(bookno AS Character) AS String
LOCAL loXMLAdapter AS XMLAdapter
LOCAL lcXMLUnits AS String
mUnitNo=ALLTRIM(bookno)
loXMLAdapter = CREATEOBJECT("XMLAdapter"
USE c:\ds3_320\data\curunits shared
SELECT container,chassis,booking_no ;
FROM curunits ;
WHERE booking_no = mUnitno ;
INTO CURSOR xmlUnits
loXMLAdapter.AddTableSchema("xmlUnits"
loXMLAdapter.UTF8Encoded = .T.
loXMLAdapter.ToXML("lcXMLUnits"
CLOSE DATABASES ALL
RETURN lcXMLUnits
ENDPROC
ENDDEFINE
I am a VS .NET ASP rookie, I would like to retrive XML data from a web service, and place the data in a local dataset in a web form and display in a datagrid on the screen. I am just tring to ask a simple question on the form.
Enter Booking # textbox1
Then I have a button to click to get the results XML via the web service.
I have the ASP form working with a textbox, button, and a web referance to my XML data. I placed the code to retrive the XML data in the button. When I click the button it gets
stuck on the lcRetVal = Myservice.FindBookNo(textbox1.text) line, I never get to the response line. If I rem out this line I get the response. I thought if I can get this simple display to work, then I would try using the local dataset again. Any help with just having the XML go right to a dataset would be great, I cant seam to find any good examples in the help or microsoft kb.
Thanks,
Current code in the button click on the ASP page.
Dim lcRetVal As String
Dim Myservice As New server1.GetUnitData()
lcRetVal = Myservice.FindBookNo(Textbox1.Text)
Response.Write("The booking data. " & lcRetVal)
I would like to loose the Response line and add a dataset.
This is the working VFP8 web service that I created, this works from foxpro and other sources. The VB .NET web reference read the site and methods fine.
DEFINE CLASS GetUnitData AS Session OLEPUBLIC
PROCEDURE FindContNo(contno AS Character) AS String
LOCAL loXMLAdapter AS XMLAdapter
LOCAL lcXMLUnits AS String
mUnitNo=ALLTRIM(contno)+'%'
loXMLAdapter = CREATEOBJECT("XMLAdapter"
USE c:\ds3_320\data\curunits shared
SELECT container,chassis,booking_no ;
FROM curunits ;
WHERE container LIKE mUnitno ;
INTO CURSOR xmlUnits
loXMLAdapter.AddTableSchema("xmlUnits"
loXMLAdapter.UTF8Encoded = .T.
loXMLAdapter.ToXML("lcXMLUnits"
CLOSE DATABASES ALL
RETURN lcXMLUnits
ENDPROC
PROCEDURE FindChasNo(chasno AS Character) AS String
LOCAL loXMLAdapter AS XMLAdapter
LOCAL lcXMLUnits AS String
mUnitNo=ALLTRIM(chasno)+'%'
loXMLAdapter = CREATEOBJECT("XMLAdapter"
USE c:\ds3_320\data\curunits shared
SELECT container,chassis,booking_no ;
FROM curunits ;
WHERE chassis LIKE mUnitno ;
INTO CURSOR xmlUnits
loXMLAdapter.AddTableSchema("xmlUnits"
loXMLAdapter.UTF8Encoded = .T.
loXMLAdapter.ToXML("lcXMLUnits"
CLOSE DATABASES ALL
RETURN lcXMLUnits
ENDPROC
PROCEDURE FindBookNo(bookno AS Character) AS String
LOCAL loXMLAdapter AS XMLAdapter
LOCAL lcXMLUnits AS String
mUnitNo=ALLTRIM(bookno)
loXMLAdapter = CREATEOBJECT("XMLAdapter"
USE c:\ds3_320\data\curunits shared
SELECT container,chassis,booking_no ;
FROM curunits ;
WHERE booking_no = mUnitno ;
INTO CURSOR xmlUnits
loXMLAdapter.AddTableSchema("xmlUnits"
loXMLAdapter.UTF8Encoded = .T.
loXMLAdapter.ToXML("lcXMLUnits"
CLOSE DATABASES ALL
RETURN lcXMLUnits
ENDPROC
ENDDEFINE