Error with insert using ASP, SQL and ValidationTool Kit

i finally got my 1st of 5 pages setup to insert, validate and
redirect.. but
now i get an error i have no idea what it means
The page loads fine, but when i attempt to submit the page to
insert the
record, i receive the error below...
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Parameterized
Query '(@P1
text,@P2 nvarchar(50),@P3 nvarchar(50),@P4 nvarchar(50),@P5'
expects
parameter @P18, which was not supplied.
/cemp_app1.asp, line 123
Here is the line in question
Line#123 MM_editCmd.Execute
I dont understand why the error mentions Parameterized Query
when im not
doing anything special, just a simple insert(after being
validated)
Below is the insert code that seems to mention parameters
If (CStr(Request("MM_insert")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_has_STRING
MM_editCmd.CommandText = "INSERT INTO dbo.EmpCandidate
(cssn, cfname,
cmname, clname, caddr, caddr1, capt, ccounty, ccity, cstate,
czip, chphone,
cmphone, cophone, qlegal, ost, qref, refemp, webother, qage,
qgrpast,
qgrpastsel, qgrrel, qgrrelsel1, qgrrelsel2, qcontact, qterm,
cdesiredpos1,
cdesiredpos2, cdesiredpay1, cdesiredpay2, cte, availsun1,
availsun2,
availmon1, availmon2, availtue1, availtue2, availwed1,
availwed2,
availthur1, availthur2, availfri1, availfri2, availsat1,
availsat2, casppos,
cattsuce) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param1", 201,
1, 9, Request.Form("cssn")) ' adLongVarChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param2", 202,
1, 50, Request.Form("cfname")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param3", 202,
1, 50, Request.Form("cmname")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param4", 202,
1, 50, Request.Form("clname")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param5", 202,
1, 75, Request.Form("caddr")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param6", 202,
1, 75, Request.Form("caddr1")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param7", 202,
1, 10, Request.Form("capt")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param8", 202,
1, 15, Request.Form("ccounty")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param9", 202,
1, 30, Request.Form("ccity")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param10", 202,
1, 2, Request.Form("cstate")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param11", 202,
1, 5, Request.Form("czip")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param12", 202,
1, 10, Request.Form("chphone")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param13", 202,
1, 10, Request.Form("cmphone")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param14", 202,
1, 10, Request.Form("cophone")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param15", 202,
1, 1, Request.Form("qlegal")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param16", 202,
1, 15, Request.Form("ost")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param17", 202,
1, 10, Request.Form("qref")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param18", 202,
1, 25, Request.Form("refemp")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param19", 202,
1, 25, Request.Form("webother")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param20", 202,
1, 1, Request.Form("qage")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param21", 202,
1, 1, Request.Form("qgrpast")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param22", 202,
1, 10, Request.Form("qgrpastsel")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param23", 202,
1, 1, Request.Form("qgrrel")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param24", 202,
1, 10, Request.Form("qgrrelsel1")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param25", 202,
1, 10, Request.Form("qgrrelsel2")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param26", 202,
1, 3, Request.Form("qcontact")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param27", 202,
1, 1, Request.Form("qterm")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param28", 202,
1, 35, Request.Form("cdesiredpos1")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param29", 202,
1, 35, Request.Form("cdesiredpos2")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param30", 202,
1, 25, Request.Form("cdesiredpay1")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param31", 202,
1, 25, Request.Form("cdesiredpay2")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param32", 202,
1, 15, Request.Form("cte")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param33", 202,
1, 35, Request.Form("availsun1")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param34", 202,
1, 35, Request.Form("availsun2")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param35", 202,
1, 35, Request.Form("availmon1")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param36", 202,
1, 35, Request.Form("availmon2")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param37", 202,
1, 35, Request.Form("availtue1")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param38", 202,
1, 35, Request.Form("availtue2")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param39", 202,
1, 35, Request.Form("availwed1")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param40", 202,
1, 35, Request.Form("availwed2")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param41", 202,
1, 35, Request.Form("availthur1")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param42", 202,
1, 35, Request.Form("availthur2")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param43", 202,
1, 35, Request.Form("availfri1")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param44", 202,
1, 35, Request.Form("availfri2")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param45", 202,
1, 35, Request.Form("availsat1")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param46", 202,
1, 35, Request.Form("availsat2")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param47", 201,
1, -1, Request.Form("casppos")) ' adLongVarChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param48", 201,
1, -1, Request.Form("cattsuce")) ' adLongVarChar
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
End If
End If
%>

