HK Registration Script Help

Results 1 to 4 of 4
  1. #1
    Enthusiast syntaxjedi is offline
    MemberRank
    Mar 2014 Join Date
    47Posts

    HK Registration Script Help

    Code:
    $query = "INSERT INTO [Account_CN].[dbo].[tUser] ([nUserNo],[sUserID],[sUserPW],[sUserName],[bIsBlock],[bIsDelete],[nAuthID],[sUserIP],[dDate]) VALUES('".rand_string()."','$_POST[username]','$_POST[password]','$_POST[password]','False','False','1','127.0.0.1','CURRENT_TIMESTAMP)'";
    this is my insert line, and I keep getting an error that says.

    Code:
    Warning:  odbc_exec() [function.odbc-exec]:  SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert  explicit value for identity column in table 'tUser' when  IDENTITY_INSERT is set to OFF., SQL state 23000 in SQLExecDirect in C:\wamp\www\Register\index.php on line 130
    


  2. #2
    Anotha One Wicious is offline
    MemberRank
    Jan 2013 Join Date
    StockholmLocation
    839Posts

    Re: HK Registration Script Help

    "Cannot insert explicit value for identity column in table 'tUser'" should be enough to go on, you can't insert a value in an auto increment column. (nUserNo)

  3. #3
    Enthusiast syntaxjedi is offline
    MemberRank
    Mar 2014 Join Date
    47Posts

    Re: HK Registration Script Help

    Quote Originally Posted by Rekt View Post
    "Cannot insert explicit value for identity column in table 'tUser'" should be enough to go on, you can't insert a value in an auto increment column. (nUserNo)
    Got it to work.
    Last edited by syntaxjedi; 27-06-15 at 01:56 AM.

  4. #4
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: HK Registration Script Help

    Closing thread seeing as the issue has been solved.



Advertisement