HI

Using VS2005 and VB for HPC development

I now am getting Native errors occuring when I get data from the database.
It appears to happen after so many reads from the database.

In searching the MS Newsgroups I see others have encountered this error but
I did not find an exact resolution to their problem.

Can anyone advise as to how to fix this?

Copy of databse access code follows - if it is my faulty code

regards
Brenton

Dim query3 As String = "Select ProdCode, Units from Product where ProdCode =
'" & Grid_History.Items(0).Text & "'" '"Prodcode in grid"

Dim connString3 As String = "Data Source = PS_HPC.sdf"

Dim conn3 As New SqlCeConnection(connString3)

Dim cmd3 As New SqlCeCommand(query3, conn3)

conn3.Open()

Dim rdr3 As SqlCeDataReader = cmd3.ExecuteReader() '''''' Fails here
normally

Try

If rdr3.Read() Then

lblUnits.Text = "Units : " & gfs(rdr3, 1)

Else

lblUnits.Text = "Units : NA"

End If

Finally

' Always call Close when done reading

rdr3.Close()

' Always call Close when done reading

conn3.Close()

End Try