SQL parsing error
- From: Greg <Greg@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Oct 2008 08:20:06 -0700
Microsoft SQL Server Compact Edition V 3.5
When I send this SELECT string:
SELECT Shape_ID FRADDL FRADDR TOADDL TOADDR FROM roads_WI
in this code fragment:
using(SqlCeDataAdapter scda = new SqlCeDataAdapter(sqlQuery, conn)) {
using(DataSet ds = new DataSet()) {
int count = scda.Fill(ds);
I always get this error message during the Fill:
There was an error parsing the query. [ Token line number = 1,Token line
offset = 24,Token in error = FRADDR ]
The stack trace is:
at System.Data.SqlServerCe.SqlCeCommand.CompileQueryPlan()
at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior
behavior, String method, ResultSetOptions options)
at System.Data.SqlServerCe.SqlCeCommand.ExecuteReader(CommandBehavior
behavior)
at System.Data.SqlServerCe.SqlCeCommand.ExecuteDbDataReader(CommandBehavior
behavior)
at
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
[then my code as above]
When I change around the column names, I get an error at the same offset but
with the new name showing. For example, if I drop FRADDL from the query
string the error is reported as:
There was an error parsing the query. [ Token line number = 1,Token line
offset = 24,Token in error = TOADDL ]
Any ideas?
Thanks in advance.
.
- Follow-Ups:
- Re: SQL parsing error
- From: Ginny Caughey MVP
- Re: SQL parsing error
- Prev by Date: Re: CompactDatabase made DB grow in size
- Next by Date: Re: SQL parsing error
- Previous by thread: CompactDatabase made DB grow in size
- Next by thread: Re: SQL parsing error
- Index(es):
Relevant Pages
|