In Access 2003 when the user right clicks and selects sort ascending or
sort descending they get the following message, Data shape command text
contains a syntax error at or near position 98 in the command. The text
near the error is: "::]) AS "dbo"."spselSyQueryFieldList".*".
The form is in an ADP file that is linked to a SQL Server 2000
database. The stored procedure that is the source for the form is
spselSyQueryFieldList. The content of that stored procedure is shown
below. Can anyone help us so that we do not have this error?
ALTER PROCEDURE dbo.spselSyQueryFieldList
@pQueryId int
AS
SELECT QueryFieldID,
QueryId,
FieldName,
FieldNameIsValidYesNo,
CriteriaFieldName,
CriteriaFieldNameIsValidYesNo,
DisplayName,
DisplaySeq,
ColumnHeading,
EntryMask,
TypeId,
Lookup,
Width,
AttachedTable,
LinkFieldName,
AggregateType,
AutoAddedYesNo,
FieldExpression,
UserName,
UserDateTime
FROM SyQueryField
WHERE QueryId = @pQueryId