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

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

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


Date: Wed, 19 Jan 2005 21:53:24 -0600

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

  • Re: 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 Pocket PC. ... > I can see the database, I can query the data type and more, I just can't ... > error message. ...
    (microsoft.public.pocketpc.developer)
  • Change of table col in sqlce for pocket pc
    ... how do i change column's data type of a table in sqlce database for pocket pc. ... Sent via Fuzzy Software @ http://www.fuzzysoftware.com/ ... Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources... ...
    (microsoft.public.sqlserver.ce)
  • deployment
    ... i was finish project with visual basic 2003 + SqlCE database for POCKET PC, and now i have to create setup ... can someone help me a little, couse all that is realy confused for me :-( ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: pocket pc 2002
    ... can u send me the exact error message? ... > when i am creating an sqlce database in my pocket pc device(which is ... > pocket pc 2002) it is showing the sqlceexception. ...
    (microsoft.public.pocketpc.developer)