[dba-SQLServer]Re: [AccessD] Simple stored proc problem (I hope)

Francisco H Tapia my.lists at verizon.net
Tue Apr 8 16:56:39 CDT 2003


Mark,
   as this is getting more SQL Server related than simply Access ADP's I'm
also posting to the dba-SqlServer list (to subscribe follow this link:
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver)

Now on to the problem... How are you passing the parameters over to SQL
server? could you post that info?
also, do you have QA (Query Analyzer) if so I would suggest trying out what
is happening there... I was going to ask why is the psnID declared as
varchar, but you did mentioned you were testing so I am assuming that your
planning on using alphanumeric psnID's.

in QA you would execute the following
Select * FROM tbl_psn Where psnID = '11'

what are your results?


-Francisco
http://rcm.netfirms.com

On Tuesday, April 08, 2003 2:03 PM [GMT-8],
Mark Hayes <markH at bitgen.co.uk> wrote:

: Just had another go and it’s the same for characters... If I enter
: "AAA" then recod "A" gets updated...
:
: If I do the same update from code using a simple update sql string
: and a command object then its ok.
:
: ????
:
: Mark
:
: -----Original Message-----
: From: accessd-bounces at databaseadvisors.com
: [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Hayes
: Sent: 08 April 2003 21:47
: To: accessd at databaseadvisors.com
: Subject: [AccessD] Simple stored proc problem (I hope)
:
:
: Hello again...
:
: I am using XP data project and have a problem with a stored proc.
:
: I am attempting to update a person record by passing a psnID and a new
: name (just playing)
:
: The problem is that although I may pass the psnID as "11" the record
: with the ID "1" is changed. If I am trying to update the psnID "55"
: then "5" gets updated.
:
: The sproc is v.simple and I really can't see whats going wrong
:
: UPDATE tbl_psn
: SET person_name=@person_name_2
: WHERE (psnID=@psnID_1)
:
: The psnID field is nvarchar 10
:
: This XP stuffs getting confusing :o(
:
: Any help much appreciated
:
: Mark
:




More information about the dba-SQLServer mailing list