Stored Procedure requires compilation before every run....

I have one simple SP in Oracle 8. It gets complied very nicely. But after i execute that SP, its defination from the database is lost. I again have to compile and execute it. This means that everytime i have to execute this SP i have first compile....
I can't understand why this is happening??? IIf anybody knows how this can be solved then plz let me know...

following is the SP code. Its long but a simple SP. I am not modifying any underlying objects. I think even if they are modified the SP gets recompiled when called... Have a look at it and help me...
procedure apptrack_ware_funding_retrieve
al_seller_id IN NUMBER,
al_julian_id_num IN NUMBER,
as_pgm_type_cde_uw_out OUT VARCHAR2,
as_trust_acct_ind_out OUT VARCHAR2,
af_tran_amt_sum_out OUT NUMBER,
as_updt_dt_tm OUT VARCHAR2,
al_traunch_use_out OUT NUMBER,
al_whse_line_lmt_out OUT NUMBER,
as_rpt_end_dt_out OUT VARCHAR2,
al_pay_down_amt_out OUT NUMBER,
al_tot_trust_acct_adva_out OUT NUMBER, /* Date:07/21/2000 .Added By Sunil */
al_tot_trust_acct_reversal_out OUT NUMBER, /* Date:07/21/2000 .Added By Sunil */
al_trust_reversal_amt_out OUT NUMBER
AS
sql_err NUMBER;
err_msg VARCHAR2(300);
li_row_count NUMBER;
BEGIN
select count(1) into li_row_count
from TRUST_ACCT_ACTIVITY
where SEQ_NUM = (select max(SEQ_NUM) from TRUST_ACCT_ACTIVITY
where SELLER_ID = al_seller_id and
JULIAN_ID_NUM = al_julian_id_num) and TRAN_CDE = 'R';
if li_row_count = 1 then
select TRAN_AMT into al_trust_reversal_amt_out
from TRUST_ACCT_ACTIVITY
where SEQ_NUM = (select max(SEQ_NUM) from TRUST_ACCT_ACTIVITY
where SELLER_ID = al_seller_id and
JULIAN_ID_NUM = al_julian_id_num) and TRAN_CDE = 'R';
else
al_trust_reversal_amt_out := 0;
end if;
/* Anthony Start 07/06/2000.*/
select count(1) into li_row_count
from seller_pay_down
where (seller_id = al_seller_id and
julian_id_num = al_julian_id_num );
if li_row_count > 0 then
select sum(pay_down_amt) into al_pay_down_amt_out
from seller_pay_down
where (seller_id = al_seller_id and julian_id_num = al_julian_id_num);
else
al_pay_down_amt_out := 0;
end if;
/* Anthony End. 07/06/2000.*/
/* Dhawal changes begin. 06/22/2000.*/
select count(1) into li_row_count
from seller
where seller_id = al_seller_id;
if li_row_count = 1 then
select to_char(max(rpt_end_dt),'MM/DD/YYYY') into as_rpt_end_dt_out
from seller_settlement_summary
where seller_id = al_seller_id;
end if;
/* Dhawal changes end. 06/22/2000.*/
select count(1)
into li_row_count
from seller_traunch
where seller_id = al_seller_id;
if li_row_count > 0 then
select sum(traunch_use_lmt) into al_traunch_use_out from seller_traunch
where seller_id = al_seller_id and
traunch_type||eff_dt in (select traunch_type||max(eff_dt)
from (select * from seller_traunch where seller_id = al_seller_id)
group by traunch_type);
end if;
select count(1)
into li_row_count
from seller
where seller_id = al_seller_id;
if li_row_count > 0 then
select whse_line_lmt
into al_whse_line_lmt_out
from seller
where seller_id = al_seller_id;
end if;
select count(1) into li_row_count
from underwriting_info
where (julian_id_num = al_julian_id_num
and loan_type = '08'
and preflite_ind ='P');
if li_row_count = 1 then
select pgm_type_cde_uw into
as_pgm_type_cde_uw_out
from underwriting_info
where (julian_id_num = al_julian_id_num
and loan_type = '08'
and preflite_ind ='P');
end if;
select count(1) into li_row_count
from seller
where seller_id = al_seller_id;
if li_row_count = 1 then
select trust_acct_ind into
as_trust_acct_ind_out
from seller
where seller_id = al_seller_id;
end if;
select nvl(sum(tran_amt),0) into
af_tran_amt_sum_out
from trust_acct_activity
where seller_id = al_seller_id;
/* Date:07/21/2000 .Added By Sunil to calculate total of all trust account advances for seller id */
select nvl(sum(tran_amt),0) into
al_tot_trust_acct_adva_out
from trust_acct_activity
where seller_id =al_seller_id
and julian_id_num = al_julian_id_num
and tran_cde = 'F' ;
/* End of Adddition -------- Sunil. */
/* Date:07/21/2000 .Added By Sunil to calculate total of all trust account reversals for seller id */
select nvl(sum(tran_amt),0) into
al_tot_trust_acct_reversal_out
from trust_acct_activity
where seller_id =al_seller_id
and julian_id_num = al_julian_id_num
and tran_cde = 'R';
/* End of Adddition -------- Sunil. */
select count(1) into li_row_count
from trust_acct_activity
where seller_id = al_seller_id
and julian_id_num = al_julian_id_num
and tran_cde = 'F'
and seq_num = (select max(seq_num) from trust_acct_activity
where seller_id = al_seller_id
and julian_id_num = al_julian_id_num
and tran_cde = 'F');
if li_row_count = 1 then
select to_char(updt_dt_tm,'MM/DD/YYYY HH24:MI:SS') into as_updt_dt_tm
from trust_acct_activity
where seller_id = al_seller_id
and julian_id_num = al_julian_id_num
and tran_cde = 'F'
and seq_num = (select max(seq_num) from trust_acct_activity
where seller_id = al_seller_id
and julian_id_num = al_julian_id_num
and tran_cde = 'F');
end if;
dbms_output.put_line ('program Type Code UW = ' || as_pgm_type_cde_uw_out);
dbms_output.put_line ('Trust Account Indicator = ' || as_trust_acct_ind_out);
dbms_output.put_line ('Trust Account Current Balance = ' || af_tran_amt_sum_out);
dbms_output.put_line ('Report End Date = ' || as_rpt_end_dt_out);
EXCEPTION
when others then
sql_err := sqlcode;
err_msg := sqlerrm;
DBMS_OUTPUT.PUT_LINE (sql_err);
DBMS_OUTPUT.PUT_line (err_msg);
APPTRACK_UPDATE_ERRLOG('OTHERS', SQLCODE, SQLERRM, 'apptrack_ware_funding_retrieve', 'JULIAN_ID_NUM='||TO_CHAR(NVL(al_julian_id_num, 0)));
raise_application_error(-20011,'Database Error - Database Error code = '||sql_err||', Database Error Text = '||err_msg);
END apptrack_ware_funding_retrieve;

