Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Associated statement is not prepared
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01559065
Message ID:
01559091
Vues:
49
From a quick search, that error apparently can be generated by completely unrelated problems, like foreign key constraint violations.

>This error message is about as useless as a boar hog on ice skates as I can't find anything that explains what this means.
>
>Has anyone run into this before? How did you figure it out?
>
>
>Here's what happened.
>Modified a stored proc, saved it and executed it - executed with no errors.
>
>Try to call it from VFP and I get this error.
>
>AError returns
>1) 1526
>2) "Connectivity error.[Microsoft][ODBC SQL Server Driver]Associated statement is not prepared"
>3) [Microsoft][ODBC SQL Server Driver]Associated statement is not prepared"
>4) "S1007"
>5) 0
>6) 1
>7) .NULL.
>
>SP is as follows
>
>USE [TestingExpECL]
>GO
>/****** Object:  StoredProcedure [dbo].[UpdateMaster]    Script Date: 12/07/2012 10:55:39 ******/
>SET ANSI_NULLS ON
>GO
>SET QUOTED_IDENTIFIER ON
>GO
>-- =============================================
>-- Author:		Dorrie Beaird
>-- Create date: November 2012
>-- Description:	Updates Experimental Master Record
>-- =============================================
>ALTER PROCEDURE [dbo].[UpdateMaster]
>  @MasterID int,
>  @Cat		nchar(2),
>  @DL		nchar(1),
>  @ALC		nchar(3),
>  @Key1		nvarchar(max),
>  @key2		nvarchar(max),
>  @CR		nchar(1),
>  @Script	                nvarchar(max),
>  @Stem		nvarchar(max),
>  @RA		nvarchar(max),
>  @RB		nvarchar(max),
>  @RC		nvarchar(max),
>  @RD		nvarchar(max),
>  @ST		int,
>  @EN		nvarchar(max),
>  @IS		bit,
>  @RevB		nchar(3),
>  @RevD		date,
>  @CO		bit
>  	
>AS
>BEGIN
>  declare @iError int, @iRowCnt int
>  SET NOCOUNT ON;
>  begin transaction
>  update [TestingExpECL].[dbo].[ExpMaster] set
>    [Category] = @Cat,[DiffLet] = @DL,[alc] = @ALC,[Keyword] = @Key1,
>    [Keyword2] = @Key2,[CorrectResp] = @CR,[Script] = @Script,[stem] = @Stem,
>    [RespA] = @RA,[RespB] = @RB,[RespC] = @RC,[RespD] = @RD,[ScriptTime] = @ST,
>    [EnterNotes] = @EN,[IncSave] = @IS,[ReviewedBy] = @RevB,[ReviewDate] = @RevD,[Completd] = @CO
>    where XPID = @MasterID
>  if @iError > 0
>    begin
>      raiserror('Error on Master Update -  %d',16,1, @iError) 
>      rollback transaction
>    end
>  commit transaction
>END
>
>
>My parameter statements are as follows:
>
>  m.param1 = "?EditRec.XpID,?EditRec.Category, ?EditRec.DiffLet, ?EditRec.ALC, ?EditRec.Keyword, ?EditRec.Keyword2, " + ;
>       "?EditRec.CorrectResp, " 
>  m.param2 = "?STRTRAN(EditRec.Script, CHR(13), '/n'), ?STRTRAN(EditRec.Stem, CHR(13), '/n'), ?EditRec.RespA, " + 
>       "?EditRec.RespB, ?EditRec.RespC, ?EditRec.RespD," 
>  m.param3 = "?EditRec.ScriptTime, ?STRTRAN(EditRec.EnterNotes, CHR(13), '/n'),  ?IIF(EditRec.IncSave, 'True','False'), ?null," 
>  m.param4 = " ?null,  ?'False'"
>
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform