Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: ADO error: Syntax error or access violation


Message #1 by "Don Lowe" <donlowe@s...> on Fri, 21 Mar 2003 06:09:05 +0100
Please can someone tell me why I get an error on the following code for an
Update stored procedure. I am trying to learn SQL Server on  an Access
project .adp

CREATE PROCEDURE dbo.up_parmupd_cd_type
@CD_ID INT
@CD_Type CHAR(4)
@Return_Code INT OUTPUT AS

UPDATE CD_T
SET CD_Type_CH = @CD_Type,
Last_Update_DT = GETDATE()
WHERE CD_ID = @CD_ID

SET @Return_Code = @@ERROR


SQL Verify failed.
The database server could not verify the validity of the SQL statement. Be
sure that the SQL syntax you are using is supported by the server.

Regards Don

Tel: +xx xx xxxxxx
http://home.swipnet.se/donlowe

Message #2 by "Curt Crosby" <ccrosby@f...> on Fri, 21 Mar 2003 08:13:03 -0800
Don,

Take out the @return_code from the stored procedure, and see if it runs.
Ususlly when I run an update stored procedure, I don't use a return value.

-----Original Message-----
From: Don Lowe [mailto:donlowe@s...]
Sent: Thursday, March 20, 2003 9:09 PM
To: Access
Subject: [access] ADO error: Syntax error or access violation


Please can someone tell me why I get an error on the following code for an
Update stored procedure. I am trying to learn SQL Server on  an Access
project .adp

CREATE PROCEDURE dbo.up_parmupd_cd_type
@CD_ID INT
@CD_Type CHAR(4)
@Return_Code INT OUTPUT AS

UPDATE CD_T
SET CD_Type_CH = @CD_Type,
Last_Update_DT = GETDATE()
WHERE CD_ID = @CD_ID

SET @Return_Code = @@ERROR


SQL Verify failed.
The database server could not verify the validity of the SQL statement. Be
sure that the SQL syntax you are using is supported by the server.

Regards Don

Tel: +xx xx xxxxxx
http://home.swipnet.se/donlowe




Message #3 by "Don Lowe" <donlowe@s...> on Sun, 23 Mar 2003 13:28:13 +0100
Curt
Thanks for the help.

----- Original Message -----
From: "Curt Crosby" <ccrosby@f...>
To: "Access" <access@p...>
Sent: Friday, March 21, 2003 5:13 PM
Subject: [access] RE: ADO error: Syntax error or access violation


> Don,
>
> Take out the @return_code from the stored procedure, and see if it runs.
> Ususlly when I run an update stored procedure, I don't use a return value.
>
> -----Original Message-----
> From: Don Lowe [mailto:donlowe@s...]
> Sent: Thursday, March 20, 2003 9:09 PM
> To: Access
> Subject: [access] ADO error: Syntax error or access violation
>
>
> Please can someone tell me why I get an error on the following code for an
> Update stored procedure. I am trying to learn SQL Server on  an Access
> project .adp
>
> CREATE PROCEDURE dbo.up_parmupd_cd_type
> @CD_ID INT
> @CD_Type CHAR(4)
> @Return_Code INT OUTPUT AS
>
> UPDATE CD_T
> SET CD_Type_CH = @CD_Type,
> Last_Update_DT = GETDATE()
> WHERE CD_ID = @CD_ID
>
> SET @Return_Code = @@ERROR
>
>
> SQL Verify failed.
> The database server could not verify the validity of the SQL statement. Be
> sure that the SQL syntax you are using is supported by the server.
>
> Regards Don
>
> Tel: +xx xx xxxxxx
> http://home.swipnet.se/donlowe
>
>
>
>
>
>



  Return to Index