Seems Adobe has a bit of a mistake there in the insert
behavior.
This line appears just below the query (you'll see VALUES
with a lot of
question marks):
MM_editCmd.Prepared = true
Change it to
MM_editCmd.Prepared = false
That will fix you up.
"Daniel" <[email protected]> wrote in message
news:f05ce4$s04$[email protected]..
>i finally got my 1st of 5 pages setup to insert, validate
and redirect..
>but now i get an error i have no idea what it means
>
> The page loads fine, but when i attempt to submit the
page to insert the
> record, i receive the error below...
>
>
> Microsoft OLE DB Provider for ODBC Drivers error
'80040e14'
> [Microsoft][ODBC SQL Server Driver][SQL
Server]Parameterized Query '(@P1
> text,@P2 nvarchar(50),@P3 nvarchar(50),@P4
nvarchar(50),@P5' expects
> parameter @P18, which was not supplied.
>
> /cemp_app1.asp, line 123
>
>

Similar Messages

  • Connection error with Crystal Report XI, VB6 and Sybase ASE15

    Hello !
    I have an error #4002 when I want to launch a report in VB6 with the ActiveX Crystal Report Viewer.
    I use Sybase ASE 15 with an ODBC link and the reports run stored procedures.
    This error seems to be an authentification error, but I don't know what parameters are missing or wrong...
    - My reports works well in the report designer.
    - The reports connected to a text file or an ADO recordset work in VB6.
    - The Verify Database works in design mode in VB6.
    - The problem is the same with tables, stored procedures, SQL and with or without parameters...
    - I tried to connect the report to a DataEnvironnment but I get the same error.
    The problem appears when I use the Crystal Wizard to create a form automatically AND when I create objects directly in code like :
        Dim crapp As CRAXDRT.Application
        Dim oReport As CRAXDRT.Report
        Set crapp = New CRAXDRT.Application
        Set oReport = crapp.OpenReport("C:\myreport.rpt")
        CRViewer.ReportSource = oReport
        CRViewer.viewReport
    Please help !

    Hello,
    I don't see any database logon code in what you posted.  You need to log onto the database at runtime since Crystal Reports will never store passwords.
    You can download and review the [Connection Properties|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00635998-751e-2b10-9cba-f50ee1e4ef81] document for more information on how to log onto your database at runtime.  This document was written for CR9, but it's the same for CR10, CR XI (v11.0), and CR XI R2 (v11.5).
    I hope this helps.
    Sincerely,
    Dan Kelleher

  • Logging with whereabouts using open source and freeware

    You can find the html version of this at:
    http://www.acelet.com/whitepaper/loggingWithWhereabouts.html
    Logging with whereabouts using open source and freeware
    The purpose of logging is to find out what had happened when needed. When the
    time comes to read log messages, you want to know both the log message and its
    whereabouts (class name, method name, file name and line number). So you need
    to hard code whereabouts.
    But hard coded whereabouts are very difficult to maintain: when you modify your
    source code, line number changes; when you copy and paste a line, its class name
    and method name change. If whereabouts are wrong, you introduce bugs in your logging
    logic and the log messages are useless at the best.
    This article shows you an example of using freeware Redress tool to rectify whereabouts
    programmatically in your Makefile or Ant build file. So your whereabouts are always
    correct for both Java and JSP source file.
    Redress tool is part of SuperLogging at http://www.ACElet.com. SuperLogging also
    provides an open source wrapper Alog.java, which redirects log method calls to
    your favorite logging package. Redress tool can rectify whereabouts information
    on all Alog's method calls in your application. So, if you call Alog's log methods,
    these calls will be rectified by Redress.
    JDK 1.4 introduces a new utility package java.util.logging. The example in this
    article is based on JDK logging. Log4J is a cousin of JDK logging. Log4J users
    should have no difficulties to modify this example for Log4J. Both JDK logging
    and Log4J are excellent logging software for single JVM.
    Note: Redress tool rectifies method calls on Alog, not JDK logging. You need to
    call Alog instead of JDK logging in your application.
    Source code of Alog.java
    The following is the source code of Alog's JDK logging version. It serves as an
    library file and should be on your CLASSPATH:
    * Copyright Acelet Corp. 2000. All rights reserved
    * License agreement begins >>>>>>>>>> <br>
    * This program (com.acelet.opensource.logging.Alog) ("Software") is an
    * open source software. <p>
    * LICENSE GRANT. The Software is owned by Acelet Corporation ("Acelet").
    * The Software is licensed to you ("Licensee"). You are granted a
    * non-exclusive right to use, modify, distribute the Software for either
    * commercial or non-commercial use for free, as long as: <br>
    * 1. this copyright paragraph remains with this file. <br>
    * 2. this source code (this file) must be included with distributed
    * binary code.<br>
    * NO WARRANTY. This comes with absolutely no warranty. <p>
    * <<<<<<<<<< License agreement ends <p><p>
    * The purpose of releasing this open source program is to prevent vendor
    * lock in. <p>
    * You can code your program using this class to indirectly use Acelet
    * SuperLogging (com.acelet.logging). If later you want to swith to other
    * logging package, you do not need to modify your program. All you have
    * to do is: <p>
    * 1. modify this file to redirect to other logging packages. <br>
    * 2. replace existing com.acelet.opensource.Alog with your modified one. <br>
    * 3. you may have to reboot your EJB server to make the changes effect.<br>
    * <p>
    * This program is just a wrapper. For detail information about the methods
    * see documents of underline package, such as com.acelet.logging.Logging.
    * <p>
    * Visit http://www.ACElet.com for more information.
    * <p>
    * This file is a modified for using JDK logging as an EXAMPLE.
    * <br>
    * You can use Redress tool to keep your whereabouts information
    * always correct. See http://www.ACElet.com/freeware for detail.
    * <p>
    * Please see http://www/ACElet.com/opensource if you want to see the
    * original version.
    package com.acelet.opensource.logging;
    import java.util.logging.*;
    public final class Alog {
    * Log level value: something will prevent normal program execution.
    public static int SEVERE = 1000;
    * Log level value: something has potential problems.
    public static int WARNING = 900;
    * Log level value: for significant messages.
    public static int INFO = 800;
    * Log level value: for config information in debugging.
    public static int CONFIG = 700;
    * Log level value: for information such as recoverable failures.
    public static int FINE = 500;
    * Log level value: for information about entering or returning a
    * method, or throwing an exception.
    public static int FINER = 400;
    * Log level value: for detail tracing information.
    public static int FINEST = 300;
    static Logger logger;
    static {
    logger = Logger.getLogger("");
    public Alog() {
    public static void alert(String subject, String message) {
    public static void error(String text, int level, String fullClassName,
    String methodName, String baseFileName, int lineNumber) {
    String[] para = {lineNumber + "", baseFileName};
    logger.logp(getLevel(level), fullClassName, methodName, text, para);
    public static Level getLevel(int levelValue) {
    if (levelValue == SEVERE)
    return Level.SEVERE;
    else if (levelValue == WARNING)
    return Level.WARNING;
    else if (levelValue == INFO)
    return Level.INFO;
    else if (levelValue == CONFIG)
    return Level.CONFIG;
    else if (levelValue == FINE)
    return Level.FINE;
    else if (levelValue == FINER)
    return Level.FINER;
    else if (levelValue == FINEST)
    return Level.FINEST;
    else
    return Level.ALL;
    public static void log(String text, int level, String fullClassName,
    String methodName, String baseFileName, int lineNumber) {
    String[] para = {lineNumber + "", baseFileName};
    logger.logp(getLevel(level), fullClassName, methodName, text, para);
    public static void sendMail(String to, String from, String subject,
    String text) throws Exception {
    public static void sendMail(String to, String cc, String bcc, String from,
    String subject, String text) throws Exception {
    Test program
    The simple test program is Test.java:
    import com.acelet.opensource.logging.Alog;
    public class Test {
    public static void main(String argv[]){
    Alog.log("Holle world", Alog.SEVERE, "wrongClassName", "wrongMethod",
    "wrongFileName", -1);
    How to run the test program
    1. Compile Alog.java (JDK 1.4 or later, not before):
    javac Alog.java
    2. Download freeware Redress tool from http://ACElet.com/freeware.
    3. Run Redress tool:
    java -cp redress.jar Test.java
    4. Check Test.java. The Alog.log method call should be rectified.
    5. Run test program:
    java Test
    You should see log message with correct class name and method name.

    Hi;
      I found this code and would like to share it with you :
    JCoDestination destination = JCoDestinationManager
      .getDestination(DESTINATION_NAME2);
      JCoFunction function = destination.getRepository().getFunction(
      "RFC_FUNCTION_SEARCH");
      if (function == null)
      throw new RuntimeException("RFC_FUNCTION_SEARCH not found in SAP.");
      function.getImportParameterList().setValue("FUNCNAME", "*");
      function.getImportParameterList().setValue("GROUPNAME", "*");
      try {
      function.execute(destination);
      JCoTable funcDetailsTable = function.getTableParameterList()
      .getTable("FUNCTIONS");
      int totalNoFunc = funcDetailsTable.getNumRows();
      if (totalNoFunc > 0) {
      for (int i = 0; i < totalNoFunc; i++) {
      System.out.println("Function Name: "
      + funcDetailsTable.getValue(i));
      } catch (AbapException e) {
      System.out.println(e.toString());
      return;
      System.out.println("RFC_FUNCTION_SEARCH finished");
    It is working and retrieving FM.
    Regards
    Anis

  • MAT error: 0xHEX is used a class and object...

    Hi there,
    playing around some more with MAT I ran into the following error with some of my dumps. All were taken on 1.5 SUN JVMs (running on either Solaris or Linux).
    org.eclipse.mat.snapshot.SnapshotException: Error: 0x8d776450 is used as class and object simultaneously. Are you using a beta DLL for Sun JDK 1.4.2 to write the heap dump?
    at org.eclipse.mat.hprof.HprofParserHandlerImpl.createRequiredFakeClasses(HprofParserHandlerImpl.java:191)
    at org.eclipse.mat.hprof.HprofParserHandlerImpl.beforePass2(HprofParserHandlerImpl.java:89)
    at org.eclipse.mat.hprof.HprofIndexBuilder.fill(HprofIndexBuilder.java:76)
    at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse(SnapshotFactoryImpl.java:183)
    at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.openSnapshot(SnapshotFactoryImpl.java:101)
    at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(SnapshotFactory.java:77)
    at org.eclipse.mat.ui.internal.ParseHeapDumpJob.run(ParseHeapDumpJob.java:52)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    Since the suggested problem (usage of JDK 1.4.2) is not the case: What else can I do to find out what is going on? Do I need any special switches for jmap? The dumps all were taken with the same command:
    jmap -heap:format=b <pid>
    Still, some work, some do not. Any suggestions?
    bye, Michael

    Hi Michael,
    this smells like a bug. The easiest way again is to have a look at the dump. If you zip it, it should become smaller. I could also provide upload space. Right now, I am at the J1 in San Francisco so it might not be as easy for me to fix this.
    Andreas.

  • How can I create an csv/excel file using pl/sql and then sending that file

    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.

    968776 wrote:
    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.You are trying to do it at a wrong place..
    Whay do you want database (pl/sql) code to do these things?
    Anyhow, you may be interested in :
    {message:id=9360007}
    {message:id=9984244}

  • Writing into Excel file using PL/SQL and formatting the excel file

    Hi,
    I am writing into a excel file using PL/SQL and I want to make the first line bold on the excel. Also let me know if there are any other formatting options when writing into excel.
    Regards,
    -Anand

    I am writing into a excel file using PL/SQL
    Re: CSV into Oracle and Oracle into CSV
    check that thread or search in this forum...

  • Error with internet plug-in message and blocked plugin

    On my MacBook Air Im receiving a error with internet plug-in message and blocked plugin which will not allow video clips to play i.e. YouTube. How do I correct this?

    When you have installed the latest version of Flash, relaunch Safari and test.
    If you're getting a "blocked plug-in" error, then in System Preferences… ▹ Flash Player ▹ Advanced
    click Check Now. Quit and relaunch your browser, but check this also:
    http://support.apple.com/kb/HT5655?viewlocale=en_US&locale=en_US  which also covers ‘blocked plug-in’.

  • Can we do poduct costing with out using cost sheet  and overhead rates

    Hi,
    can we do product costing with out using cost sheets and overhead rates.
    In that cast , how the cost estimation happens ?

    Hi,
    a costing sheet is used to calculate (on a base) overhead values. If you dont need / want to use this functionality just create/use a costing variant where not costing sheet is assigned.
    Use this costing variant in CK11N or KKPAN, depending if ou have a quantity structure or not.
    best regards, Christian

  • Error upon inserting data in sql Database using stream analytics job: Datatye error conversion

    I have a data passed into the Event Hubs, queried by stream analytic job inserting it into sql database. Upon running the job, it becomes idle a few seconds after since it has an error:
    Message: Conversion from 0 to System.Boolean failed. 0 was of type - System.Int64.
    Conversion from 0 to System.Boolean failed. 0 was of type - System.Int64. Exception message at level [1], exception number [0], parent exception number [0]: Conversion from 0 to System.Boolean failed. 0 was of type - System.Int64.
    The data type in one of my field(IsHistorical) is Boolean with a value of false. The data type of the column in the sql table where this is to be inserted is of type bit. In this case, it seems that stream analytics could not convert the value "false"
    into a bit data type when inserting in sql table.
    I'm wondering if you already have encountered this problem. Could you help me resolve this problem?
    Thank you.

    Azure Stream Analytics does not have Boolean type. On input we will convert JSON Boolean value to bigint.
    Here is the list of supported types and conversions:
    https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx 
    You  can fix this erro by changing column type from bit to int in SQL table schema.

  • Error while inserting into MS-SQL Server from Oracle using HS

    Hi,
    I am using hetrogeneous connection.
    I want to insert into MS-SQL Server Table by selecting from Oracle Tables.
    insert into tableone@mssql select * from table2;
    Table2 is in oracle database.
    while executing i'm getting
    ORA-02025: all tables in the SQL statement must be at the remote database
    Please guide me.
    Regards
    Salih KM

    some guy come up a solution by himself before. go ahead and try it
    ORA-02025 error while insert into emp@custard select ....

  • Error when insert data in Sql Server table(DateTime data type)

    Hello all,
    I have created a database link in oracle 11g to SQL Server 2008 using Sqlserver gateway for oracle,Oracle run on Linux and SQL Server run on Windows platform.
    I have queried a table and it fetches rows from the target table.
    I am using this syntax for insert a row in Sql Server table.
    Insert into Prod@sqlserver (NUMITEMCODE, NUMPREOPENSTOCK, NUMQNTY, NUMNEWOPENSTOCK, DATPRODDATE , TXTCOMPANYCODE, "bolstatus", NUMRESQNTY )
    Values (1118 , 1390.0 , 100.0 ,1490 , '2012-06-23 12:37:58.000','SFP' ,0 , 0 );
    but it give me error on DATPRODDATE,The data type of DATPRODDATE column in Sql Server is DATETIME.
    My Question is how can i pass the date values in INSERT statement for Sql Server DateTime data type.
    Regards

    Just as with Oracle, you have to specify the date using the to_date() function or use the native date format for the target database (if you can figure out what that is). This is good practice anyway and a good habit to get into.

  • Error while inserting data in SQL Server.

    Hi',
    I am using SOA 11.1.1.5
    I am inserting data using DB adapter in MS SQL Server. Some times I get below error.
    Error Message: {http://schemas.oracle.com/bpel/extension}bindingFault
    Fault ID     rrr/xxx!1.1*soa_313bd437-7bb9-41c6-a719-d1775b9afc4b/xx/4115908-BpInv0-BpSeq1.6-4
    Fault Time     Dec 24, 2012 8:02:09 AM
    Non Recoverable System Fault :
    <bpelFault><faultType>0</faultType><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [InsertIntoStagingxx.Stagingxx]. Caused by java.sql.BatchUpdateException: String or binary data would be truncated.. Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-8152" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary></part><part name="detail"><detail>String or binary data would be truncated.</detail></part><part name="code"><code>8152</code></part></bindingFault></bpelFault>
    Please advice.
    Thanks
    Yatan

    Hi Yatan,
    This should be due to data issues. And the error message is due to data truncation issues.
    Please check your payload that you are trying to insert into the SQL server table.
    One or more fields might have a data that is exceeding its defined length with respect to the table definitions.
    Problem with using SQL server is that while inserting, you will not be pointed towards which field or column is causing the error.
    You have to take the pain of searching through the entire payload to find the problem causing ones.
    Thanks,
    Deepak.

  • How to generate formated (defined position) text and image using pl/sql and

    Hello,
    I need to use pl/sql to create a dynamic html page (or image , if possible) with defined positions for text and bar code. It is necessary because the page will be printed and it should be able to be read by one other process , OCR, that needs to have all the data in defined positions.
    Any suggestion are welcome.
    Thanks in advance,
    Emilio

    I don't think it's that easy. Notice that if you put the insert into an actual pl/sql block, you don't get the correct column pointer anymore.
    BEGIN insert into bob(col1, col2) values (123.12, 12345.12); END;
    ERROR at line 1:
    ORA-01438: value larger than specified precision allows for this column
    ORA-06512: at line 1
    Richard

  • Runtime error when inserting rows in hrp1018 and hrt1018 tables

    Hi All,
    I have a requirement to insert row in hrp1018 and hrt1018 tables.These tables are interlinked.So, I have used FM 'RH_INSERT_INFTY'. The exact code which I have used is as follows.
    *****************************************code***************************************************************
    << Please post only the relevant portion of the code >>
    The runtime error which is coming is as follows:
    Error analysis
        An internal error in the database interface occurred during access to
        the data of table "HRT1018 ".
        The situation points to an internal error in the SAP software
        or to an incorrect status of the respective work process.
        For further analysis the SAP system log should be examined
        (transaction SM21).
        For a precise analysis of the error, you should supply
        documents with as many details as possible.
    Please let me know why this error is coming.I am not able to find out mistake in the FM and form used in the code.
    Thanks in advance,
    BBKrishna.
    Edited by: Rob Burbank on Jun 9, 2009 1:31 PM

    I am adding the code once again.Please let me know why the error is coming up.
    lv_mproj = 'BLDNG'.
      wa_p1018-mandt = sy-mandt.
      wa_p1018-otype = '9M'.
      wa_p1018-objid = '50009650'.
      wa_p1018-begda = '20090608'.
      wa_p1018-endda = '99991231'.
      wa_p1018-infty = '1018'.
      wa_p1018-plvar = '01'.
      wa_p1018-otype = '9M'.
      wa_p1018-istat = '1'.
      append wa_p1018 to it_p1018.
      repid = sy-repid.
    *Updating hrp1018 and hrt1018 tables
      CALL FUNCTION 'RH_INSERT_INFTY'
        EXPORTING
        FCODE                     = 'INSE'
        VTASK                     = 'D'
         AUTHY                    = ' '
          REPID                   =  repid
          FORM                    = 'FILL_TABS'
        TABLES
          INNNN                   = it_p1018
    EXCEPTIONS
       NO_AUTHORIZATION          = 1
       ERROR_DURING_INSERT       = 2
       REPID_FORM_INITIAL        = 3
       CORR_EXIT                 = 4
       BEGDA_GREATER_ENDDA       = 5
       OTHERS                    = 6
      IF SY-SUBRC <> 0.
        CALL FUNCTION 'BALW_BAPIRETURN_GET'
          EXPORTING
            TYPE                             = SY-MSGTY
            CL                               = sy-msgid
            NUMBER                           = SY-MSGNO
      PAR1                             = ' '
      PAR2                             = ' '
      PAR3                             = ' '
      PAR4                             = ' '
      LOG_NO                           = ' '
      LOG_MSG_NO                       = ' '
         IMPORTING
           BAPIRETURN                        = return_rec
    EXCEPTIONS
      ONLY_2_CHAR_FOR_MESSAGE_ID       = 1
      OTHERS                           = 2
        IF SY-SUBRC <> 0.
            lv_mproj = text-011
                      ELSE.
                      ii_return = return_rec.
                      CONCATENATE                  ii_return-type '-' ii_return-message
                      INTO lv_err_msg SEPARATED BY SPACE.
        ENDIF.
      ENDIF.
    *RHCD_TAB-PROZT
       FORM fill_tabs TABLES ins_tab
                   USING ins_set ins_index.
      DATA : BEGIN OF set.
              INCLUDE STRUCTURE wplog.
      DATA : END   OF set.
      DATA: BEGIN OF h_pt1018.             "to initialize INS_TAB
              INCLUDE STRUCTURE pt1018.
      DATA: END OF h_pt1018.
      REFRESH ins_tab.
      set = ins_set.
      CASE set-infty.
        WHEN '1018'.
          h_pt1018-posnr = lv_mproj.
          h_pt1018-prozt = '100.00'.
          IF NOT ( h_pt1018 IS INITIAL ).
            CLEAR ins_tab.
            ins_tab+36(8) = lv_mproj. "h_pt1018.
            ins_tab+134(5) = '100.00'.
            APPEND ins_tab.
          ENDIF.
      ENDCASE.
    ENDFORM.

  • ODI error-THIS CLAUSE USES MULTIPLE CONNECTIONS AND THEREFORE CANNOT BE EXE

    Hi John,
    I have tried loading the smartlist values and the following error is encountered.
    THIS CLAUSE USES MULTIPLE CONNECTIONS AND THEREFORE CANNOT BE EXECUTED ON THE SOURCE

    Hi John,
    I am still facing the some problem.
    I have updated the join with the expression like yours
    then ran the interface
    The exception is as follows
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 26, in ?
    java.sql.SQLException: Table not found: EXCEPTION in statement [select   C1_PERIOD    "Period",C2_ACCOUNT    "Account",C3_ENTITY    "Entity",C4_EMPLOYEE    "Employee",C5_YEAR    "Year",C6_SCENARIO    "Scenario",C7_VERSION    "Version",'Local'    "Currency",'HSP_InputValue'    "HSP_Rates",CASE WHEN C10_ENTRY_ID IS NULL
    THEN C8_DATA
    ELSE C10_ENTRY_ID
    END    "Data" from "C$_1Totplan_WrkforceData"   left outer join "C$_0Totplan_WrkforceData"   ON C8_DATA=C11_NAME
    AND C9_ENUMERATION_ID=
    (SELECT ENUMERATION_ID FROM Exception]
         at org.hsqldb.jdbc.jdbcUtil.sqlException(jdbcUtil.java:67)
         at org.hsqldb.jdbc.jdbcStatement.fetchResult(jdbcStatement.java:1598)
         at org.hsqldb.jdbc.jdbcStatement.executeQuery(jdbcStatement.java:194)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
         at org.python.core.PyMethod.__call__(PyMethod.java)
         at org.python.core.PyObject.__call__(PyObject.java)
         at org.python.core.PyInstance.invoke(PyInstance.java)
         at org.python.pycode._pyx5.f$0(<string>:26)
         at org.python.pycode._pyx5.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java)
         at org.python.core.PyCode.call(PyCode.java)
         at org.python.core.Py.runCode(Py.java)
         at org.python.core.Py.exec(Py.java)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.h.y(h.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    java.sql.SQLException: java.sql.SQLException: Table not found: EXCEPTION in statement [select   C1_PERIOD    "Period",C2_ACCOUNT    "Account",C3_ENTITY    "Entity",C4_EMPLOYEE    "Employee",C5_YEAR    "Year",C6_SCENARIO    "Scenario",C7_VERSION    "Version",'Local'    "Currency",'HSP_InputValue'    "HSP_Rates",CASE WHEN C10_ENTRY_ID IS NULL
    THEN C8_DATA
    ELSE C10_ENTRY_ID
    END    "Data" from "C$_1Totplan_WrkforceData"   left outer join "C$_0Totplan_WrkforceData"   ON C8_DATA=C11_NAME
    AND C9_ENUMERATION_ID=
    (SELECT ENUMERATION_ID FROM Exception]
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.h.y(h.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Edited by: Sravan Ganti on May 4, 2009 6:07 AM

Maybe you are looking for