Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Update SQL statement / Timeout Expired Problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-06-04, 11:16
bunk78 bunk78 is offline
Registered User
 
Join Date: Jun 2004
Posts: 1
Update SQL statement / Timeout Expired Problem

Hi all,

I'm currently experiencing a similar problem as posted at http://forums.aspfree.com/t28331/s.html . I've tried the suggestions posted there without any luck. I am working with SQL Server Version 8.

Here's my problem/symptoms: I am trying to run an UPDATE sql statement "UPDATE prodGuidelines_tbl SET ID=15 WHERE ID=" & selectGen from within my ASP code, where selectGen is the variable storing the record ID. The strange symptom is that this works perfectly fine for most of the records (6 in total in the table), but it produces a "Timeout Expired" error for the second row. (eg. when selectGen = 2).


Here are the columns in the table prodGuidelines_tbl and their data types, just in case:

genGuidelines_Name --> varchar, length 100
genGuidelines_Filename --> varchar, length 100
effDate --> varchar, length 20
Applies_To --> varchar, length 10
ID (this is the primary key) --> int, length 4
Data --> image, length 16
Mime --> nvarchar, length 25
FG_Type --> int, length 4


Any help would be greatly appreciated. Just ask if you need more info. Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 06-07-04, 02:54
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
You cannot have duplicates in a Primary Key. So you cannot have two rows with the same value for ID.
__________________
That which does not kill me postpones the inevitable.

Last edited by Seppuku : 06-07-04 at 15:30.
Reply With Quote
  #3 (permalink)  
Old 06-07-04, 15:15
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
Why do you want to update the ID which is a primary key?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On