Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default uniqueidentifier

    Hi,
    I have different attributes with the data types as follows:

    EmpID uniqueidentifier
    EmpName Char
    EmpSal Int

    I am not sure how the uniqueidentifier works,but I had checked in the SQL
    forums and it is said that the EmpID will be assigned an automatically
    generated number, so in the insert statement we can give:

    INSERT INTO Emp_Info(EmpName,EmpSal)
    VALUES ('David',5400)

    I tried this same stuff but it throws an error:
    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Cannot insert the value
    NULL into column 'EmpID', table 'BIOL1114.dbo.page_data'; column does not allow
    nulls. INSERT fails.

    Any ideas and suggestions will be of help.
    thnx

    surenr Guest

  2. Similar Questions and Discussions

    1. sp using a uniqueidentifier
      when I try to run a stored procedure which contains a select statement I get Syntax error converting from a character string to uniqueidentifier....
    2. How to use uniqueidentifier fields a return dataset from a webserv
      I have made a web service that returns a typed dataset that includes a uniqueidentifier field. When I import this web service into visual studio...
    3. Is it possible to use uniqueidentifier in a web service type Datas
      I have made a web service that returns a typed dataset that includes a uniqueidentifier field. When I import this web service into visual studio...
    4. uniqueidentifier-0.2
      Hi Everyone Has anyone been able to compile uniqueidentifier-0.2 on the openBSD 3.6 environment with Postgresql 7.4.3? We need to use this...
    5. #24752 [NEW]: unknown column type "uniqueidentifier", type 35
      From: s dot sonnenberg at coolspot dot de Operating system: Linux PHP version: 4.3.2 PHP Bug Type: MSSQL related Bug...
  3. #2

    Default Re: uniqueidentifier

    make a default on the table or use
    INSERT INTO Emp_Info(EmpID ,EmpName,EmpSal)
    VALUES (newid(),'David',5400)
    SQLMenace Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139