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: A_PK: "List View or Data Grid"
- Previous message:
: "Re: how to control Application load order" - Next in thread: Ken Mattern: "Re: SQL Server CE error, No data exists for the row/column"
- Reply: Ken Mattern: "Re: SQL Server CE error, No data exists for the row/column"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: A_PK: "List View or Data Grid"
- Previous message:
: "Re: how to control Application load order" - Next in thread: Ken Mattern: "Re: SQL Server CE error, No data exists for the row/column"
- Reply: Ken Mattern: "Re: SQL Server CE error, No data exists for the row/column"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|