Register for your free account! | Forgot your password?

You last visited: Today at 04:30

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



error with reftab_hive

Discussion on error with reftab_hive within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2010
Posts: 194
Received Thanks: 16
error with reftab_hive

Msg 8101, Level 16, State 1, Line 61
An explicit value for the identity column in table 'Tab_RefHive' can only be specified when a column list is used and IDENTITY_INSERT is ON.



what should i do i dont rly understand actually what is wrong
thoubi96 is offline  
Old 05/11/2013, 12:40   #2
 
Schickl's Avatar
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,064
Received Thanks: 539
The ID column is an identity column.
This means that the value is generated by the server
Just don't include that column when inserting, or if you really need to specify the ID do what the error suggests you: set IDENTITY_INSERT to ON
Look there for more info:
Schickl is offline  
Old 05/11/2013, 12:53   #3
 
IceAmStiel's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1,058
Received Thanks: 1,118
Aight people.. take advantage of the identity columns, I know it might be annoying sometimes to insert data in tables with lots of columns but you can make it much more simple..

Code:
Declare	@String nvarchar(1024);
SELECT	@String = ISNULL(@String, N'') + name + N', ' FROM sys.columns WHERE object_id = OBJECT_ID(N'Tab_RefHive') AND is_identity = 0;

SELECT	N'INSERT INTO Tab_RefHive (' + LEFT(@String, LEN(@String) - 1) + N') VALUES (..)';
Output:

IceAmStiel is offline  
Old 05/11/2013, 14:44   #4
 
elite*gold: 0
Join Date: Jul 2010
Posts: 194
Received Thanks: 16
Quote:
Originally Posted by IceAmStiel View Post
Aight people.. take advantage of the identity columns, I know it might be annoying sometimes to insert data in tables with lots of columns but you can make it much more simple..

Code:
Declare	@String nvarchar(1024);
SELECT	@String = ISNULL(@String, N'') + name + N', ' FROM sys.columns WHERE object_id = OBJECT_ID(N'Tab_RefHive') AND is_identity = 0;

SELECT	N'INSERT INTO Tab_RefHive (' + LEFT(@String, LEN(@String) - 1) + N') VALUES (..)';
Output:



so that query makes it work?

`do i run this for shard or for that table?
thoubi96 is offline  
Old 05/11/2013, 19:00   #5
 
IceAmStiel's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1,058
Received Thanks: 1,118
Assuming you want to insert data into Tab_RefHive, simply exclude the identity column from the column list in the insert statement.
My query prepares the string for insertions into a table that has an identity column (replace the ".." with your intput parameters).
IceAmStiel is offline  
Reply


Similar Threads Similar Threads
PBDO Bot Error !! A Socket connection error while connecting to the bot auth server.
12/08/2012 - DarkOrbit - 11 Replies
A Socket connection error while connecting to the bot auth server. Trying another one. ERROR PBDO
İbot Error-Error Video- Error İmages-HELP
04/10/2012 - DarkOrbit - 11 Replies
SORRY, MY ENGLİSH VERY BAD.I USE TO GOOGLE TRANSLATE :) Most people trying to ibot but in my computer İbot not working. Declared out this error everywhere but I do not get answers Here's the error Video http://youtu.be/q0fK09v-K3c
API Error Code: 100 API Error Description: Invalid parameter Error Message: redirect_
04/08/2012 - elite*gold Trading - 2 Replies
API Error Code: 100 API Error Description: Invalid parameter Error Message: redirect_uri URL is not properly formatted Das bekomme ich wenn ich ne App installiere... ich habe schon 3 Apps richtig installiert, danach kam immer das bei anderen Apps die ich installiert habe.. was heisst das? redirect_uri URL is not properly formatted



All times are GMT +1. The time now is 04:31.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.