Questions tagged [sqlcedatareader]
29 questions
0
votes
1 answer
SqlCeDataReader.Read is slow
I have a vb.net application which calls a large quantity of data (about 65,000 rows) from two tables in a SQL Server CE database.
The code is pretty straightforward:
cmd.CommandText = "SELECT [Table1Col1], [Table1Col2], ... [Table1Col8], " & _
…

DrCocoa
- 37
- 1
- 10
0
votes
1 answer
Update of IINFORMATION_SCHEMA.KEY_COLUMN_USAGE Sql CE
How do you ensure INFORMATION_SCHEMA.KEY_COLUMN_USAGE is updated after you have added/created a new index. ie:
CREATE UNIQUE INDEX [UK_Common.UserConnection]
ON [Common.UserConnection] ([SessionId] ASC,[UserId] ASC);
GO
I have to databases, one…

Lars
- 81
- 2
- 10
0
votes
3 answers
Display SQL information on C# RadioButtons
My C# program is connected to my SQL CE Database. I use a SQLCEDATAREADER to fill some of the textboxes in my program. I have a "Gender" column in my database and a radiobutton with Male and Female. If a certain entry in my database has "M" in the…

Dave Howson
- 156
- 6
- 14
0
votes
1 answer
C# SqlCeDataReader getValue of date return different format on the same query
I have the following code
String sqlQuery = "SELECT * FROM table";
SqlCeDataReader reader = ConectorSQLCE.consultar(rutaArchivo, sqlQuery);
String value = "";
try
{
while (reader.Read())
{
for (int i = 0; i <…

emmanuel sio
- 1,935
- 3
- 24
- 26
0
votes
1 answer
"no key matching the described characteristics could be found within the current range"
I am using SQL CE 4.0 and the following code:
string sqlQuery = "SELECT TOP 10 " +
"tbl_Image.ImageID, tbl_Barcode.BarcodeValue, tbl_Image.ImageDateTime, tbl_Image.ImageFileName " +
"FROM " +
"tbl_Image " +
…
user1622437
0
votes
1 answer
SqlCeDataReader Read(); Iterates and Iterates some number of times
I am programming an application using SQL Server Compact Edition in which my program inserts some data from somewhere to a local database. My database table has columns like: username, enterdate, exitdate... and so on.
Now I am trying to read a…

Sarah
- 1
- 2
0
votes
1 answer
A native exception occurred in .Net EXE
I have developed a C#.net windows form application to get and update data from /to a SQL server CE database.While I'm running this app on windows ce 6.0 machine, getting following error:
A native exception occurred in ItemDB.exe(my exe…

bapi
- 1,903
- 10
- 34
- 59
0
votes
0 answers
SQL Server CE v4 on Windows 8
I built the app using SQL Server CE 4.0 and it runs just fine in Windows 7.0 dev machine, but got the following error message running it in Windows 8 (x64 version, Lenovo All-In-One Horizon 27' HW platform):
Is not a valid Win 32 application…

Alexander Bell
- 7,842
- 3
- 26
- 42
0
votes
1 answer
DllGetClassObject return "No such interface supported" while CoCreateInstance can find it successful
I want to use the library "sqlceoledb35.dll" to process .sdf db file without register. I know this dll is a COM dll and used in ADO.
But I can't get the target interface, it returns error "No such interface supported".
Here is the code:
…

dasons
- 493
- 5
- 12
0
votes
1 answer
Is disposing a SqlCeDataReader a good idea?
In trying to track down the cause of a Null Reference Exception which occurs only in certain situations, I came across this code:
SqlCeDataReader IdValsReader = IdValsCMD.ExecuteReader();
if ((IdValsReader.Read()) && (!IdValsReader.IsDBNull(0)))
{
…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862
0
votes
1 answer
SqlCeDataReader while(read()) executing on a blank dataset
I'm using a SqlCeDataReader to read results from a query and add them to a list of objects which may return 0 or many rows.
My code:
while (tourReader.Read())
{
Tour newTour = TourDBA.RetrieveTour( (int)reader["Id"] );
if (newTour != null)
…

Logan Black
- 567
- 3
- 10
- 21
-1
votes
1 answer
system.invalidoperationexception
I am trying to run this code
public Exception SetData(string Data , long NoOfColumnsAllowed)
{
try
{
con = new SqlCeConnection(conectionstring);
con.Open();
transaction =…

Hot Cool Stud
- 1,145
- 6
- 25
- 50
-2
votes
2 answers
There was an error parsing the query. [ Token line number = 1,Token line offset = 39,Token in error = ( ]
I'm working in WinForms application. My requirement is loading the data from sql on demand(i.e load 100 records for a page, when moves to that page). So i tried below SqlCommand but it throws the exception at place of "ROW_NUMBER()" syntax in the…

Prithiv
- 504
- 5
- 20
-4
votes
1 answer
Why is this SqlCeCommand ExecuteReader call failing?
I adapted my code below from "Microsoft .NET Compact Framework" by Wigley and Wheelwright:
SqlCeConnection cn = new SqlCeConnection(@"Data Source=\My Documents\Traffic.sdf");
String sSQL= "SELECT CarID, Reg, Location FROM Cars");
SqlCeCommand…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862