close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Column 'ID' cannot be null

Thread began 6/01/2016 2:40 am by Kumel | Last modified 6/03/2016 12:52 am by Ray Borduin | 476 views | 13 replies |

Kumel

Column 'JobID' cannot be null

i m getting error as: Column 'JobID' cannot be null

This happened as i made some changes on page.
Error appears after submitting the page.
Page attached.
On local server server pointed at:

Notice: Undefined index: JobAdded in /*/**/**/htdocs/**/**/add-job-step-2.php on line 191

Sign in to reply to this post

Ray BorduinWebAssist

You probably need to go into your database and update the table so that the JobID is an Auto-Increment column and will get a value automatically.

Sign in to reply to this post

Kumel

JobID is actually stored in many insert multiple recordsets using session jobid. so. JobID is already in Auto Incre

Sign in to reply to this post

Ray BorduinWebAssist

Maybe the issue is that the Session variable isn't stored properly in some cases? Can you figure out which table insert is causing the error? Try writing the session variable value to the page to make sure it is set properly. That error implies that either you are inserting into the Jobs table and the JobID column isn't set as autonumber, or you are inserting into another table and the value of JobID is blank.

Sign in to reply to this post

Kumel

i checked all. all seems fine. i m using session JobAdded for all. so JobAdded is JobID which is inserted 1st into jobs table.. then Session JobAdded (JobID) is added to other multiple insert.

Sign in to reply to this post

Ray BorduinWebAssist

Which insert is failing? That will tell you where the error is. When you see the error is the new Job inserted? Are any of the multiple inserts completed?

Sign in to reply to this post

Kumel

The first single record insert is not working. so all the rest also are not adding.

Error as: Notice: Undefined index: JobAdded in /Applications/*****/add-job-step-2.php on line 191
Column 'JobID' cannot be null

LINE 191: $WA_fieldValuesStr = "".WA_AB_getLoopedFieldValue("LockOutChecked", $WA_multipleInsertCounter) ."" . $WA_AB_Split . "".$_SESSION['JobAdded'] ."";

Sign in to reply to this post

Kumel

Alright i had inserted Progress bar ever since that it is causing problem.
I removed following:


<div id="formstep21_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('formstep21', 'formstep21_ProgressMessageWrapper', WADFP_Theme_Options['BigSpin:Slate']);
</script>
<div id="formstep21_ProgressMessage" >

<p style="margin:10px; padding:5px;" ><img src="../webassist/progress_bar/images/slate-largespin.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>

</div>

Then form works. but i do require progress bar here.

Sign in to reply to this post

Ray BorduinWebAssist

Change the trigger for the insert to match the triggers for the multiple insert.

Button press triggers don't work with <button> elements when using the progress bar in the version you have installed.

This issue is fixed in the latest version of Data Bridge if you reinstall. I have also attached the newer copy of the .js file that fixes this problem if you don't want to update the trigger or change your <button> elements to <input type="button"> elements.

Attached Files
jquery-blockui-formprocessing.js
Sign in to reply to this post

Kumel

i replaced the file. stil the same.

Anyways i tested without progress bar the form submitted but one of the multiple records are not inserting.
& that is not appearing on server behaviour:

This is what it is:

<?php
// WA DataAssist Multiple Inserts
if ($_SERVER["REQUEST_METHOD"] == "POST") // Trigger
{
if (!session_id()) session_start();
$WA_loopedFields = array("Emp");
$WA_connection = $con1;
$WA_table = "MutipleEmployees";
$WA_redirectURL = "";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = false;
$WA_fieldNamesStr = "EmployeeID|JobID";
$WA_columnTypesStr = "none,none,NULL|none,none,NULL";
$WA_insertIfNotBlank = "Emp";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_con1;
$WA_multipleInsertCounter = 0;
mysql_select_db($WA_connectionDB, $WA_connection);
while (WA_AB_checkMultiInsertLoopedFieldsExist($WA_loopedFields, $WA_multipleInsertCounter)) {
if ($WA_insertIfNotBlank == "" || WA_AB_checkLoopedFieldsNotBlank(array($WA_insertIfNotBlank), $WA_multipleInsertCounter)) {
$WA_fieldValuesStr = "".WA_AB_getLoopedFieldValue("Emp", $WA_multipleInsertCounter) ."" . $WA_AB_Split . "".$_SESSION['JobAdded'] ."";
$WA_fieldValuesStr = "".WA_AB_getLoopedFieldValue("LockOutChecked", $WA_multipleInsertCounter) ."" . $WA_AB_Split . "".$_SESSION['JobAdded'] ."";

$WA_fieldValues = explode($WA_AB_Split, $WA_fieldValuesStr);
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
}
$WA_multipleInsertCounter++;
}
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}?>
Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...