Last post Apr 25, 2009 12:58 AM by Hyacinth Broadchest
Jan 14, 2008 08:08 AM|petermeadit|LINK
I have deployed the starter kit to a live environment. everything seemed to work ok. but when I try to submit a resume i get a database error:
Line 132: strLastError=ex.Message;Line 133: elseLine 134: throw;Line 135: }Line 136: catch
Jan 14, 2008 08:28 AM|geosync|LINK
Did this application work in your development env't?
Do you understand the error? In case not, it can't perform a database Insert for a new resume because the primary key field (ResumeID) is null, which, of course, is always a bad thing for a Primary Key.
Did you customize the application? Are you able to debug the application and see why there is no ResumeID being created?
Jan 14, 2008 08:28 AM|ca8msm|LINK
Cannot insert the value NULL into column 'ResumeID', table
You'll need to trace through the code to see why this is not being added to the sql statement or stored procedure.
Website Design Darlington - http://lessthandot.com -
Jan 14, 2008 08:49 AM|petermeadit|LINK
Yes the site was working in the dev environment...
I will try a trace on it...
Jan 14, 2008 10:07 AM|petermeadit|LINK
I wonder if it has anything to do with the way that i deployed it to the live server?
First i imported every table and view to the live database, then i ran and sql query with all the stored procedures in it.
It seemed like the most straight forward way to deploy it.
Jan 14, 2008 11:43 AM|petermeadit|LINK
So I figured out that the stored procedure does not create the resume id for inserting into the resume table, instead it uses the auto incrementing integer.
I have to change the identity specification on the target server and then it will work ok.
I should have known this, as it's not the first time I've had this problem...
Apr 14, 2009 10:57 AMfirstname.lastname@example.org|LINK
I am having a similar issue on a UAT environment that is held at a client site in the UK. Basically we do the changes to the stored procs and send them to the UK for deployment and testing. The users testing get the error
Cannot insert the value NULL into column "QuoteID' on
table DBNAME.dbo.TableName, column does not allow nulls, insert fails.
In our case as well the stored proc does not create the QuoteID, this is auto generated.
Please can you tell me how to go about changing the identity specification on the target server as i am fairly new to SQL Server.
Apr 14, 2009 12:38 PM|geosync|LINK
If the error is Cannot insert the value NULL into column "QuoteID', then QuoteID probably isn't being auto-generated.
Double-check that QuoteID in the table where the problem occurs has an Identity specification assigned to it.
You should see something like this:
CREATE TABLE [yourTableNameHere](QuoteID int
NOT NULL, ...
If you need more help, post the SQL defining the problem table, and the procedure you're using.
Apr 25, 2009 12:58 AM|Hyacinth Broadchest|LINK
I found that this error was to do with the profile. It does work fine in dev. But when deployed, you need extra stuff in the web.config to declare profile fields. There is a field in the profile with your ResumeID or CompanyID (depending on whether the
user is logged in as a candidate or an employer). This field contains -1 by default.
Also, declarations are required in Web.Config for the WebParts implementation behind the 'My Favourites' tabs.
Here is what I ended up putting in web.config in order to make it work.
<!-- ; now the JSSK profile fields
<add name="UserName" type="System.String"/>
<add name="Email" type="System.String"/>
<add name="FirstName" type="System.String" allowAnonymous="true"/>
<add name="LastName" type="System.String" allowAnonymous="true"/>
<add name="ResumeID" type="System.Int32" defaultValue="-1"/>
<add name="CompanyID" type="System.Int32" defaultValue="-1"/>
; Declarations for the use of WebParts in my system
<add name="SqlProvider" type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider"
description="Sql WebParts Personalisation Provider for Dolphin" />
<deny users="*" verbs="enterSharedScope" />
<allow users="*" verbs="modifyState" />