Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing stored procedure variables
Message
From
12/06/2006 10:54:28
David Shedd
Memphis Police Department
Memphis, Tennessee, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Passing stored procedure variables
Miscellaneous
Thread ID:
01128442
Message ID:
01128442
Views:
76
I wrote This stored procudure that runs an update, it works in SQL Query Analyzer, I can not get it to work in VFP9 using SQLExec. Please Help!!!

SQLEXEC(gnConnhandle,[exec spUpdateValidObr 'Negative','05/05/2006','7298','6831',1,1,1,1,1,'Its Alive!!!!!','Harvey','James','LT','Admin Services','B','Garrett','Don','Major',2 ])
CREATE PROC spUpdateValidObr

@ObrType varchar(8) = '', 
@ObrDate datetime = '',
@SuperIbm char(10) = '',
@OfficerIbm char(10) = '',
@Appearance bit = '',
@Attitude bit = '',
@Communication bit = '',
@Compatibility bit = '',
@JobKnowledge bit = '',
@Judgement bit = '',
@Productivity bit = '',
@Receptiveness bit = '',
@PublicDealing bit = '',
@Reliability bit = '',
@UseOfEquipment bit = '',
@Narrative char(2500) = '',
@OfficerLastName char(25) = '',
@OfficerFirstName char(20) = '',
@OfficerRank varchar(30) = '',
@Precinct char(30) = '',
@Shift char(1) = '',
@SuperLastName char(25) = '',
@SuperFirstName char(20) = '',
@SuperRank varchar(30) = '',
@lnID INT

AS

--Declare Varables
DECLARE @Error INT


-- Do the actual UPDATE
UPDATE dbo.OBR
SET ObrType = @ObrType, 
ObrDate = @ObrDate,
SuperIbm = @SuperIbm,
OfficerIbm = @OfficerIbm,
Appearance = @Appearance,
Attitude = @Attitude,
Communication = @Communication,
Compatibility = @Compatibility,
JobKnowledge = @JobKnowledge,
Judgement = @Judgement,
Productivity = @Productivity,
Receptiveness = @Receptiveness,
PublicDealing = @PublicDealing,
Reliability = @Reliability,
UseOfEquipment = @UseOfEquipment,
Narrative = @Narrative

WHERE obrID = @lnID



UPDATE dbo.OBRName
SET OfficerLastName = @OfficerLastName,
OfficerFirstName = @OfficerFirstName,
OfficerRank = @OfficerRank,
OfficerIbm = @OfficerIbm,
Precinct = @Precinct,
Shift = @Shift,
SuperLastName = @SuperLastName,
SuperFirstName = @SuperFirstName,
SuperIbm = @SuperIbm,
SuperRank = @SuperRank

WHERE OBRLink = @lnID
Next
Reply
Map
View

Click here to load this message in the networking platform