If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
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, 10: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, 01: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 14:30.
Reply With Quote
  #3 (permalink)  
Old 06-07-04, 14: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

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