Insert Record Problems

I am trying to create an insert record instance, but even
though my database connection is ok and I have simplified my form
down to one entry, I cannot get the query to work. The lastest
error I am getting is:
The field 'ARTISTS.LASTNAME' cannot contain a Null value
because the Required property for this field is set to True. Enter
a value in this field.
Where am I going wrong? Can someone help out a beginner about
to lose their mind?

I tried making a new table in the database with only one
field and an automatically generated primary key, but am now
getting the following error:
Error Executing Database Query.
Cannot start your application. The workgroup information file
is missing or opened exclusively by another user.
The error occurred in
D:\CFusionMX7\wwwroot\Synopsispost\firstnameform.cfm: line 15
13 : <cfelse>
14 : NULL
15 : </cfif>
16 : )
17 : </cfquery>
My complete coding is:
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
<cfif IsDefined("FORM.MM_InsertRecord") AND
FORM.MM_InsertRecord EQ "form1">
<cfquery datasource="submissionsdb" username="cfsimmo"
password="cfsimmo76">
INSERT INTO Mailing List ("Mailing ListID", FirstName)
VALUES (
<cfif IsDefined("FORM.Mailing_ListID") AND
#FORM.Mailing_ListID# NEQ "">
#FORM.Mailing_ListID#
<cfelse>
NULL
</cfif>
<cfif IsDefined("FORM.FirstName") AND #FORM.FirstName#
NEQ "">
'#FORM.FirstName#'
<cfelse>
NULL
</cfif>
</cfquery>
</cfif>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form method="post" name="form1"
action="<cfoutput>#CurrentPage#</cfoutput>">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">Mailing ListID:</td>
<td><input type="text" name="Mailing_ListID"
value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">FirstName:</td>
<td><input type="text" name="FirstName" value=""
size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="Insert
record"></td>
</tr>
</table>
<input type="hidden" name="MM_InsertRecord"
value="form1">
</form>
<p> </p>
</body>
</html>
Any ideas?

Similar Messages

  • Inserting record problem

    I've got an ASP page which inserts a record into an Access
    database.
    Basically the user can insert a record which is one of 4
    types. They
    all go into the same table, just different fields are
    completed in the form.
    I'd like to be able to hide the irrelevant form fields from
    the user
    depending on the type of record they are entering. I did this
    using
    some simple If statements.
    However the Insert Record server behaviour isn't happy - when
    I click
    the submit button, I get an error that one of the parameters
    has no
    default value. The parameter referred to is one of the form
    fields I've
    chosen not to display with the If statements.
    Is there a way around this, or am I going to have to create 4
    different
    insert record forms, one for each type?
    Hope that makes sense.
    Thanks
    Vix

    No, all the field names in the Access database are fine as
    far as I can see.
    I don't understand where that parameter ?_5 is coming from.
    The insert record code looks like this, if it helps:
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_certsConn_STRING
    MM_editCmd.CommandText = "INSERT INTO tblCerts (Surname,
    FirstNames, Gender, EventDate, SpouseSurname,
    SpouseFirstNames,
    DateOfAdoption, Town, Country, County, Type, MemberID) VALUES
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1",
    202, 1, 50, Request.Form("Surname")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2",
    202, 1, 255, Request.Form("FirstNames")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3",
    202, 1, 50, Request.Form("Gender")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4",
    135, 1, -1, MM_IIF(Request.Form("EventDate"),
    Request.Form("EventDate"),
    null)) ' adDBTimeStamp
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5",
    202, 1, 50, Request.Form("SpouseSurname")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6",
    202, 1, 50, Request.Form("SpouseFirstNames")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7",
    135, 1, -1, MM_IIF(Request.Form("DateOfAdoption"),
    Request.Form("DateOfAdoption"), null)) ' adDBTimeStamp
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8",
    202, 1, 50, Request.Form("Town")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9",
    202, 1, 50, Request.Form("Country")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10",
    202, 1, 50, Request.Form("County")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param11",
    202, 1, 50, Request.Form("Type")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param12",
    5, 1, -1, MM_IIF(Request.Form("MemberID"),
    Request.Form("MemberID"),
    null)) ' adDouble
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    Baxter wrote:
    > Do you have a question mark (?) in your field name. If
    so remove it, as some
    > database engines, including Microsoft Access, and should
    not be used in
    > database table names or field names.
    > Dave
    > "Vix" <[email protected]> wrote in message
    > news:[email protected]...
    >> I've already done that. Allow zero length is set to
    Yes on those fields.
    >>
    >> The error I get is
    >> Microsoft JET Database Engine error '80040e10'
    >>
    >> Parameter ?_5 has no default value.
    >>
    >> /add_certificates.asp, line 89
    >>
    >> line 89 is the execute command for the insert
    record.
    >> I'm presuming that the parameter being referred to
    is this one
    >>
    >> MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5",
    >> 202, 1, 50, Request.Form("SpouseSurname")) '
    adVarWChar
    >>
    >> which is the first of the "hidden" fields.
    >>
    >> Any other ideas?
    >>
    >>
    >> Baxter wrote:
    >>> Just tell access to accept null values for the
    fields that you are not
    >>> showing at the time and it should work fine.
    >>> Dave
    >>> "Vix" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> I've got an ASP page which inserts a record
    into an Access database.
    >>>>
    >>>> Basically the user can insert a record which
    is one of 4 types. They
    >>>> all go into the same table, just different
    fields are completed in the
    >>> form.
    >>>> I'd like to be able to hide the irrelevant
    form fields from the user
    >>>> depending on the type of record they are
    entering. I did this using
    >>>> some simple If statements.
    >>>>
    >>>> However the Insert Record server behaviour
    isn't happy - when I click
    >>>> the submit button, I get an error that one
    of the parameters has no
    >>>> default value. The parameter referred to is
    one of the form fields
    > I've
    >>>> chosen not to display with the If
    statements.
    >>>>
    >>>> Is there a way around this, or am I going to
    have to create 4 different
    >>>> insert record forms, one for each type?
    >>>>
    >>>> Hope that makes sense.
    >>>>
    >>>> Thanks
    >>>> Vix
    >>>
    >
    >

  • Insert record problem

    Hi i have a issue.
    I have 2 tables
    TABLE SERVICE_ATTRIBUTES_LIST
    SEAL_NAME VARCHAR2(240 BYTE),
    SEAL_DESCRIPTION VARCHAR2(1000 BYTE)
    and
    TABLE EXP
    SA VARCHAR2(100 BYTE),
    SADES VARCHAR2(300 BYTE),
    SADESC VARCHAR2(500 BYTE)
    now i want to insert those row from TABLE SERVICE_ATTRIBUTES_LIST into exp whose information are not there in exp .the condition is that insert only those row from exp into where SADES into is there is SEAL_NAME

    well the problem is in tab1(service_attribute_list) it has some valuse as
    CPE_INTERFACE
    VPN_GROUP SERVICE ID
    in tab2(EXP) there is records as
    CPE_INTERFACE 3
    VPN_GROUP SERVICE ID 4
    THE_SERVICE_ID 5
    now i want to inset those reords in tab1 which are not there is tab1 condition

  • Inserting Records Problem

    Hello,
    I have 2 tables one is ship_pare and another is ship_print.
    Ship_Prepare is a table where I prepare shipment by data entry. I put a button Print whenever I click it all the record from Ship_Prepare will insert into Ship_Print wher I keep all history.
    The below is the statement
    SELECT * FROM SHIP_PREPARE
    INSERT INTO SHIP_PRINT;
    COMMIT;
    I am using since 6 month it was working properly, since 1 week some times the record from Ship_prepare is inserting into Ship_Print and some times not.
    Can anybody help me please, what is the problem.
    Thanks for help,
    Syed Muzzammil.

    Connected to:
    Oracle8i Enterprise Edition Release 8.1.7.4.1 -
    With the Partitioning option
    JServer Release 8.1.7.4.1 - Production
    SQL> create table ship_prepare (col1 integer);
    Table created.
    SQL> insert into ship_prepare values(0);
    1 row created.
    SQL> create table ship_print (col1 integer);
    Table created.
    SQL> insert into ship_print (col1) select col1 from ship_prepare;
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>
    You need to write a little more SQL...

  • Problem inserting record using INSERT INTO

    I am an amateur web builder using some ColdFusion functionality to access information on an Access database. I know very little about ColdFusion syntax, but I'm using Dreamweaver CS3 to help generate most of the code. I'm working on an insert record page to create a user database with login information. I'm not sure what the problem is, but I'm getting a syntax error referencing this particular portion of the code:
    Syntax error in INSERT INTO statement.
    The error occurred in C:\ColdFusion9\wwwroot\Everett\register.cfm: line 22
    Below is the entire page with line 22 (referenced in the error message) in red. Any ideas?
    <cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
    <cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "register">
      <cfquery datasource="everettweb">  
        INSERT INTO Users ([First Name], [Last Name], [Email Address], Password)
    VALUES (<cfif IsDefined("FORM.first_name") AND #FORM.first_name# NEQ "">
    <cfqueryparam value="#FORM.first_name#" cfsqltype="cf_sql_clob" maxlength="255">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.last_name") AND #FORM.last_name# NEQ "">
    <cfqueryparam value="#FORM.last_name#" cfsqltype="cf_sql_clob" maxlength="255">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.email") AND #FORM.email# NEQ "">
    <cfqueryparam value="#FORM.email#" cfsqltype="cf_sql_clob" maxlength="255">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.password") AND #FORM.password# NEQ "">
    <cfqueryparam value="#FORM.password#" cfsqltype="cf_sql_clob" maxlength="255">
    <cfelse>
    </cfif>
      </cfquery>
      <cflocation url="register_success.cfm">
    </cfif>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Main.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <link href="main.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Everett Music Department, Everett, MA</title>
    <!-- InstanceEndEditable -->
    <style type="text/css">
    <!--
    body {
    background-color: #660000;
    -->
    </style>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    <!-- InstanceBeginEditable name="head" -->
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryValidationConfirm.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationConfirm.css" rel="stylesheet" type="text/css" />
    <!-- InstanceEndEditable -->
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    a:link {
    color: #660000;
    a:visited {
    color: #A01D22;
    a:hover {
    color: #FFCC00;
    -->
    </style>
    <link href="main.css" rel="stylesheet" type="text/css" />
    </head>
    <body onload="MM_preloadImages('menu_about_over','menu_ensembles_over.jpg','menu_schools_over.j pg','menu_events_over.jpg','menu_faculty_over.jpg','menu_contacts_over.jpg','menu_home_ove r.jpg','menu_about_over.jpg','menu_links_over.jpg','menu_login_over.jpg')">
    <table width="960" align="center" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="3"><img src="top_border.jpg" width="960" height="20" align="top" /></td>
      </tr>
      <tr align="center">
        <td colspan="3"><a href="index.php"><img src="e_oval_top.jpg" height="100" width="270" border="0" /></a><a href="index.php"><img src="header.jpg" height="100" width="690" border="0" /></a></td>
      </tr>
      <tr>
        <td height="35" width="301"><a href="index.php"><img src="e_oval_bottom.jpg" height="35" width="234" border="0" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','menu_home_over.jpg',1)"><img src="menu_home.jpg" width="67" height="35" name="home" border="0" id="home" /></a></td>
        <td width="251"><ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a class="MenuBarItemSubmenu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('about','','menu_about_over.jpg',1)"><img src="menu_about.jpg" width="71" height="35" name="about" border="0" id="about" /></a>
            <ul>
              <li><a href="#">News</a></li>
              <li><a href="#">History</a></li>
              <li><a href="#">Media</a></li>
            </ul>
          </li>
          <li><a class="MenuBarHorizontal" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('ensembles','','menu_ensembles_over.jpg',1)"><img src="menu_ensembles.jpg" width="98" height="35" name="ensembles" border="0" id="ensembles" /></a>
            <ul>
              <li><a href="#">Band</a></li>
              <li><a href="#">Chorus</a></li>
              <li><a href="#">Strings</a></li>
            </ul>
          </li>
          <li><a class="MenuBarItemSubmenu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('schools','','menu_schools_over.jpg',1)"><img src="menu_schools.jpg" width="82" height="35" name="schools" border="0" id="schools" /></a>
            <ul>
              <li><a href="#">Everett High School</a></li>
              <li><a href="#">English School</a></li>
              <li><a href="#">Keverian School</a></li>
              <li><a href="#">Lafayette School</a></li>
              <li><a href="#">Parlin School</a></li>
              <li><a href="#">Webster School</a></li>
              <li><a href="#">Whittier School</a></li>
            </ul>
          </li>
        </ul>
        </td>
               <td width="408"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('events','','menu_events_over.jpg',1)"><img src="menu_events.jpg" width="74" height="35" name="events" border="0" id="events" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('faculty','','menu_faculty_over.jpg',1)"><img src="menu_faculty.jpg" width="79" height="35" name="faculty" border="0" id="faculty" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('links','','menu_links_over.jpg',1)"><img src="menu_links.jpg" width="66" height="35" name="links" border="0" id="links" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('login','','menu_login_over.jpg',1)"><img src="menu_login.jpg" name="login" width="69" height="35" border="0" id="login" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact','','menu_contact_over.jpg',1)"><img src="menu_contact.jpg" width="100" height="35" name="contact" border="0" id="contact" /></a><img src="menu_spacer_end.jpg" width="20" height="35" /></td>
      </tr>
      <tr height="10">
        <td colspan="3"><img src="menu_bottom_spacer.jpg" height="10" width="960" /></td>
      </tr>
    </table>
    <table width="960" cellpadding="0" cellspacing="0" align="center">
      <tr height="50">
        <td width="30" background="left_border.jpg"><img src="clear.gif" width="30" height="50" /></td>
        <td width="900" bgcolor="#FFFFFF">
          <table width="900" cellpadding="0" cellspacing="0">
            <tr>
              <td width="900" height="350" valign="top"><!-- InstanceBeginEditable name="PageBody" -->
          <form action="<cfoutput>#CurrentPage#</cfoutput>" method="POST" name="register" preloader="no" id="register">
                <table width="100%">
                  <tr>
                    <td colspan="2" class="heading1">Fill in the information below to register for this site:</td>
                  </tr>
                  <tr>
                    <td colspan="2"><img src="clear.gif" height="15" /></td>
                  </tr>
                  <tr>
                    <td width="50%" class="form" align="right">First Name:</td>
                    <td width="50%"><span id="sprytextfield1">
                      <input type="text" name="first_name" required="yes" id="first_name" width="150" typeahead="no" showautosuggestloadingicon="true" />
                      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Last Name:</td>
                    <td><span id="sprytextfield2">
                      <input type="text" name="last_name" required="yes" id="last_name" width="150" typeahead="no" showautosuggestloadingicon="true" />
                      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Email Address:</td>
                    <td><span id="sprytextfield3">
                    <input type="text" name="email" validate="email" required="yes" id="email" width="150" typeahead="no" showautosuggestloadingicon="true" />
                    <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Confirm Email Address:</td>
                    <td><span id="sprytextfield4"><span id="ConfirmWidget">
                    <input type="text" name="email_confirm" validate="email" required="yes" id="email_confirm" width="150" typeahead="no" showautosuggestloadingicon="true" />
                    <span class="confirmInvalidMsg">The values do not match</span></span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Password:</td>
                    <td><span id="sprytextfield5">
                      <input type="password" name="password" required="yes" id="password" width="150" />
                      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Confirm Password:</td>
                    <td><span id="sprytextfield6"><span id="ConfirmWidget">
                      <input type="password" name="password_confirm" required="yes" id="password_confirm" width="150" />
                      <span class="confirmInvalidMsg">The values do not match</span></span></span></td>
                  </tr>
                  <tr>
                    <td> </td>
                    <td><input name="submit" type="submit" id="submit" value="Register" /></td>
                  </tr>
                </table>
          <input type="hidden" name="MM_InsertRecord" value="register" />
          </form>
          <script type="text/javascript">
    <!--
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "email");
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "email");
    var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
    var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6");
    //-->
    </script>
    <script type="text/javascript">
    var ConfirmWidgetObject = new Spry.Widget.ValidationConfirm("sprytextfield4", "email");
    var ConfirmWidgetObject = new Spry.Widget.ValidationConfirm("sprytextfield6", "password");
    </script>
              <!-- InstanceEndEditable --></td>
            </tr>
          </table>
        </td>
        <td width="30" background="right_border.jpg"><img src="clear.gif" width="30" height="50" /></td>
      </tr>
      <tr>
        <td colspan="3" background="footer.jpg" class="footer" height="80"/>This website best viewed using:<br /><a href="http://www.firefox.com"><img src="firefox_logo.gif" width="110" height="40" border="0" /></a></td>
      </tr>
    </table>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    <!-- InstanceEnd --></html>

    Syntax error in INSERT INTO statement.  INSERT INTO Users ([First Name], [Last Name], [Email Address], Password)
    That oh-so-uninformative error is because "Password" is a reserved word with your database driver.  Either escape it by putting square brackets around it too, or rename the column permanently. It is best to avoid using reserved words whenever possible. So renaming the column is the better option.  Also, I would try and avoid using invalid characters like spaces in column names ie "First Name". It is technically allowed, but it requires special handling everywhere which adds unecessary complexity.
    I'm not sure what the problem is, but I'm getting a syntax error referencing this particular portion of the code:
    Do not take the error line numbers as gospel. Sometimes they just indicate that the error is within the vincinty of that line.
    I'm using Dreamweaver CS3 to help generate most of the code
    Unforutnately, DW wizards generate some truly awful and verbose code.  To give you an idea, here is what the query should look like, without all the wizard nonsense.
      <cfparam name="FORM.first_name" default="">
      <cfparam name="FORM.last_name" default="">
      <cfparam name="FORM.email" default="">
      <cfparam name="FORM.FORM.password" default="">
      <cfquery datasource="YourDSNName"> 
        INSERT INTO Users ([First Name], [Last Name], [Email Address], [Password])
        VALUES (
          <cfqueryparam value="#FORM.first_name#" cfsqltype="cf_sql_varchar">
         , <cfqueryparam value="#FORM.last_name#" cfsqltype="cf_sql_varchar">
         , <cfqueryparam value="#FORM.email#" cfsqltype="cf_sql_varchar">
         , <cfqueryparam value="#FORM.password#" cfsqltype="cf_sql_varchar">
      </cfquery>
    CF is pretty easy to learn. You might want to begin perusing the CF documentation and a few tutorials to get more familiar with the language. Since you are working with a database, I would also recommend a  SQL tutorial.

  • Single record insert performance problems

    Hi,
    we have on production environment a Java based application that makes aprox 40.000 single record Inserts per hour into a table.
    We ha traced the performance of this Insert and the medium time is 3ms, that is ok. Our Java architecture is based in Websphere Application Server and we access to Oracle 10g through a WAS datasource.
    But we have detected that 3 or 4 times a day, during aprox 30 seconds, the Java service is not able to make any insertion in that table. And suddenly it makes all the "queued inserts" in only 1 second. That "pause" in the insertion cause problems of navigation because is the top layer there is a web application.
    We are sure that is not a problem with the WAS or the Java code. We are sure that is a problem with the Oracle configuration, or some tunning action for this kind of applications that we don´t know. We first thought it could be a problem with a sequence field in the table. Also, a problem when occurs the change of the redo log. But we've checked it with our DBA and this is not the problem.
    Has anybody any idea of what could be the origin of this extrange behaviour?
    Thanks a lot in advance.
    Jose.

    There are a couple of things you'd need to look at to diagnose this - As Joe says it's not really a JDBC issue from what we know.
    I've seen issues with Oracle's automatic SGA resizing causing sporadic latency in OLTP systems. Another suspect would be log file sync wait events, which are associated with commits. Don't discount the impact of well meaning people using tools like TOAD to query the DB - they can sometimes cause more harm than good.
    Right now I'd suggest you run AWR at 10 minute intervals and compare reports from when you had your problem with a time when you didn't.

  • Problem - Inserting Records into Hashed Tables

    Help for an ABAP Newbie...
    How do I insert records into a hashed table?
    I am trying the following, but get the error message,
    *You cannot use explicit or implicit index operations with types "HASHED TABLE" or "ANY TABLE".  "LT_UNIQUE_NAME_KEYS" has the type "HASHED TABLE".
    TYPES: BEGIN OF idline,
        id TYPE i,
        END OF idline.
      DATA: lt_unique_name_keys TYPE HASHED TABLE OF idline WITH UNIQUE KEY id,
            ls_unique_name_key LIKE LINE OF lt_unique_name_keys.
    " Create a record and attempt to insert it into the internal table.
    " Why does this cause a compilation error message?
    ls_unique_name_key-id = 1.
      INSERT ls_unique_name_key INTO lt_unique_name_keys.
    Thanks,
    Walter

    INSERT ls_unique_name_key INTO TABLE lt_unique_name_keys.

  • Problem about inserting records ? ?

    hello ,
    i want to insert record in table abc which have 3 column
    i want to insert 2 values from xyz table and one values is from variable
    i write following query
    vMYQUERY :='INSERT INTO abc(NO, TYPE, SUB_TRAN) SELECT '||vSR_NO||',TYPE,SUB_TRAN FROM xyz ;
    EXECUTE IMMEDIATE vMYQUERY;
    is it correct ?
    pankaj

    Did it work?
    You could try the USING clause;
    SQL> create table abc(NO number, TYPE varchar2(10), SUB_TRAN varchar2(10))
    Table created.
    SQL> create table xyz(NO number, TYPE varchar2(10), SUB_TRAN varchar2(10))
    Table created.
    SQL> insert into xyz values(0,' col1', 'col2')
    PL/SQL executed.
    SQL> declare
       vmyquery varchar2(100);
       vsr_no number := 99;
    begin
       vmyquery :='INSERT INTO abc(NO, TYPE, SUB_TRAN) SELECT :1,TYPE,SUB_TRAN FROM xyz' ;
       EXECUTE IMMEDIATE vmyquery USING vsr_no;
    end;
    PL/SQL procedure successfully completed.
    SQL> select * from abc
            NO TYPE       SUB_TRAN 
            99  col1      col2     
    1 row selected.

  • XSQL error when trying to insert record

    hi,
    I encounter a problem using INSERT statement in xsql:query action. If I try to use INSERT statement in my xsql page like this:
    <xsql:ze_action bean="TaskentryIn">
    <xsql:query>
    INSERT
    Grundtab( Datum,Startzeit,Endzeit)
    VALUES
    ('{@date}',{'@begin}','{@ende}')
    </xsql:query>
    </xsql:ze_action>
    I always get this xsql-error:
    Statement.executeQuery - No result sets were produced by 'INSERT...'
    So far so good, I think this shouldn't be an error rather a warning.
    But this is not my primary problem.
    Anyway the record is inserted in the DB. But since I call the above <xsql:query>, from within my own action handler, I call a sendRedirect() to my next page after the <xsql:query> tag was processed.
    After sendRedirect(), when I am on my next page, I check the DB for the inserted records, and it shows up that the insert was made two times, so I have two identically records in my DB.
    If I am not sendRedirect() to the next xsql page, then the insert is only made once. So I assume that there is a problem if an xsql-error occurs and afterwards a sendRedirect().
    I am using the same way to make my SELECT statements and I dont have any trouble with them. Only when I use INSERT.
    Any adive or help is appreciated.
    Peter

    <xsql:query> is only for queries.
    Use <xsql:dml> for a DML statement.

  • How to insert records in user defined tables through DI Server API

    Hi All,
    I have created a UDO using some userdefined tables .I am able to insert records in the user defined tables using DI API but problem is that now I want to insert records in those tables using DI Server API but I dont know how to do that please give me some way to do that
    Thanks and Regards
    Utpal

    The AddObject message is :
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
      <env:Header>
        <SessionID>...</SessionID>
      </env:Header>
      <env:Body>
        <dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS">
          <BOM>
            <BO>
              <AdmInfo>
                <Object>...</Object>
              </AdmInfo>
            </BO>
          </BOM>
        </dis:AddObject>
      </env:Body>
    </env:Envelope>
    How to use it with a user defined table ?

  • Dvd recording problems!!!!!!

    Two problems are really bugging me guys. I made a 15 minute video project through imovie imported it to idvd and it recorded the whole project except for the sound. I just bought a Lacie external burner dvd + & - rw. And it ejects my dvd and says the disc cant be used for burning. Insert recordable dvd media. I am using tdk dvd -rw dvd's. What can I do to get the sound. #2 problem : everytime I make an idvd project using the drop zones when I go to pull the project back up my drop zone clips are always missing.Why?
    Thanks guys

    dvd -rw
    #1 RW disks are problematic. Try using "Save as Disk Image" in iDVD, and play that image with the Apple DVD Player. If the image works, then burn it with Disk Utility.
    http://docs.info.apple.com/article.html?artnum=164927
    Also check to make sure the sound track(s) is(are) "checked" in iMovie (far right in the timeline).
    my drop zone clips are always missing
    iDVD only makes "links" to movies/clips when they are used, it does not import them (unless you archive the project). Are the clips/movies from other external drives? Where were they when you added them in the first place?
    John B.

  • Servlet inserting record into postgresql through hibernate

    Hi
    I have developed a servlet. This servlet is inserting record into postgres sql through hibernate using eclispe ide. When I run my code then I find the following exception
    exception
    java.lang.NullPointerException
         hibernate.example.FirstExample.doGet(FirstExample.java:54)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    I have developed the following code
    package hibernate.example;
    public class Contact {
         private String firstName;
         private String lastName;
         private String email;
         private long id;
         public String getEmail() {
         return email;
         public String getFirstName() {
         return firstName;
         public String getLastName() {
         return lastName;
         public void setEmail(String string) {
         email = string;
         public void setFirstName(String string) {
         firstName = string;
         public void setLastName(String string) {
         lastName = string;
         public long getId() {
         return id;
         public void setId(long l) {
         id = l;
    **Now the servlet is**
    package hibernate.example;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.cfg.Configuration;
    public class FirstExample extends HttpServlet     {
         Session session = null;
         public String getServletInfo() {
              return "Servlet connects to PostgreSQL database and displays result of a SELECT";
         public void doGet(HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException {
              try{
                   response.setContentType("text/html");
                   PrintWriter out = response.getWriter();
                   Configuration cfg = new Configuration().configure();
                   SessionFactory factory = cfg.buildSessionFactory();
                   session = factory.openSession();
                   out.println("Inserting Record");
                   Contact contact = new Contact();
                   contact.setId(6);
                   contact.setFirstName("Deepak");
                   contact.setLastName("Kumar");
                   contact.setEmail("[email protected]");
                   session.save(contact);
                   out.println("Done");
              catch(Exception e){
                   System.err.println(e.getMessage());
              finally{
                   session.flush();
                   session.close();
    **web.xml is**
    <web-app>
              <database>
                   <driver>
                   <type>org.postgresql.Driver</type>
              <url>jdbc:postgresql://127.0.0.1:5432/ali</url>
              <user>ali</user>
              <password>ali</password>
                   </driver>
              </database>
              <servlet>
              <servlet-name>FirstExample</servlet-name>
              <servlet-class>hibernate.example.FirstExample</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>FirstExample</servlet-name>
              <url-pattern>/hb</url-pattern>
              </servlet-mapping>
    </web-app>
    **And contact.hbm.xml is**
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
    <class name="hibernate.example.Contact" table="CONTACT">
    <id name="id" type="long" column="ID" >
    <generator class="assigned"/>
    </id>
    <property name="firstName">
    <column name="FIRSTNAME" />
    </property>
    <property name="lastName">
    <column name="LASTNAME"/>
    </property>
    <property name="email">
    <column name="EMAIL"/>
    </property>
    </class>
    </hibernate-mapping>
    **And hibernate.cfg.xml is**
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
    <session-factory>
    <property name="hibernate.connection.driver_class">com.postgressql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:postgresql://127.0.0.1:5432/ali</property>
    <property name="hibernate.connection.username">ali</property>
    <property name="hibernate.connection.password">ali</property>
    <property name="hibernate.connection.pool_size">10</property>
    <property name="show_sql">true</property>
    <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
    <property name="hibernate.hbm2ddl.auto">update</property>
    <!-- Mapping files -->
    <mapping resource="contact.hbm.xml"/>
    </session-factory>
    </hibernate-configuration>
    Pleas tell me that where I have done the mistake and how can I resolove the error.

    ahmadgee wrote:
    Thank u very much.
    First I tried with out the servlet. I took a simple class. But it was displaying the null pointer exception.
    then you still have the problem. do you understand the root cause?
    After then I made a servlet. how was that going to help your null pointer exception?
    Now it is displaying error hibernate.cfg.xml not found.that's part of the problem. where is the servlet reading that file and initializing the session factory? how is it finding that file?
    i don't know where you have that .cfg.xml file, or where the recommended place is where hibernate expects to see it, but i'd bet it needs to be in the CLASSPATH, which means WEB-INF/classes.
    figure out why you get that NPE first, though. the servlet is only making things worse.
    %

  • Insert Record not saving values

    Hi,
    I am extremely new to Dreamweaver. I am using MX2004.
    I am trying to work with a remote database that I created in
    MySQL and I am using PHP.
    I created a PHP page added my form, added my input fields,
    and used the Insert Record wizard to get to my database on the
    server. I also went to the columns section and where it says
    ‘Fieldname’ Does Not Get a Value. I went and chose my
    value from the drop-down Value box. It now says
    ‘Fieldname’ Gets Value From
    ‘FORM.Fieldname’ as ‘Text’ I have done that
    for all the columns that I am asking the users to fill in including
    the fields that are NOT NULL.
    The problem is once I test it, it is not putting the data in
    the database. When I go back and look at my columns in the Insert
    Record Server Behaviors, many of my columns have reverted to
    ‘Fieldname’ Does Not Get a Value.
    For some reason my values are not being saved.
    Can someone help with this?
    Thanks,
    Socaprice

    Thanks Mike. I've sloghtly modified my question and reposted
    here:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid =1322354&enterthread=y
    Do you have any thoughts on this?
    Cheers,
    Roger.

  • Insert records into an Access

    I am trying to insert records into an Access document but
    when trying to execute the action page I get the following:
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Too few
    parameters. Expected 1.
    The error occurred in
    C:\ColdFusion8\wwwroot\ASK\AskAction.cfm: line 17
    15 :
    16 :
    17 : values ('#trim(form.qname)#', '#trim(form.email)#',
    #DateVariable2#, #Val(form.Mathques)#, '#(form.quest)#')
    18 :
    19 : </cfquery>
    SQLSTATE 07002
    SQL insert into table1 (qname,
    email,qdate,recipient,question) values ('bill', '[email protected]',
    13-Oct-08, 0, '45x9 ')
    VENDORERRORCODE -3010
    DATASOURCE ques
    Resources:
    Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;
    SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506;
    InfoPath.2)
    Remote Address 0:0:0:0:0:0:0:1
    Referrer
    http://localhost:8500/ask/ASKform.cfm
    Date/Time 13-Oct-08 09:07 PM
    Stack Trace (click to expand)
    thanks,
    Steve

    what are your data types for the recipient and qdate columns?
    - you could try putting quotes around the date object, i always
    forget if they're needed or not with date objects

  • Oracle forms error frm-40508: unable to insert record

    Hi Everyone,
    I have been having this problem for 2 weeks and I realize that I spent alot of time I couldn't get to fix the problem so I need your help.
    Here is my situation. First, I installed Oracle 10g in my laptop with Oracle forms10g and Oracle forms904i. I had oracle_home folder as the top level structure then I have inside oracle folder, Oracle10g in it own folder, Oracle9i release2 in it own folder. then I created the user account "student" using the system/manager account finally I granted privilleges as follow:
    GRANT ALL PRIVILLEGES
    TO student
    WITH ADMIN OPTION;
    this was working perfecty I didn't need to grant objects privilleges such as
    GRANT INSERT, UPDATE, DELETE
    ON customers
    TO student;
    Then I created a form Application prototype and it works well I could Insert, Update and Delete but now I am creating an e-commerce application prototype I created an new account using a system/manager account as I did previously and grant all privilleges. When I try to grant object privileges the message that I receive says ORA-01919 : role 'INSERT' doesn't exist
    When I run the application I am unable to insert the record through forms I get message frm-40508 Orcle error: unable to insert record.
    I deinstall the Oracle and clean my laptop and did a clean installation using only Oracle Server10g and Oracle Developer10g I am getting the same message frm-40508.
    Can someone please help me on this. the insert command that I am running is a simple one such as
    INSERT INTO customers
    VALUES( block_name.field_name, ....);
    COMMIT;

    frm 40735:When button pressed trigger raised unhanded exceptionplease help me to solve this>
    The FRM-40735 is a generic Unhandled Exception. Please post the full error message so we can better help you.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

Maybe you are looking for

  • Print a Crystal Report

    How do i print a crystal report using SAP B1 SDK's in Delphi?

  • How to create adhoc Wifi Hotspot with iPhone to connect Apple TV for Mirroring and Airplay?

    I don't want to use my iPhone to share or tether my iPad or laptop etc. with my cellular data plan. What I want is to create a hotspot with my iPhone (or iPad) so that I may connect my Apple TV to the adhoc network so I am able to stream video and mu

  • Acrobat Pro 7 quits when creating bookmarks

    I can only go up to Acrobat 7 on my Mac unless I upgrade from OS 10.3.9. PDFs create fine. Create bookmark by highlighting text and hit command-b. Repeat a few times. Save document and Acrobat quits. Original document is Word 2004 for Mac 11.5.0. I s

  • Help! Local server accounts not showing up in Mail accounts?

    Hello. I need some guidence in setting up the Mail server. I have just Mail, AFP, and DNS running, and only 2 user accounts (admin and one other) These accounts are under the local server. Neither of these accounts show up under mail? Workgroup manag

  • LDAP security in ADF11g

    HI, I have already developed a ADF 11g ( JDEV 11.1.2.2.0) Fusion application. I have a user login page, where I need to check the authentication using LDAP + MS active directory. Should the application development start with a ldap already configured