How do I run a database procedure that inserts data into a table from withi

How do I run a database procedure that inserts data into a table from within a Crystal report?
I'm using CR 2008 with an Oracle 10i database containing a number of database tables, procedures and packages that provide the data for the reports I'm developing for my department.  However, I'd like to know when a particular report is run and by whom.  To do this I have created a database table called Report_Log and an associated procedure called prc_Insert_Entry that inserts a new line in the table each time it's called.  The procedure has 2 imput parameters (Report_Name & Username), the report name is just text and I'd like the username to be the account name of the person logged onto the PC.  How can I call this procedure from within a report when it's run and provide it with the 2 parameters?  I know the procedure works, I just can't figure out how to call it from with a report.
I'd be grateful for any help.
Colin

Hi Colin, 
Just so I'm clear about what you want: 
You have a Stored procedure in your report.  When the report runs, you want that same procedure to write to a table called Report_Log. 
If this is what you want the simple answer is cannot be done.  Crystal's fundamental prupose is to read only, not write.  That being said, there are ways around this. 
One way is to have a trigger in your database that updates the Report_Log table when the Stored Procedure is executed.  This would be the most efficient.
The other way would be to have an application run the report and manage the entry. 
Good luck,
Brian

Similar Messages

  • Insert data into fact table from source database tables

    here i try to insert data into fact table from source database tables here is the query 
    ALTER procedure [dbo].[facttable]
    as
    insert into [pp dw].dbo.Dimfact(Prod_ID,Production_ID,Material_ID,Equip_ID,WC_ID,Recipe_ID,Quantity,costprice)
    select Products.[Product ID],[Production ID],Materials.[Material ID],[Equipment ID],[Work Centre ID],[Recipy ID],Quantity,[cost price]
    from
    [PRODUCTION PLANNING 2].dbo.[Products],
    [PRODUCTION PLANNING 2].dbo.[Production Detail],
    [PRODUCTION PLANNING 2].dbo.[Material category],
    [PRODUCTION PLANNING 2].dbo.[Materials],
    [PRODUCTION PLANNING 2].dbo.[Equipment],
    [PRODUCTION PLANNING 2].dbo.[Working Centre] ,
    [PRODUCTION PLANNING 2].dbo.[Recipies]
    where
    Products.[Product ID] in (13, 14, 15, 16, 17) and
    [Production Detail].[Production ID] in (1, 2, 3) and
    [Materials].[Material ID] in (1, 2, 3, 4, 5) and
    [Equipment].[Equipment ID] in (1, 2, 3, 4) and
    [Working Centre].[Work Centre ID] in (1, 2, 3) and
    [Recipies].[Recipy ID] in (1, 2, 3) and
    [Material category].[Category ID] in (8, 9, 10, 11, 12, 13)
    and when i execute query it shows me error 
    The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Dimfact_Dimproduct". The conflict occurred in database "pp dw", table "dbo.Dimproduct", column 'Prod_ID'.
    ERD IS
    HOW TO SOLVE THIS PROBLEM?

    I cant see any join conditions in your query posted. Whats the purpose of the query above. It will just bring you a cartesian product (cross join) of tables involved subjected to filters. Are you sure this is the correct query?
    The error you're getting may be because you've not yet populated DimProduct or may be because of logic you used in popultaing DimProduct causing it to miss some records which is what query is referring to in above case.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to insert data into two tables linke with foreign key..

    I have two tables
    1)EMP(emp_ID,username,emp_type_code)
    emp_ID is primary key, emp_type_code is a foreign key references emptype table.
    2)emptype(emp_type_code,emp_type_descripton)
    emp_type_code is primary key
    Could anyone help me ..how to insert data into EMP table. How to insert data into two tables linke with foreign key..

    CREATE TABLE "CATDB"."DWDIMUSER"
    "USER_ID" NUMBER(10,0) NOT NULL ENABLE,
    "SPECIALTY_ID" NUMBER(10,0),
    "FULLNAME" VARCHAR2(20 BYTE),
    "FNAME" VARCHAR2(20 BYTE),
    "LNAME" VARCHAR2(20 BYTE),
    "USER_SUBTYPE" VARCHAR2(20 BYTE),
    CONSTRAINT "DIMUSER_PK" PRIMARY KEY ("USER_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE,
    CONSTRAINT "DIMUSER_DIMSPECIALTY_FK" FOREIGN KEY ("SPECIALTY_ID") REFERENCES "CATDB"."DWDIMSPECIALTY" ("SPECIALTY_ID") DISABLE
    CREATE TABLE "CATDB"."DIMSPECIALTY"
    "SPECIALTY_ID" NUMBER(10,0) NOT NULL ENABLE,
    "SPECIALTY_NAME" VARCHAR2(100 BYTE),
    CONSTRAINT "DIMSPECIALTY_PK" PRIMARY KEY ("SPECIALTY_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE
    INSERT INTO DIMUSER (FullName, FNAME, LNAME, USER_TYPE, USER_SUBTYPE)
    SELECT DISTINCT
    Engineer AS FullName,
    regexp_substr(Engineer , '[^,| ]+', 1, 1) as FName,
    regexp_substr(Engineer , '[^,| ]+', 1, 2) as LName ,
    'Engineer'
    FROM EMPLOYEELOOKUP;
    INSERT INTO DIMSPECIALTY (SPECIALTY_NAME)
    SELECT DISTINCT SPECIALITY
    FROM EMPLOYEELOOKUP;
    COMMIT;
    CREATE TABLE employeelookup ...IS A TABLE THAT HAS ALL THE DATA NEDED TO BE FILLED IN BOTHE TABLES...
    CREATE TABLE "CATDB"."EMPLOYEELOOKUP"
    "EMPLOYEELOOKUP_ID" NUMBER(10,0) NOT NULL ENABLE,
    "ENGINEER" VARCHAR2(25 BYTE),
    "SPECIALTY" VARCHAR2(20 BYTE),
    CONSTRAINT "DIMSPECIALTY_PK" PRIMARY KEY ("EMPLOYEELOOKUP_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE
    DATA IN EMPLOYEELOOKUP
    Engineer, Specialty,
    John, Dow, Electronis,
    Dow, Jons, Technician
    Stan Smithers Sales
    Mark, Richards Marketing
    Jenny, Lane Marketing
    John, Lee Sales
    I NEED TO LOAD THE FOREIGN KEY IN DIMUSER FROM THE DIMSPECIALTY TABLE?
    BY USING THE LOOKUP TABLE TO MARCH THE NAMES UNDER THE Engineer COLUMN, SPECIALTY COLUMNE DISTICTIVLY BY JOINING THE DIMSPECILTY TO RISTIVE THE PRIMARY KEY AND FILL IT IN THE DIMUSER TABLE AS A FOREIGNE KEY.

  • How to insert data into a table from an xml document

    using the XmlSql Utility, how do I insert data into a table from an xml document, using the sqlplus prompt.
    if i use the xmlgen.insertXML(....)
    requires a CLOB file, which i dont have, only the xml doc.
    Cant i insert directly from the doc to the table?
    the xmlgen examples I have seen first convert a table to a CLOB xmlString and then insert it into another table.
    Isnt there any other way?

    Your question is little perplexing.
    If you're using XML SQL Utility from
    the commandline, just use putXML.
    java OracleXML putXML
    null

  • Single form that puts data into 5 tables

    Hi,
    I'm new to ApEx, I want to create a name and address form, that puts data into 5 tables at once, all on the same form.
    Is this possible with ApEx looking at the tables?
    or do I need to create a database procedure and point ApEx at that?
    I have a couple of books, but I can't find an example that does what I want to do.
    A URL to another resource would be a great help.
    Regards
    Michael

    Hi,
    I can't remember the exact reason,
    It was something to do with there being a many to one to many join in the tables in the view.
    [table] > [link table] < [table]
    then there isn't a parent child relationship in either direction.
    I think that the other problem in webdb was the view was updated using a 'like' command
    This was not good as the primary key is a number.
    Since we are probably migrating to ApEx, and a procedure already exists to perform this functionality, I'll give that a try.
    Regards
    Michael

  • How to insert data into two tables at once using XSJS

    Hello Experts,
    My requirement is to insert data into two tables at once. I have a XS JS app and want to update these tables via xsjs. How can I do this ?
    Is there any mechanism like sql 'transactions' also in Hana ? If yes, how can I call it via xsjs ? If not, what are the ways to populate two different tables at once.
    Please advice. Any help is really appreciated.
    Thanks !

    There is nothing special about inserting into two tables at once in XSJS. Just issue two separate SQL Statements.  Don't execute the COMMIT until after both commands.  That way they are all one transaction.

  • How to insert date into a table by selecting form sysdate

    Hi
    My Table format is like this
    SQL>desc log;
    Name Null? Type
    EMP_ID VARCHAR2(30)
    LOGIN DATE
    LOGOUT DATE
    now when ever an employee logs in i w'd like to insert date into the table.
    i put up the following query
    SQL> insert into log(emp_id,login)
    2 values
    3 ('Ed_01',
    4 select
    5 sysdate
    6 from dual
    7 );
    select
    ERROR at line 4:
    ORA-00936: missing expression
    I got the above error how can i rectify that plz suggest me very urgently as i have to submit my project very early to my boss.

    try this :
    insert into log(emp_id,login) values ('Ed_01', sysdate);

  • How to insert data into a table only when data has changed its value (when compared to the previous inserted value)

    I wish to insert data into a table only when the value of the inserted data has changed. Thus, in a time series, if the value of the data at time, t-1, is 206 then if the data to be inserted at time t is 206, then it is skipped (not entered).
    If the value of the data at time t+1 is 206, it is skipped also; until the value changes, so if the value at t+1 was 205, then that would be inserted, and if at time t+2 the data is 206, it would be inserted too.
    What is the best way to do it without increasing overheads?

    This view works:
    SELECT
    i.IDNO,i.[Date],i.[Level]
    FROM
    mytable i
    INNER
    JOIN mytable
    d
    ON
    d.IDNO
    = i.IDNO-1
    WHERE
    i.[Level]
    <> d.[Level]
    on this mytable below.  A trigger could be quite useful here although I am cautious using them. However I wish to avoid the overhead by not having a temp table (which could be sizable).  mytable below
    should give 3 lines. The IDNO is an identity column.
    IDNO
    Item
    Date
    Level
    1
    X24
    12/23/13 10:41
    22996
    2
    X24
    12/23/13 10:41
    22996
    3
    X24
    12/23/13 9:21
    23256
    4
    X24
    12/23/13 9:21
    23256
    5
    X24
    12/23/13 9:22
    23256
    6
    X24
    12/23/13 9:22
    23256
    7
    X24
    12/23/13 9:22
    22916

  • How do you access a web service to insert data into table?

    Ok I have a simple html/jsp survey form to host on our web site. Because of firewall issues I cannot do a direct connect to the database and insert the data from the form. So I need to take the data from the survey form, and pass it to an existing web service, or create a web service that will insert this information for me into the database table?
    Thanks again.
    orozco

    Thanks for the reply shanu. Well, because of firewall issues, as a work around we use a web service to insert data into the database table. Since the Web Service already exist, we just thought it would be easy enough just to pass the parameters to it, and have it do the insert. So really all I need is just to communicate with the already existing web service. I will be honest though I have not really worked with web services before.
    orozcom

  • Procedure to insert data into table by selecting data from another table

    Hi all,
    I have to create a procedure where i have to select the data from one table and insert it into another table. Any help on this. And i have to update the 2nd table also when ever new records got inserted in the 1st table then.
    Regards

    Hi, you can try something like:
    CREATE [OR REPLACE] PROCEDURE procedure_name
    IS
    BEGIN
    INSERT INTO TABLE1
    VALUES (SELECT * FROM TABLE2);
    END;
    For the other part you may create a trigger on the first table AFTER INSERT to insert the values in the second table too.

  • How to use record type for inserting data into a table

    I've read through the web the following tip:
    "When working with a large number of columns, using variables of type RECORD is a better approach. With this approach, you do not have to list anything in the INSERT statement, because you are inserting a variable into the table that is defined as a row from the same table."
    I usually define a variable as
    r_mytable     mytable%ROWTYPE;
    and inside my procedure I'll set the fields I need as
    r_mytable.field1 := 1;
    r_mytable.field3 := 7;
    and then I perform the insert as
    insert into mytable
    (field1,
    field3)
    values
    (r_mytable.field1,
    r_mytable.field3);
    According to the tip I've copied above, how can I use the TYPE RECORD of pl/sql for achieving the same result but perhaps in a smarter way?
    Thanks in advance!

    Hi,
    Are you looking for this?
    SQL> create table table1 (id number, descr varchar2(30));
    Table created
    SQL>
    SQL> DECLARE
      2   my_rec table1%rowtype;
      3  BEGIN
      4   my_rec.id := 1;
      5   my_rec.descr := 'TEST';
      6   insert into table1 values my_rec;
      7  END;
      8  /
    PL/SQL procedure successfully completed
    SQL> select * from table1;
       ID DESCR
        1 TESTWorks with UPDATE too :
    SQL> DECLARE
      2   my_rec table1%rowtype;
      3  BEGIN
      4   my_rec.id := 2;
      5   my_rec.descr := 'TEST2';
      6   update table1 set row = my_rec where id = 1;
      7  END;
      8  /
    PL/SQL procedure successfully completed
    SQL> select * from table1;
       ID DESCR
        2 TEST2

  • Problem using a SQL database Catalogue to insert data to a table

    I am developing with Version:
    10.3.1.0, Build: #99765....
    as part of a step in my process I need to store some data in an audit table.
    I have setup the SQL Catalogue entry and then use the following code:
    sentMail is defined as a local variable
    sentMail = RSPCA.Resources.RSPCA.R_SENTEMAIL()
    sentMail.sentemailBody = sendInternalRequest.htmlbody
    sentMail.sentemailDatesent = Fuego.Lang.Time
    sentMail.sentemailSubject = subject
    sentMail.sentemailTo = creation.participant.email
    sentMail.sentemailType = "People"
    store sentMail
    This works if I comment out this line:
    sentMail.sentemailBody = sendInternalRequest.htmlbody
    The issue I'm having maybe something to do with the size of the data, in oracle the field is a varchar2(4000) and it looks like the catalogue treats it as a String(4000), if I make sure I only put around 1500 characters in the field it works, but as soon as I put all in from my test data (about 2300) it fails with this message:
    The method 'CIL_sendToHQ' from class 'EstablishmentManagement.EMMaintainPeopleProcess.Default_1_0.Instance' could not be successfully executed.
    Caused by: [BEA][Oracle JDBC Driver][Oracle]ORA-01461: can bind a LONG value only for insert into a LONG column
    Caused by: [BEA][Oracle JDBC Driver][Oracle]ORA-01461: can bind a LONG value only for insert into a LONG column
    fuego.lang.ComponentExecutionException: The method 'CIL_sendToHQ' from class 'EstablishmentManagement.EMMaintainPeopleProcess.Default_1_0.Instance' could not be successfully executed.
         at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:519)
         at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:273)
         at fuego.fengine.FEEngineExecutionContext.invokeMethodAsCil(FEEngineExecutionContext.java:219)
         at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1278)
         at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.runCil(ComponentExecutionMicroActivity.java:126)
         at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.execute(ComponentExecutionMicroActivity.java:84)
         at fuego.server.execution.microactivity.MicroActivityEngineExecutionHandler.executeActivity(MicroActivityEngineExecutionHandler.java:57)
         at fuego.server.execution.ImmediateActivity.execute(ImmediateActivity.java:42)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
         at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:62)
         at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42)
         at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:251)
         at fuego.server.execution.ToDoItem.run(ToDoItem.java:536)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:775)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
         at fuego.fengine.ToDoQueueThread$PrincipalWrapper.processBatch(ToDoQueueThread.java:450)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
    Caused by: fuego.components.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-01461: can bind a LONG value only for insert into a LONG column
         at fuego.sql.TableSQLObject.implicitStore(TableSQLObject.java:409)
         at fuego.sql.TableSQLObject.store(TableSQLObject.java:340)
         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 fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
         at fuego.sql.SQLObject.invoke(SQLObject.java:364)
         at fuego.lang.Invokeable.invokeImpl(Invokeable.java:234)
         at fuego.lang.Invokeable.invokeDynamic(Invokeable.java:188)
         at EstablishmentManagement.EMMaintainPeopleProcess.Default_1_0.Instance.CIL_sendToHQ(Instance.xcdl:100)
         at EstablishmentManagement.EMMaintainPeopleProcess.Default_1_0.Instance.CIL_sendToHQ(Instance.xcdl)
         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 fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:512)
         ... 23 more
    Caused by: java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-01461: can bind a LONG value only for insert into a LONG column
         at albpm.jdbc.base.BaseExceptions.createException(Unknown Source)
         at albpm.jdbc.base.BaseExceptions.getException(Unknown Source)
         at albpm.jdbc.oracle.OracleImplStatement.execute(Unknown Source)
         at albpm.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at albpm.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
         at albpm.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
         at fuego.jdbc.FaultTolerantPreparedStatement.executeUpdate(FaultTolerantPreparedStatement.java:623)
         at fuego.sql.TableSQLObject.insert(TableSQLObject.java:626)
         at fuego.sql.TableSQLObject.implicitStore(TableSQLObject.java:391)
         ... 39 more
    Edited by: user10778731 on 21-Jan-2010 06:17

    Suspect you're not going to like this answer, but I never use the store() method for a database heir object anymore.
    The store() database method has been broken and then fixed and then broken again on too many release cycles to trust that it will work consistently as MPs/Hotfixes are applied. I'd suspect that your "String(4000)" problem might also be related to using the store() method.
    Others will probably disagree, but only use the OOTB PBL (JDBC) SQL or Dynamic SQL in the PBL logic. In your case, I think you might be best served by using Dynamic SQL. With Dynamic SQL you don't run into the shortcomings of JDBC SQL (String(4000) might be one of them) and you can then test / debug your SQL in your favorite DB tool of choice first (e.g. Toad, Squirrel, Sql Plus). Once successfully tested, you can then paste it back into your PBL.
    Dan

  • How to insert data into Oracle db from MySQL db through PHP?

    Hi,
    I want to insert my MySQL data into Oracle database through PHP.
    I can access Mysql database using mysql_conect() & Oracle database using oci_connect() through PHP.
    Now How can I insert my data which is in MySQL into Oracle table. Both table structure are exactly same.
    So I can use
    insert into Oracle_Table(Oracle_columns....) values(Select * from MySQL_Table);
    But again problem is I can't open both connections at the same time.
    So has anyone done this before or anyone having any other idea..
    Plz guide me...

    You can do it if you setup a ODBC Gateway between MYSQL and Oracle DB. Then you can directly read from MySQL table using DB links and insert into Oracle table in one single SQL Statement.
    Otherwise you need to fetch the data from MySQL Into variables in your PHP Program and then insert into Oracle after binding the variables to the insert statement for Oracle. Hope that is clear enough.
    Regards
    Prakash

  • How can i Configure JDBC Receiver Adapter to INSERT data in multiple tables

    Hi ,
    I want to INSERT data in 4 diffrent tables.
    Input Data Format is:
    <H1>
      <d1></d1>
       <d2></d2>
    </H1>
    I want to insert <H1> Header data in particular table & all the details data<D1> in their corresponding table.
    Note that Header Can't repeat but Details records are repeating again & again.
    Is it possible to write Multiple INSERT STATEMENT in single Data Type.??
    I mean to say can we write STATEMENT keyword again & again. if yes HOW ?

    Hi
    see below links.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    Regards
    Chilla..

  • I need to insert data into multiple tables - how?

    Using ASP, VBScript & MS SQL -
    My main table has a PK with the name projectID, this field is
    updated automatically in SQL. I need that ID in order to populate
    the rest of the tables. How do I retrieve this ID before moving on
    to the next page(s)?
    I've seen some similar questions but none have really been
    answered, Hoping this time is the charm.
    Thanks

    Post your SQL statements and I will put this into a Stored
    Procedure for
    you. This will give you far more flexibility and will run
    more efficiently.
    I may not be able to do it tonight though as I am about to go
    out.
    "Mark.P." <[email protected]> wrote in message
    news:[email protected]...
    >I do have that option but I don't know how to write them.
    I don' t
    >normally do
    > this kind of thing but due to recent org changes i'm
    learning on the fly.
    > I
    > was hoping this would be on the easy side. Guess not (at
    least not for
    > me).
    > Here's where I'm at now with it, it's returning an error
    at this point.
    >
    >
    >
    >
    > <%
    > If (CStr(Request("MM_insert")) = "addProject") Then
    > If (Not MM_abortEdit) Then
    >
    > 'intNewKeyVal = rsProjects.Execute(MM_editCmd,
    intRecordsAffected,
    > adCmdText)(0)
    > ' execute the insert
    > Dim MM_editCmd
    >
    > Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    > MM_editCmd.ActiveConnection = MM_commStr_STRING
    > MM_editCmd.CommandText = "INSERT INTO dbo.projects
    (pName, pLead,
    > status,
    > startDate, endDate, audience, ojective, deliverables,
    issues) VALUES (?,
    > ?, ?,
    > ?, ?, ?, ?, ?, ?) SELECT SCOPE_IDENTITY()"
    > MM_editCmd.Prepared = true
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202,
    > 1,
    > 100, Request.Form("pName")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2", 202,
    > 1,
    > 100, Request.Form("pLead")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3", 202,
    > 1,
    > 50, Request.Form("status")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4", 135,
    > 1,
    > -1, MM_IIF(Request.Form("startDate"),
    Request.Form("startDate"), null)) '
    > adDBTimeStamp
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 135,
    > 1,
    > -1, MM_IIF(Request.Form("endDate"),
    Request.Form("endDate"), null)) '
    > adDBTimeStamp
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 202,
    > 1,
    > 250, Request.Form("audience")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 202,
    > 1,
    > 500, Request.Form("objective")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 202,
    > 1,
    > 500, Request.Form("deliverables")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    > 1,
    > 500, Request.Form("issues")) ' adVarWChar
    > MM_editCmd.Execute
    > intNewKeyVal = rsProjects.Execute(MM_editCmd,
    intRecordsAffected,
    > adCmdText)(0)
    > MM_editCmd.ActiveConnection.Close
    >
    > ' append the query string to the redirect URL
    > Dim MM_editRedirectUrl
    > MM_editRedirectUrl = "insertPart2.asp?fKey=intNewKeyVal"
    > If (Request.QueryString <> "") Then
    > If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) =
    0) Then
    > MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    > Request.QueryString
    > Else
    > MM_editRedirectUrl = MM_editRedirectUrl & "&"
    > Request.QueryString
    > End If
    > End If
    > Response.Redirect(MM_editRedirectUrl)
    > End If
    > End If
    > %>
    >

Maybe you are looking for

  • I enabled radio on my iPod Touch 2G...now I can't turn it off

    I was breadboarding a microphone for my iPod Touch 2G using the headphone/mic jack as an input. I made a simple circuit to power the mics with an additional 2.4V (I suspected the PIP wasn't enough for the 4 mics I was using) but I left out the DC blo

  • Permissions for Linux user accessing Leopard share

    We have a very simple networking setup at our video post production facility. Basically, files are shared everywhere and to everyone. No open directory or DNS serving. Just AFP and SMB. Our Linux based Smoke/Flame/Lustre system needs access to the fi

  • Itunes File Organising

    I have many albums that have featured artists, when I import these to Itunes it automaticall breaks the album up to compilations and the ones just by the main artist it puts them in the main artist folder, I would prefer to have them all under the ma

  • Force Java Applet Reload

    I'm trying to test a new version of a java applet. However, from the results I can tell that Safari is using a cached version of the jar file rather than downloading a new one from the website. I have tried emptying the cache, closing and reopening S

  • SAP Inurance Claim Management

    Hi All, I'm new to SAP Claim Management in Insurance Industry. If anybody here worked on that, please throw some light on that like what are the T.Codes used, What is the process flow, what tables we use generally. some information on the technical s