![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Anyone have any ideas why this doesn't work for me? My Test.EXE app pegs on CPU usage when I step through the Fill statement and the debugger never gets to the next statement. OS: XP Pro SQL: 2000 (local) SQLXML: 3.0sp2 Thanks for any ideas mark ================ C# ================ string NorthwindConnString = @"Provider=SQLOLEDB;Data Source=LAPTOP\LAPTOP; User ID=XXX; Password=XXX; Database=Northwind"; SqlXmlCommand cmd = new SqlXmlCommand(NorthwindConnString); cmd.RootTag = "ROOT"; cmd.CommandText = "Categories"; cmd.CommandType = SqlXmlCommandType.XPath; cmd.SchemaPath = @"c:\Categories.xsd"; DataSet ds = new DataSet(); SqlXmlAdapter ad = new SqlXmlAdapter(cmd); ad.Fill(ds); //<<<CPU GOES NUTS HERE AND NEVER COMES BACK ds.Tables["Categories"].Rows[0]["CategoryName"] = "Drinks"; ad.Update(ds); ============= Categories.xsd ============ ?xml version="1.0" encoding="utf-8" ? xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema" xs:element name="Categories" xs:complexType xs:sequence xs:element name="CategoryID" type="xs:integer"/ xs:element name="CategoryName" type="xs:string"/ /xs:sequence /xs:complexType /xs:element /xs:schema |
#3
| |||
| |||
|
|
Thanks for any ideas |
![]() |
| Thread Tools | |
| Display Modes | |
| |