Re: SQL Server CE error, No data exists for the row/column
From: Ken Mattern (ken_at_esspc-llc.com)
Date: 01/20/05
- Next message: Claes: "RE: Programming the CIR port on the iPAQ rx3715"
- Previous message: James Morley-Smith: "RE: Pocket PC application"
- In reply to: Ken Mattern: "SQL Server CE error, No data exists for the row/column"
- Next in thread: Martin Dabkiewicz: "Re: SQL Server CE error, No data exists for the row/column"
- Reply: Martin Dabkiewicz: "Re: SQL Server CE error, No data exists for the row/column"
- Messages sorted by: [ date ] [ thread ]
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.
>
>
>
- Next message: Claes: "RE: Programming the CIR port on the iPAQ rx3715"
- Previous message: James Morley-Smith: "RE: Pocket PC application"
- In reply to: Ken Mattern: "SQL Server CE error, No data exists for the row/column"
- Next in thread: Martin Dabkiewicz: "Re: SQL Server CE error, No data exists for the row/column"
- Reply: Martin Dabkiewicz: "Re: SQL Server CE error, No data exists for the row/column"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|