Similar Messages

  • Stored Procedure requires compilation before every execute....

    I have one simple SP in Oracle 8. It gets complied very nicely. But after i execute that SP, its defination from the database is lost. I again have to compile and execute it. This means that whenever i have to execute this SP i have to first compile it....
    I can't understand why this is happening??? If anybody knows how this can be solved then plz let me know...

    does your code start off:
    procedure whatever is ...
    or
    create or replace procedure whatever is ...
    If the former, then you are defining a procedure within a script. If the second, then you are creating a procedure to be stored in the database.

  • Help in Stored Procedure Required

    Dear All,
    I have an udf in my Sales Order u_EnqNo which has some numbers. I want to have a check if while booking the Sales Order if some particular numbers are there then in the project code field which is in the row level of Sales Order should have project code ending with SP ( Special Project).
    I am trying to make an Stored Procedure but its somehow not working and been asking for SP when already SP is there.
    --Project code for Sales Order - Special Projects
    if  @transaction_type IN (N'A', N'U') AND (@Object_type IN ('17'))
    begin
    if exists (select * from rdr1 b,ordr a
    where b.DocEntry=@list_of_cols_val_tab_del
    and (b.Project is null or b.Project='' or b.Project NOT Like '%%_SP' and a.DocEntry=b.Docentry
    and a.u_EnqNo ='95021729' or a.u_EnqNo ='95021970' or a.u_EnqNo ='95022171' or
    a.u_EnqNo ='95021972' or a.u_EnqNo ='95022210' or a.u_EnqNo ='95017240' or
    a.u_EnqNo ='95010501' or a.u_EnqNo ='95021280' or a.u_EnqNo ='95020277' or
    a.u_EnqNo ='95021957' or a.u_EnqNo ='95017862' or a.u_EnqNo ='95021093' or
    a.u_EnqNo ='95020915' or a.u_EnqNo ='95021907' or a.u_EnqNo ='95015477' or
    a.u_EnqNo ='95100300' or a.u_EnqNo ='95100354' or a.u_EnqNo ='95100349' or
    a.u_EnqNo ='95100350' or a.u_EnqNo ='95028879' or a.u_EnqNo ='95021454' or
    a.u_EnqNo ='95100350' or a.u_EnqNo ='95028879' or a.u_EnqNo ='95021454' or
    a.u_EnqNo ='95021666' or a.u_EnqNo ='95021519' or a.u_EnqNo ='95022148'))
    begin
    select  @error=10 , @error_message = N' Special Project...Provide Special Project Code with Suffix as SP'
    end
    end
    Kindly advise.
    Regards,
    Swamy

    You did not consider the precedence of the logical operators!
    Try this:
    --Project code for Sales Order - Special Projects
    if  @transaction_type IN (N'A', N'U') AND (@Object_type IN ('17'))
    begin
    if exists (select * from rdr1 b,ordr a
    where b.DocEntry=@list_of_cols_val_tab_del
    and (b.Project is null or b.Project='' or b.Project NOT Like '%%_SP' and a.DocEntry=b.Docentry
    and
    (a.u_EnqNo ='95021729' or a.u_EnqNo ='95021970' or a.u_EnqNo ='95022171' or
    a.u_EnqNo ='95021972' or a.u_EnqNo ='95022210' or a.u_EnqNo ='95017240' or
    a.u_EnqNo ='95010501' or a.u_EnqNo ='95021280' or a.u_EnqNo ='95020277' or
    a.u_EnqNo ='95021957' or a.u_EnqNo ='95017862' or a.u_EnqNo ='95021093' or
    a.u_EnqNo ='95020915' or a.u_EnqNo ='95021907' or a.u_EnqNo ='95015477' or
    a.u_EnqNo ='95100300' or a.u_EnqNo ='95100354' or a.u_EnqNo ='95100349' or
    a.u_EnqNo ='95100350' or a.u_EnqNo ='95028879' or a.u_EnqNo ='95021454' or
    a.u_EnqNo ='95100350' or a.u_EnqNo ='95028879' or a.u_EnqNo ='95021454' or
    a.u_EnqNo ='95021666' or a.u_EnqNo ='95021519' or a.u_EnqNo ='95022148'
    begin
    select  @error=10 , @error_message = N' Special Project...Provide Special Project Code with Suffix as SP'
    end
    end
    Or you can use a more simple form using this:
    a.u_EnqNo in ('95021729', . . ., '95022148')

  • Stored Procedure not compiling

    Hi,
    I am not able to compile stored proc in oracle 8i,
    whenever I compile the SP, the pl/sql devloper getting hanged..
    I also tried to compile it from sqlplus, even sqlplus is getting hanged.
    No SP/Functions are dependent on this SP.
    Plz help, Its urgent
    Thanks,
    Shailesh

    Please try this approach:
    First SQL*Plus session:
    select sid from v$mystat where rownum < 2
    compile procedure
    Second SQL*Plus session:
    select *
    from v$session_wait
    where sid = your_sid_from_previous_session
    This will enable you to find out the reason why you are waiting
    Best Regards
    Krystian Zieja / mob

  • Built-in iSight requires reboot before every use

    It seems that I can use my iSight immediately after a reboot, but once I sleep & rewake my computer or run other applications (vmware, imovie - pretty much anything) the iSight stops working.
    Now, I get that rebooting seems to be a solid fix for this...but seriously...most of the time I want to use my iSight it is just SO not worth closing out all my apps and restarting - it's faster to go dig up my digital camera, take a pic, and upload it. Half the reason I bought a mac was so I wouldn't have to restart all the time.
    The iSight disfunctionality is a HUGE disappointment that would have seriously made me question whether I wanted to invest in a mac or not, had I known upfront. Oddly, I took it for granted because camera's really aren't complex or cutting edge devices...how has Apple failed to fix this so far?
    Is there ANY way I can "unplug" and "replug" (eg, restart) my built-in iSight WITHOUT rebooting my MBP?
    Please advise
    Thanks

    I have reset the PMU twice and have reset PRAM (holding down apple-option-p-r at startup),I have also repaired disk permissions on my startup disk.
    I can get access to the built-in isight for photobooth and other apple applications but as soon as I try to enable it in VMWare Fusion it stops the VMWare machine (Windows Vista) from booting until I disconnect the iSight from VMWare.
    The iSight then disappears from the available hardware in VMWare Fusion (so I cannot reconnect it in Fusion) and I cannot access the iSight in any Apple application.
    I have Applecare... I think I'll see if I can get any help there.

  • How to run stored procedure in DOS command line????

    Hi,
    I want to run a stored procedure in DOS command line?
    (My_Stored_Procedure is the stored procedure that I want to run )
    This is what I did in DOS prompt
    C:\>sqlplus scott/tiger exec lMy_Stored_Procedure <Return>
    Obviously it is NOT working. Please send me the correct way to fix this.
    Thanks so much in advance for helping.
    Cuong

    Billy  Verreynne  wrote:
    BluShadow wrote:
    True Billy, but even Windows hasn't completely got away from using the "DOS" word...Yeah - the command line/shell environment is based on that of the old DOS command interpreter. But Microsoft does not make the mistake of call it DOS.
    In fact, with earlier versions of Windows NT, a 16bit DOS real-mode virtual machine was supported. This was very kewl.
    Running a large BBS with multiple nodes back then required a DOS machine per node, an IPX network, and a Novell file server.Novell Netwars. ;)
    Ahhhh! good old DOS... so many good programs written at that low level, outside the Windoze environment.Yeah.. cut my teeth on writing code for DOS. Still have all my old BIOS and assembler manuals for it. Wrote my own screen s/w (write to a buffer and then move it into the video buffer, instead of writing char wise to the video buffer via interrupts), mucking about with my own concurrent threading model (using very simplistic cooperative multitasking) and so on. Heck, wrote tons of s/w on DOS... :-)Yeah I've still got a copy of my old machine code programs for writing to buffers and screen memory switching for smooth animation. Run them nowadays and they run like sh!t off a shovel. And all my old coursework including writing an interpreted language and multi-window (dos based windows) editor, parser and the code to execute the language and display the output. Oooo, and so much other stuff.
    Awesome back then as you got really intimate with the o/s and hardware. This is sorely lacking today in environments like Java. And I think the reason why so much code written today is less than optimal - to put it kindly.Exactly. Started for me on the Sinclair zx81 (writing Basic), then the Sinclair Spectrum (Basic and Assembly), then Sinclair QL (yes I really had one!) and then the BBC Master 128K (where I got to writing my own rom filing system and creating my own eproms, to integrate with the word processor for additional printing features etc. as well as storing games on rom for speedy loading - and I still have it and it still works!)
    It's that level of working with the underlying memory and assembly language that gives you the understanding of how values are passed between code using the stack and registers, and how memory allocation and referencing is done etc. As you say... it's missed in a lot of todays teaching, which just seems too high level and misses the basic concepts of things such as datatypes and why they are different. I bet half the modern programmers wouldn't have a clue how to do multiplication or division of binary numbers using the carry flag.

  • How to run stored procedure IC Data / to define according script logic file

    We want to execute the stored procedure IC Data before the IC Booking. Could anybody tell me, how we have to define the script logic file in detail?
    We try it with this code (that runs without any error, but 0 rows are calculated, 0 rows are updated)
    *Run_stored_procedure=spicdata('%App%','%C_Category_Set%','%time_set%','','%entity_set%','','','Input','I','%logtable%','%scopetable%')
    *commit
    We also had tried with this code:
    *Run_stored_procedure=spicdata('%App%','%C_Category_Set%','%time_set%','','%entity_set%','','','','','%logtable%','%scopetable%')
    *commit

    step 1.
    Create a store procedure in back end.
    step2.
    Create a ssis package to execute the store procdure.
    step3.
    call this ssis pacakge in the data manager package and run the package.

  • Stored Procedure Does Not Run Properly When Called From Portlet

    We have a simple Java portlet that calls a PL/SQL stored procedure which we wrote. The stored procedure sends a large number of emails to users in our corporation using the "utl_smtp" package. The stored procedure returns a count of the emails back to the Java portlet when it's finished. This number is displayed in the portlet.
    Our problem:
    The stored procedure functions as expected when run from a PL/SQL block in SQL*Plus, and the Java portlet calls the procedure properly when sending out a smaller number of emails (Less than 200 usually). When we get into a higher number of emails the procedure hangs when called from the portlet, but it STILL functions properly from SQL*Plus. It does not return the number of emails sent
    and the Java portlet is unable to return a SQLException. Also, we have noticed that emails are sent at a much slower pace from the stored procedure when it's called from the portlet.

    Any Ideas?

  • How do I get return parameters from a stored procedure call?

    The Open SQL Statement has an option on the Advanced tab to specify a command type of 'stored procedure'. In addition to returning a recordset, a stored procedure can also return parameters (see http://support.microsoft.com/support/kb/articles/Q185/1/25.ASP for info on doing this with ADO). Is it possible to get those return parameters with TestStand? In particular, I want to be able to get error codes back from the stored procedure in case it fails (maybe there is another way).

    The Open SQL Statement step type does not fully support stored procedures. If the procedure returns a record set than you can fetch the values as you would a SELECT statement. Stored procedures require you to setup the parameters before the call and this is not yet supported. Bob, in his answer, made a reference to the Statements tab and I think that he was talking about the Database Logging feature in TS 2.0.
    If the stored procedure is returning a return value, it may return as a single column, single row recordset which can be fetched as you normally do a record set.
    Scott Richardson
    National Instruments

  • Exception in calling a stored procedure

    Hi ,
    i am calling a stored procedure using TopLink up on clicking a button from my jspx.
    i got an exception at this statement
    Result = (Integer)session.executeQuery(query,parameters);
    and the exception is:
    [TopLink Warning]: 2007.12.13 02:34:19.158--ClientSession(21746066)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 134:
    PLS-00103: Encountered the symbol "[" when expecting one of the following:
    . ( ) , * @ % & = - + < / > at in is mod not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like
    between ||
    The symbol ". was inserted before "[" to continue.
    ORA-06550: line 1, column 172:
    PLS-00103: Encountered the symbol "]" when expecting one of the following:
    . ( ) , * @ % & - + / at mod rem <an exponent (**)> and or ||
    The symbol "]" was ignored.
    Error Code: 6550
    Call:BEGIN APPS.XXUL_DAP_PKG.maint_err_inact_codes(i_action=>'U', i_flex_value_set_name=>'XXUL_DAP_ERROR_CODES_VS', i_code=>CoreOutputText[UIXFacesBeanImpl, id=outTextErrorCode], i_description=>'National Deviations', i_prog_comb_code=>'103', i_err_help_text=>NULL, i_enabled_flag=>'Y', i_summary_flag=>'N', i_commit=>'Y', i_user=>35454, o_error_code=>?, o_error_message=>?, io_flex_value_id=>?); END;
         bind => [=> o_error_code, => o_error_message, 0 => io_flex_value_id]
    Query:DataModifyQuery()
    could someone suggest me a solution..
    Thanks in anticipation

    This looks like a sql syntax error.
    Can you show the SQL you are trying to execute via toplink?
    Is the stored procedure valid/compiled? Can you call it in SQLPlus or from the sql worksheet in jdeveloper?
    Jeroen van Veldhuizen

  • Query in Stored Procedure accessing another schema

    Hi - this is going to sound kind of strange and even i can't come up with an explanation. My JDK 1.1.7 applet uses a type 4 JDBC thin driver (i think v 8.04.06) to access an Oracle 7.3.4 database. We also have a link with full grants and synonymns to another Oracle schema in an Oracle 8 database. Has never been a problem - we can access anything we need to through queries or stored procedures from either of these databases.
    So, i have a new stored procedure that needs to be called through JDBC that queries a table in the Oracle 8 database. For some reason, whenever i execute this stored procedure from java it hangs on this query and the instance needs to be restarted. If i execute that same stored procedure from SQL Plus, it runs fine.
    I tried a little test. I put a straight query in my java code that goes directly to that table (no stored procedure involved). It runs great through java!
    is this weird or what? my dbas have checked out all privelages and it seems that i have access to everything i could possibly need.
    If anyone has any suggestions i would love to hear them.
    thanks for your help...
    Lori - [email protected]
    null

    You can only access an object in another user's schema if you either:
    (a) Specify the 'other' schema name explicitly: SCHEMA.OBJECT
    (b) A synonymn has been created to access the object: CREATE SYNONYM OBJECT FOR SCHEMA.OBJECT.
    The user requiring the synonym should create it, or the user owning the object can create a PUBLIC synonym, if they have the authority.
    To check my hypothesis, try typing 'DESCRIBE procedure_name' from SQL*Plus as both users.

  • Question?? - passing 2D array as a parameter of a stored procedure

    Hi,
    I have been having a lot of trouble with executing a stored procedure. I'm hoping someone can help me with this:
    THe stored proc. has 10 parameters, 5 IN and 5 OUT. One of these parameters coming out is a 2D array, however I"m not sure how I would be able to call the correct OCCI type coming out.
    I've declared a 2D array char sample[10][10];
    and then:
    stmt - > registerOutParam ( 7, oracle::occi:OCCI*???, sizeof(sample);
    and then :
    char outarray[10][10];
    out_array = stmt -> getString??? get*??
    I tried just passing a string itself, but as the procedure is looking for a 2D array, the program aborts, but I'm really not sure how I can solve this...??
    I'm kind of new to this subject, and I would really appreciate any help anyone can provide, with being able to pass in a 2D char array and being able to receive the outcomning data.
    Thanks a lot for any help!

    Hi,
    thank you for the link, it helped a lot....
    my C++ app that calls my stored procedure does compile, however, when I execute it "Aborts". I debugged it and found that right before my
    stmt->executeUpdate()
    statement, it outputs "Aborts", I'm really not sure why this is aborting, are there any specific debug statements or anything I can use specific to occi so that I can trace why my program aborts right before the executeUpdate statement (also I have checked my procedure and it is compiled and valid, and all my parameter types are correct).
    Does anyone have any ideas??
    Any help on this matter is really appreciated... thank you

  • How to execute an stored procedure from the Report Region

    Have stored procedure "LER_KRONOS_PAYCODE_HOURS_P" compiled and ready.
    (previously tested)
    Region Source:
    DECLARE
    v_SITE_ID VARCHAR2(8);
    v_SDATE VARCHAR2(8);
    v_EDATE VARCHAR2(8);
    v_LEVEL3 VARCHAR2(60);
    BEGIN
    v_SITE_ID :=P4_SITES_LOV;
    v_SDATE :=P4_SDATE;
    v_EDATE :=P4_SEDATE;
    v_LEVEL3 :=P4_LEVEL3;
    EXECUTE LER_KRONOS_PAYCODE_HOURS_P(v_SITE_ID,v_SDATE,v_EDATE,v_LEVEL3);
    END;
    Error When run the page:
    ORA-06550: line 11, column 12: PLS-00103: Encountered the symbol "LER_KRONOS_PAYCODE_HOURS_P" when expecting one of the following: := . ( @ % ; immediate The symbol ":=" was substituted for "LER_KRONOS_PAYCODE_HOURS_P" to continue.

    You need the execute keyword only when you run it directly from sqlplus.. that will tell sqlplus to append the keyword begin and end after the procedure call.
    Example.
    SQL > exec proc1 (input1);
    will tell sqlplus to run it as a block.. saying
    sql> Begin
              proc1(input1);
          end;Inside the procedure , in your code, you dont need the execute keyword.
    But, why do you want to execute a procedure inside the source for a report region..?

  • Crystal Report not showing fields when connected to a stored procedure

    I have a Stored Procedure that returns results when run in SQL Server, but when I add this to a Crystal Report it doesn't show any fields in the Field Explorer. But if I try any other SP, it works fine and I can see its fields.
    As you can see in the picture below, I am unable to expand the fields in the report while creating the report using standard report procedure too.
    I tried different ways, but nothing worked for me here. Please help me here.
    (FYI, I am using Crystal Reports 2008, SQL Server 2008R2)

    Hi Jamie,
    I just found out the reason for this issue.
    I wrote the stored procedure using the fields in the Datamart but the fields in the datamart in backend are connected to a different database which doesn't have SQL Server Authentication (for the Credentials) and that's the reason I was getting this issue.
    Once my BI team granted the permission, for that fields connecting to the backend database, I was able to see all fields in the Crystal Report.

  • How to determine number of records in recordset returned by stored procedure?

    In TestStand 3.0 I am calling an SQL stored procedure where the stored
    procedure returns a recordset. Everything appears to work (I can
    iterate through the recordset and see that the data is valid).
    However, I can not figure out how to easilly determine how many
    records are actually in the recordset. Unlike the 'Open SQL
    Statement' step, in the 'Data Operation' step that actually invokes
    the stored procedure, there is no 'Number of Records Selected' option
    to specify a TestStand variable to accept this value. I know I could
    iterate through the returned recordset incrementing a counter until a
    Fetch fails, but for larger recordsets, traversing the table multiple
    times would be quite time consuming
    . I am hoping to avoid this if
    possible. Is there an easier way to get the number of records in a
    recordset returned from a stored procedure call?
    Bob

    Bob -
    The cursor type of the ADO Recordset object affects whether the number of records can be determined. The Recordset.RecordCount property will return -1 for a forward-only cursor; the actual count for a static or keyset cursor; and either -1 or the actual count for a dynamic cursor, depending on the data source.
    Because ADO does not let me set the cursor type for command objects which is what a stored procedure requires, it is up to the data source to determine the type of cursor and the support for record count.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

Maybe you are looking for

  • SSO for ALUI using OAM 10.1.4.0.1

    Has any1 successfully tested SSO for ALUI or WCI using OAM??? I would appreciate if someone shares the policy created. you can send me an email to [email protected] Edited by: Ferry on Sep 24, 2009 11:07 PM

  • Multiple Apple ID's on 1 machine (over 2 users)

    I am using a new Mini mac & have created 2 administrative users. Although the system allows us to set a seperate Apple ID for each user, it automatically reverts to 1 Apple ID when updating / purchasing. Could anyone advise how we can set a seperate

  • My iphone is not recognised by itunes or my computer

    My iphone is not recognised by either i tunes or my computer. Everything was working fine but now when i plug my phone into the computer it does not charge up the battery nor does it appear in tunes or my computer. I have gone through the apple check

  • PDF Report with chinese work fine in 9iDS but not in 9iAS

    I use oc4j in oracle 9iDS,it can display chinese no problem through set pdf font subset. However,when i deploy it to oracle 9i AS ,and i have set 9ias Report services according to oracle 9i DS's setting,it don't work fine with chinese in pdf report.

  • SQL Server service not automatically starting (logon failure)

    I just installed SQL Server 2012 on a machine. To run "SQL Server" as well as "SQL Server Agent" service I have created a domain account called SQLADMIN. This account is a service account and has no other rights like logon locally or local administra