H
HJ
Hi all,
I am building an Microsoft Access 2000 Project with SQL Server 2000. A
stored procedure displays all order lines for a given location. When I run
this stored procedure from the Access database window (and enter a
location), all order lines are returned and the data can be edited.
When I use the resulting record set from the same procedure in a continuous
form, I get the message: Field 'orlDescription' is based on an expression
and can't be edited.
I have set the Unique Table property of the form to 'tblOrderline' and
'dbo.tblOrderline', both with no result.
I have noticed that, when I use a stored procedure that selects data from
one or more tables without using an EXECUTE statement (that is using a
SELECT statement directly without any input parameters), the form is
updateable.
Where do I have to look for a solution?
Thanks in advance,
HJ
The Netherlands
ALTER PROCEDURE uspPlanning
@Location VarChar(50)
AS
SET NOCOUNT ON
SET QUOTED_IDENTIFIER OFF
DECLARE @sql nVarChar(1000)
SET @sql = N'SELECT dbo.tblOrderline.* FROM dbo.tblOrderline
WHERE (ordID IN
(SELECT ordID FROM tblOrder WHERE ordLocation = ''' + @Location
+ ''')) ORDER BY orlProductionDate'
EXECUTE sp_executesql @sql
RETURN
I am building an Microsoft Access 2000 Project with SQL Server 2000. A
stored procedure displays all order lines for a given location. When I run
this stored procedure from the Access database window (and enter a
location), all order lines are returned and the data can be edited.
When I use the resulting record set from the same procedure in a continuous
form, I get the message: Field 'orlDescription' is based on an expression
and can't be edited.
I have set the Unique Table property of the form to 'tblOrderline' and
'dbo.tblOrderline', both with no result.
I have noticed that, when I use a stored procedure that selects data from
one or more tables without using an EXECUTE statement (that is using a
SELECT statement directly without any input parameters), the form is
updateable.
Where do I have to look for a solution?
Thanks in advance,
HJ
The Netherlands
ALTER PROCEDURE uspPlanning
@Location VarChar(50)
AS
SET NOCOUNT ON
SET QUOTED_IDENTIFIER OFF
DECLARE @sql nVarChar(1000)
SET @sql = N'SELECT dbo.tblOrderline.* FROM dbo.tblOrderline
WHERE (ordID IN
(SELECT ordID FROM tblOrder WHERE ordLocation = ''' + @Location
+ ''')) ORDER BY orlProductionDate'
EXECUTE sp_executesql @sql
RETURN