Groups | Blog | Home
all groups > dotnet ado.net > september 2007 >

dotnet ado.net : .select method fails to return records on datatable when big XML f


Junior
9/6/2007 12:08:03 AM
Hi ! It seems to me that when I grow a XML database in size, a certain
..select call fails, although the records are there indeed.

This is the code :

Dim dsAcesso as New DataSet
dsAcesso.CaseSensitive = False
Dim FsXML As New FileStream("Test.xml", FileMode.Open)
Dim xtrXML As New XmlTextReader(FsXML)
dsAcesso.ReadXml(xtrXML, XmlReadMode.InferSchema)
xtrXML.Close()
FsXML.Close()
'
Dim dtOpcaoPorItem As New Data.DataTable
Dim maOpcaoPorItem() As Data.DataRow
dtOpcaoPorItem = mdsAcesso.Tables("OptionsByItem")
maOpcaoPorItem = dtOpcaoPorItem.Select("Supplier=4 AND Item='666'", "MRU",
Data.DataViewRowState.CurrentRows)

'maOpcaoPorItem.GetUpperBound(0) returns -1 when there are too many records !

Any hint ? I used dataview but its performance is really bad...

Thanks !!
Junior
9/6/2007 5:56:06 AM
Hmmm... I guess it is still a problem with 2.0 because I'm already using it...

Thanks anyway

[quoted text, click to view]
Adrian Moore
9/6/2007 6:35:36 AM
Junior,

This is a known issue in .NET 1.1. Try updating to .NET 2.0 to fix this
problem.

Ad.


[quoted text, click to view]

AddThis Social Bookmark Button