Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting records based on cursor values
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00690849
Message ID:
00690890
Views:
45
If you're using SQL Server 2000, you can use XML to send the keys to a SQL Server stored procedure.
CREATE PROCEDURE usp_CustomersSelect
 @customerIDs text
AS
 DECLARE @hDoc int

 EXECUTE sp_xml_preparedocument @hDoc OUTPUT, @customerIDs

 SELECT * 
 FROM 
  customers c
  INNER JOIN OPENXML(@hDoc, 'customers/id') WITH (id int "@value") x
    ON c.customerid = x.id

 EXECUTE sp_xml_removedocument @hDoc 
The XML fragment should have the following form:
<customers>
 <id value="nnn"/>
</customers>
-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform