Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Dreamweaver (all versions)
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 27th, 2005, 03:19 AM
Registered User
 
Join Date: Apr 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update records with multiple keys (ASP VBScript)

In my table I have created a primary key on the combination of two fields. I use a command to update this table. The problem is that one of the fields i'm going to update is a part of the primary key. I get no error message, but the current record is not updated. When i try to update the record without changing the field which is a part of the primary key everything works fine.

The table-design and Dreamweaver command is shown below:

Tablename = tbl_Place_of_work
Employeeid - Int - 4
Phonenumber - varchar - 20
Division - char - 5
Sphere - varchar - 70

The combination of Employeeid And Division are the primary key

SQL
UPDATE dbo.tbl_Place_of_work
SET Phonenumber = 'varPhonenumber', Division = 'varDivision', Sphere = 'varSphere'
WHERE Employeeid = varEmployeeid AND Division = 'varDivision'

Variables
varPhonenumber = Request("Phonenumber")
varDivision = Request("Division")
varSphere = Request("Sphere")
varEmployeeid = Request("Employeeid")

My Regards,
Rune

 
Old April 27th, 2005, 05:11 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Rune,

Do not Cross post

Regards
Prashant






Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Multiple Records cancer10 Classic ASP Databases 0 October 25th, 2006 01:01 AM
Update records with multiple keys (ASP VBScript) rbrynest SQL Server ASP 4 April 27th, 2005 05:28 AM
update multiple records mateenmohd Classic ASP Basics 4 June 28th, 2004 03:38 AM
How Can I Update Multiple Records Lucy SQL Server ASP 3 March 18th, 2004 03:19 PM
update multiple records (solved) dhaywirex Classic ASP Databases 2 February 24th, 2004 12:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.