Re: SQL Server CE error, No data exists for the row/column

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Ken Mattern (ken_at_esspc-llc.com)
Date: 01/20/05


Date: Thu, 20 Jan 2005 08:54:20 -0600

I finally figured it out.

I now know that executereader is only a handle to the data. I still have to
do something with it.

Sometimes it is too simple!

"Ken Mattern" <ken@esspc-llc.com> wrote in message
news:OYUkcOq$EHA.3472@TK2MSFTNGP14.phx.gbl...
> I'm simply trying to check the login parameters from a SQLCE database on
> the Pocket PC. There is one field that is an integer. This code should
> work. I know that the data is there because I put it there manually on the
> Pocket PC. Never the less when I try to retrieve it I get the following
> message
>
> An unhandled exception of type 'System.InvalidOperationException' occurred
> in System.Data.SqlServerCe.dll
>
> Additional information: No data exists for the row/column.
>
>
> This is my code.
>
> cn = New SqlCeConnection("Data source = \My
> Documents\Password.sdf;Password=")
> cn.Open()
> Dim cmd As SqlCeCommand = cn.CreateCommand
> cmd.CommandText = "Login"
> cmd.CommandType = CommandType.TableDirect
> rs = cmd.ExecuteReader()
> SpotX(1) = rs.GetValue(0)
>
> The error occurs at the line:
> rs = cmd.ExecuteReader()
>
> I can see the database, I can query the data type and more, I just can't
> get the data!
>
> Of course Microsoft's knowledge base has nothing that I can find on this
> error message. The news groups have much and little at the same time.
>
> It can't be that hard but I'm pulling on the last three hairs that I have
> trying to understand what I am doing wrong.
>
> ADO .NET is not that different (but it is) that I should have trouble. I
> can't think that I'm that stupid but I have reached my limit. I've spent
> an entire day trying to figure this out and I have failed.
>
> Any help will be greatly appreciated.
>
>
>



Relevant Pages

  • SQL Server CE error, No data exists for the row/column
    ... I'm simply trying to check the login parameters from a SQLCE database on the ... know that the data is there because I put it there manually on the Pocket ... error message. ...
    (microsoft.public.pocketpc.developer)
  • Re: Data type mismatch in criteria expression
    ... Regarding the error message and number, ... Doug Steele, Microsoft Access MVP ... Also why is the error description "Data type ...
    (microsoft.public.vb.database.ado)
  • TypeLoadException: strange app. behaviour
    ... I have a very strange problem. ... I now receive an error message: ... is that I can manipulate VS Studio .NET to make the application work again. ... Connected to Pocket PC Device running on ARMV4. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Whut I dew?
    ... I have a weird error message about ... > data type in the field, ... accesses the main table, when I switch to the Form view and tab from ... you may have entered text in a numeric field or a number that ...
    (comp.databases.ms-access)
  • Re: Error 2570 in SQL Server
    ... out of range for data type "%.*ls". ... Update column to a legal value. ... The exact meaning of the error message is this: ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.programming)