Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting XML from SQL Server
Message
From
24/09/2003 10:28:33
 
 
To
24/09/2003 10:20:32
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00831714
Message ID:
00831838
Views:
27
>>>Bob,
>>>I have done that before :) If you need evidence a simple one :
>>>
>>>
>>>CREATE PROCEDURE Cusdetails @cCustomerID nchar(5) AS
>>>SELECT Customers.CustomerID, ContactName, CompanyName,
>>>       Orders.OrderID, OrderDate
>>>FROM Customers, Orders
>>>WHERE Customers.CustomerID = Orders.CustomerID
>>>AND Customers.CustomerID = @cCustomerID
>>>ORDER BY Orders.OrderID
>>>FOR XML AUTO
>>>GO
>>>
>>>
>>>lnHandle = ...
>>>m.customerID = 'BONAP'
>>>SQLExec(lnHandle, 'Exec CusDetails ?customerID','SPResult')
>>>
Returns just one row with one field.
>>>Cetin
>>
>>Ok... well, you are only getting one record, and it may all fit into on field in one row. Take out the AND so you get ALL records and see what you get.
>>
>>BOb
>
>Right. Here is what I did to get a correct one :
>
>
>Select spResult
>lcXML = '<?xml version = "1.0" encoding="Windows-1252"'+;
>  ' standalone="yes"?><root>'
>Scan
> lcXML = lcXML + Evaluate(Field(1))
>EndScan
>lcXML = lcXML + '</root>'
>_cliptext = m.lcxml
>
Cetin

Cetin,

Yes that was my next thing to try... cause I was just sending each to a file with ?, I think that was/is the problem.

Thanks,
BOb
Previous
Reply
Map
View

Click here to load this message in the networking platform