Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 12th, 2008, 10:41 AM
danja danja is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 140 danja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 36 m 56 sec
Reputation Power: 4
Exclamation SQL Server 2000 - SQL incermenting records correctly

SharePoint related:
In SQL I am updating a current WebID for a webpart to a New WebId for a new webpart.

I can get all the records to appear into the new web part once I do teh update.

The problem is, if someone trys to add a new records or update a records. It give the error, that the next increment number is invalid.

how do I force the webpart to being incrementing at the last ID say (2,0050 next record would be (2,006) instead of error on ID 2.

Reply With Quote
  #2  
Old May 12th, 2008, 11:50 AM
visakh16 visakh16 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Location: Trivandrum,Kerala
Posts: 41 visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 48 m 17 sec
Reputation Power: 11
Is WebID an identity column?

Reply With Quote
  #3  
Old May 12th, 2008, 12:40 PM
danja danja is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 140 danja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 36 m 56 sec
Reputation Power: 4
Yeah it is. It is the WebPart key to all the records associated with that particulare web part.

Reply With Quote
  #4  
Old May 12th, 2008, 01:07 PM
visakh16 visakh16 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Location: Trivandrum,Kerala
Posts: 41 visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 48 m 17 sec
Reputation Power: 11
And are you trying to insert by passing a value to this column?

Reply With Quote
  #5  
Old May 13th, 2008, 10:50 AM
danja danja is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 140 danja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 36 m 56 sec
Reputation Power: 4
Exclamation Yeah insert new records without changing

Quote:
Originally Posted by visakh16
And are you trying to insert by passing a value to this column?


Yeah, I am , but I do not want to have to add the thousands of values for the inserts. How to do this within the query anylayzer or sql query method.

Reply With Quote
  #6  
Old May 13th, 2008, 10:59 AM
visakh16 visakh16 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Location: Trivandrum,Kerala
Posts: 41 visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level)visakh16 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 48 m 17 sec
Reputation Power: 11
if you want to insert an explicit value for an identity column do this before insert

set identity_insert yourtable on

insert into table
select values....

set identity_insert off

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > SQL Server 2000 - SQL incermenting records correctly


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway