Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

.NET Compact Framework 2.0 SP2, SQLCE 3.5

0 views
Skip to first unread message

Kumar@discussions.microsoft.com Arul Kumar

unread,
Jun 11, 2009, 12:58:02 AM6/11/09
to
I am Developing an windows Mobile Application Using windows Mobile 6
Professional, .NET Compact Framework 2.0 SP2, and SQLCE 3.5 . I am Using
SqlCeDatareader for Selecting the Query and Displays in a Text Box .
Following is the Code

sSql = "SELECT * From TMOBIHUBCE"
cmdSKU = New SqlCeCommand(sSql, oNewConnection)
cmdSKU.CommandText = CommandType.Text
rdrReadSKU = cmdSKU.ExecuteReader()

But it Displays The Following Error in Execute Reader Statement.
--------------------------------------------------------------------------
There was an error Parsing the Query. [Token Line number = 1, Token Line
offset =1, Token in error = 1 ].

Request to help me in this Regards, Thank you very Much

Arul Kumar

Paul G. Tobey [eMVP]

unread,
Jun 11, 2009, 11:14:19 AM6/11/09
to
I don't know if it's necessary, but I always put a semicolon at the end of
my select statements.

I think that the real problem is likely to be this line:

> cmdSKU.CommandText = CommandType.Text

It seems that you are replacing the text that you gave the command when you
created it with something else. The content of that "something else",
CommandType.Text, must be an invalid SQL statement.

Paul T.

"Arul Kumar" <Arul Ku...@discussions.microsoft.com> wrote in message
news:1476767C-77E0-4884...@microsoft.com...

Tim Layton

unread,
Jun 25, 2009, 10:40:01 AM6/25/09
to

Based on the sample code my best guess is that you are replacing the
cmdSKU.CommandText with invalid data. You need to check your logic here and
make sure the SQL is also correct.
0 new messages