Store Procedure
Hi,
I am executing one procedure,the main purpose is reading 3PL data and inserting into JDE table. but i am not able to insert into jde table but this procedure is updating the table saying that data is inserted.
please look into this procedure is there anything with SP.
IS
-- Procedure Name : p_tpl_f57l4212
-- Objective : To read the confirmed or completed orders provided by
-- the TPL companies and update the JDE data with them.
-- Created by : Mijung Choi
-- Created on : November 17, 2005
-- Updated on :
-- Attributes
v_errmsg F57L4212.s3dl010%TYPE;
v_errcnt NUMBER := 0;
-- Cursor for selecting sales order newly completed by TPL company
CURSOR c_f57l4212 IS
SELECT s3tpl, s3dcto, s3doco, s3lnid, s3so15, s3an8, s3kcoo, s3mcu,
s3litm, s3lotn, s3uorg, s3uom, s3itwt, s3wtum, s3lttr, s3nxtr,
s3rsdj, s3prmo, s3cnid, s3urrf, s3cdcd, s3sfxo, s3txa1, s3exr1, s3tran
FROM f57l4212_tpl
WHERE s3tran = '0';
BEGIN
FOR c IN c_f57l4212 LOOP
BEGIN
-- Insert new confirmed or completed sales orders into JDE side table
INSERT INTO F57L4212
(s3tpl, s3dcto, s3doco, s3lnid, s3so15, s3an8, s3kcoo, s3mcu,
s3litm, s3lotn, s3uorg, s3uom, s3itwt, s3wtum, s3lttr, s3nxtr,
s3rsdj, s3prmo, s3cnid, s3urrf, s3cdcd, s3sfxo, s3txa1, s3exr1, s3tran)
VALUES (c.s3tpl, c.s3dcto, c.s3doco, c.s3lnid, c.s3so15, c.s3an8, c.s3kcoo, c.s3mcu,
c.s3litm, c.s3lotn, c.s3uorg, c.s3uom, c.s3itwt, c.s3wtum, c.s3lttr, c.s3nxtr,
c.s3rsdj, c.s3prmo, c.s3cnid, c.s3urrf, c.s3cdcd, c.s3sfxo, c.s3txa1, c.s3exr1, c.s3tran);
-- Update the transferred date
UPDATE f57l4212_tpl
SET s3tran = '1',
s3dttr = TO_NUMBER(TO_CHAR(SYSDATE, 'YYMMDD')),
s3tftm = TO_NUMBER(TO_CHAR(SYSDATE, 'HHMIDD'))
WHERE s3tpl = c.s3tpl
AND s3dcto = c.s3dcto
AND s3doco = c.s3doco
AND s3lnid = c.s3lnid;
EXCEPTION
WHEN OTHERS THEN
v_errcnt := v_errcnt + 1;
v_errmsg := SUBSTR(SQLERRM, 1, LENGTH(v_errmsg));
UPDATE f57l4212_tpl
SET s3tran = '2',
s3dttr = TO_NUMBER(TO_CHAR(SYSDATE, 'YYMMDD')),
s3tftm = TO_NUMBER(TO_CHAR(SYSDATE, 'HHMIDD')),
s3dl010 = v_errmsg
WHERE s3tpl = c.s3tpl
AND s3dcto = c.s3dcto
AND s3doco = c.s3doco
AND s3lnid = c.s3lnid;
END;
END LOOP;
IF v_errcnt > 0 THEN
ROLLBACK;
ELSE
COMMIT;
END IF;
END;
Thanks
Best Regards
Praveen
The code does fetches across commits. Cursor c_f57l4212 is a consist read of table/view/object f57l4212_tpl.
While reading rows from this cursor, the code is changing f57l4212_tpl by updating it.
This is an ANSI SQL violation. In Oracle this approach can lead to "snapshot too old" error as Oracle cannot maintain the consistent read as the actual underlaying data is being continually changed.
The correct approach is to lock data that you are going to change. If this is done via a cursor, then that means adding the clause FOR UPDATE to the cursor.
I also do not see any bulk processing. Using bulk processing the performance of this procedure should improve at least 3 fold. In addition, using a direct path insert for the bulk insert will result in additional performance gains.
Similar Messages
-
HOW TO EXECUTE A STORE PROCEDURE THAT RETURN MULTIPLE ROWS FROM A QUERY
I NEED TO CREATE AND USE A STORE PROCEDURE THAT IS GOING TO DO A SELECT STATEMENT AN THE RESULT OF THE SELECT STATEMENT IS RETURN IN SOME WAY TO THE REQUESTER.
THIS CALL IS MADE BY AN EXTERNAL LANGUAGE, NOT PL/SQL OR FORMS APPLICATION. USING FOR EXAMPLE ODBC AND VISUAL BASIC. WHAT I NEED TO DO IS ADD A DATA ACCESS LAYER TO MY APPLICATION AND I ALREADY HAVE IT DONE FOR MS SQL SERVER, BUT I NEED THE SAME FUNCTIONALITY ACCESSING AN ORACLE DATABASE.
FLOW:
1. VB CREATE A ODBC CONNECTION TO A ORACLE DATABASE
2. VB EXECUTE A STORE PROCEDURE
3. THE STORE PROCEDURE RETURNS TO THE VB APPLICATION THE RESULT OF THE QUERY THAT IS INSIDE OF THE STORE PROCEDURE.(I.E. THE STORE PROCEDURE IS A BASIC SELECT, NOTHING COMPLEX)
4. VB DISPLAY THE RESULT IN A GRID
FOR SURE I CAN DO THE SELECT DIRECTLY TO ORACLE, BUT FOR PERFORMANCE REASONS AND SCALABILITY, I'LL LIKE IT TO DO IT USING A STORE PROCUDURES
IS THIS POSIBLE?, HOW?
THANKSCertainly, it's possible. First, define a stored procedure that includes an OUT parameter which is a REF CURSOR. Then, call the stored procedure via ODBC omitting the OUT parameter from the list of parameters. IT will automatically be returned as a result set. Syntax for both is below...
CREATE PROCEDURE foo (inParam in varchar2, resultSet OUT REF CURSOR )
In ODBC:
{call foo( 'someData' )}
Justin -
UNABLE TO EXECUTE THE CMDSQL SCRIPT IN A STORE PROCEDURE.
I am trying to call a .sql file from sql cmd mode.
The requirement is to pass the .sql file as parameter value to the cmd script which I have able to achieve,here is the code which is working fine .
declare @x sysname
set @x = 'C:\Users\testuser\Desktop\testing.sql'
:OUT $(TEMP)\GetServerName1.sql
PRINT ':SETVAR FilePath'+ ' ' + @x
GO
:OUT stdout
:r $(TEMP)\GetServerName1.sql
GO
:r $(FilePath)
But when I try to wrap this code in store procedure it is giving the message fatal error but when I run it without wrapping it in store proc it is doing its job with no error . When I looked into the store proc I found the code as
ALTER proc [dbo].[testing]
as
declare @x sysname
set @x = 'C:\Users\testuser\Desktop\testing.sql'
PRINT ':SETVAR FilePath'+ ' ' + @x
It seems like the sqlcmd code disappears automatically. I have no clue why it is happening.
Can anyone help in letting me knw how to wrap the above code in store proc.
Thanks SauravIt is important to keep in mind that you have two entities in play here. One client and one server. The lines that start with a colon never sent to SQL Server, nor are the lines which reads "go". They are intercepted client-side. For instance :r
instructs SSMS to read a local file and out: redirects the output. And "go" breaks up the code in batches.
Erland Sommarskog, SQL Server MVP, [email protected] -
Front-End Service Starup Error: Store procedure to GET progress vector failed.
Hi,
We have a two front end servers in our Lync deployment and I'm getting an interesting error message on one of the servers when the "Lync Server Front-End Service" is starting up. All the services on that server will eventually start but I'm pretty
sure it's affecting users in some way.
Here is the error message in the Event Viewer:
Log Name: Lync Server
Source: LS User Services
Date: 2013-09-17 8:00:32 AM
Event ID: 32194
Task Category: (1006)
Level: Error
Keywords: Classic
User: N/A
Computer: BGC-VAN-LYNC2.domain.ca
Description:
Store procedure to GET progress vector failed.
Execution Error: 0x00000000(ERROR_SUCCESS).
Native Error: 8144.
Error Details: [# [Microsoft][SQL Server Native Client 11.0][SQL Server]Procedure or function SyncReplicationGetProgressVector has too many arguments specified. #].
Cause: This may indicate a problem with connectivity to local database or some unknown product issue.
Resolution:
Ensure that connectivity to local database is proper. If the error persists, please contact product support with server traces.
Event Xml:
<Event xmlns=>
<System>
<Provider Name="LS User Services" />
<EventID Qualifiers="50158">32194</EventID>
<Level>2</Level>
<Task>1006</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-09-17T15:00:32.000000000Z" />
<EventRecordID>16971</EventRecordID>
<Channel>Lync Server</Channel>
<Computer>BGC-VAN-LYNC2.domain.ca</Computer>
<Security />
</System>
<EventData>
<Data>0x00000000(ERROR_SUCCESS)</Data>
<Data>8144</Data>
<Data>[# [Microsoft][SQL Server Native Client 11.0][SQL Server]Procedure or function SyncReplicationGetProgressVector has too many arguments specified. #]</Data>
</EventData>
</Event>
The error happens 15 times every minute, following with this event:
Name: Lync Server
Source: LS User Services
Date: 2013-09-17 8:23:46 AM
Event ID: 32189
Task Category: (1006)
Level: Information
Keywords: Classic
User: N/A
Description:
The following Fabric service for routing groups have been closed:
{F515134C-71B7-52FD-B0C3-6A9DB39CF750}
{8A5D6B36-2A01-53DB-BC4E-3286C05E0836}
{B35AAFC9-F6BF-5FFE-8C31-4AA5C36B2065}
{69223418-78DC-5066-81A8-78E05914EC7B}
{80414C96-1137-5DDC-8387-C3EA7A54B078}
{641E6ABD-B862-55A1-B1B1-C83BC92D2F85}
{1EA68EA4-77F7-5CFC-B781-0093CBC18403}
{2FDE333D-FF7F-5D6A-B85B-93ADC1EAC12A}
{A43BBA3A-8963-51C4-BD7A-19E1EC3DDFDB}
{D3F4532F-61C8-5072-9B3B-3E2CCF15442F}
{4449243E-5E96-56AC-AB6B-C5E785543542}
{58B30261-65B6-5F6A-BC50-60F85782D052}
{DB4B76B0-2510-5BF8-A7B1-8B37BD3AA7B9}
{917CC217-966B-56AC-A912-97BA64BA13EB}
Anyone knows what this is about and how to resolve this?
Thanks,
VH.Hi,
Please try to reset registrar state:
http://tsoorad.blogspot.in/2013/04/lync-2013-ee-pool-wont-start.html
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
sure that you completely understand the risk before retrieving any suggestions from the above link.
Kent Huang
TechNet Community Support -
Select all values from Rule in Store Procedure
Hi
I have a rule like this
CREATE RULE [dbo].[Rle_Currency_Lst]
AS
@List IN
('PKR','USD')
GO
Now i want to make simple "Currency List" report for which i need to select values from above rule in Store Procedure which i will use in SSRS to fill my report.
Please help
Zubair Afridi | Please mark as answered or vote helpful if this post help resolved your issue. Thanks!One way to get the values.
declare @definition nvarchar(max);
select @definition = m.definition
from sys.objects o
inner join sys.sql_modules m on o.object_id = m.object_id
where schema_name(o.schema_id) = 'dbo' and o.name = 'Rle_Currency_Lst';
set @definition = SUBSTRING(@definition, CHARINDEX('''', @definition), LEN(@definition));
set @definition = LEFT(@definition, CHARINDEX(')', @definition) - 1);
declare @myXML AS XML;
set @myXML = N'<H><r>' + REPLACE(SUBSTRING(@definition, CHARINDEX('''', @definition), LEN(@definition)), ',', '</r><r>') + '</r></H>'
declare @result table(myvalues nvarchar(100));
insert @result(myvalues)
SELECT Vals.id.value('.', 'NVARCHAR(100)') AS val
FROM @myXML.nodes('/H/r') AS Vals(id)
update @result set myvalues = REPLACE(myvalues, '''', '');
select * from @result;
Note that rules is a deprecated feature and will be removed in a future version of SQL Server. The replacement for rules is CHECK CONSTRAINTS. You may well want to consider a plan to migrate your current rules to check constraints.
Tom -
How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000
Post Author: ltkin
CA Forum: WebIntelligence Reporting
Hi,
How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000 ?
Regards,Hi ltkin,
Unfortunately, it is not possible in Xir2 to create Webi reports from stored procedures.
Webi reports can only be created from Universe. So in Business Objects XIR3 we can create a special universe that enables Web Intelligence user's to access stored procedures residing in the database. This is the only way that Web Intelligence user's can access stored procedures.
Please let me know if the above information helps.
Regards,
Pavan -
How can i pass NULL value in Store Procedure?
Hi guys,
I am calling one store procedure from MS SQL Server 200, i had create the follow layout:
But i need pass to MSQL SEVER the CPF = NULL, when i execute the procedre the CPF send empty value (not null).
I already changed Communication Channel parammeter "Interpretation of Empty String Values" to "Null Value" value.
But the interface always send empty string instead of null.
How can anybody help me, please?
Edited by: João Noberto dos Santos Junior on Jun 24, 2009 5:00 PMHi,
To achieve this through "Interpretation of Empty String Value" in the cc, you will have to implement a patch which is sent to you by SAP when an OSS is raised. By default its not available, i mean you can configure it but it will actually not work.
As a temporary solution you can map your element with a constant/mapwithdefault field with value mentioned as NULL.
Regards,
Anshul -
How to get a recordset in vb to access a oracle store procedure.
I have a store procedure(sproc) that needs to be called from a VB Application. I was being told that I would have to create a PL/SQL table in my store procedure for the VB Developer to access information from my store procedure. This is beacasue he wants it as a record set. Is that the way to get info for a VB front end. My sproc is a very basic one
My sproc looks like
create or replace PROCEDURE SP_TBLINFO
(ID out TBLINFO.id%type,
ACCOUNT_NUMBER out TBLINFO.account_number%type)
AS
CURSOR TBLINFO_CURSOR IS
SELECT * FROM TBLINFO;
V_TBLINFO_CURSOR TBLINFO_CURSOR%ROWTYPE;
BEGIN
OPEN TBLINFO_CURSOR ;
Loop
FETCH TBLINFO_CURSOR INTO V_TBLINFO_CURSOR;
EXIT WHEN TBLINFO_CURSOR %NOTFOUND;
ID := V_TBLINFO_CURSOR.id;
ACCOUNT_NUMBER:= V_TBLINFO_CURSOR.account_number;
END LOOP;
CLOSE TBLINFO_CURSOR ;
END SP_TBLINFO;
Thanks.Use a REF_CURSOR, something like the following:
create or replace package SP_TBLINFO as
CURSOR TBLINFO_CURSOR IS SELECT * FROM TBLINFO;
create type TBLINFO_CURSOR_TYPE is TBLINFO_CURSOR%ROWTYPE;
procedure PROC_TBLINFO(Info out TBLINFO_CURSOR_TYPE);
end;
create or replace package body SP_TBLINFO as
PROCEDURE PROC_TBLINFO
(Info out TBLINFO_CURSOR_TYPE)
AS
BEGIN
OPEN ACCOUNT_NUMBER as SELECT * FROM TBLINFO ;
END SP_TBLINFO;
END;
Then bind it in OO4O as ORATYPE_CURSOR. -
Unable to run Store Procedure based deski report in Infoview
Hi All,
I have a Deski report which is created using Store Procedure. I am able to run report in Full Client Deski. But I am unable to run / schedule same report thorough infoview.
More details about report
- Report uses 3 store procedures. When I ran report in infovew I get error message as "SP2 Dataprovider did not refresh properly". -- SP2 is Dataprovider name.
- Same report I am able to run in Dev environment. After migration to Model, report fails to run in model infoview.
- I am able to Run report only for 1st. When I refresh and run with same parameter report shows error.
Any input will be great help.
Thanks,
NVHi,
Could you please test the following solutions to resolve the issue.
Solution1:
Test the issue by inserting the following parameter in .SBO file.
<Parameter Name="Force SQLExecute">Always</Parameter> .
Solution2
Just put SET NOCOUNT OFF in the end of the stored procedure SQL.
If the above doesnu2019t works then please try the following solution.
Solution3
Make the new connection from the scratch using ODBC connection and test the issue.
I hope this will help you.
Regards,
Sarbhjeet Kaur -
Error while executing store procedure
we are using JSQLConnect jdbc driver 3.0 verson.
When we trued to excute store procedures its giving error like
com.jnetdirect.jsql.w: Stored procedures called with static parameters cannot return output parameter values, please use CallableStatement.setXXX() to set the values of all input parameters.
we are using SQLServer2000.
Could anybody tell me why this is error is coming and how to solve this.
Thanks
HemanthObviously it doesn't like the stored procedure. If you posted the signature for that it might help.
You are using a CallableStatement right? -
Error when run crystal report with store procedure in JSP
I try to run report which is developed by crystal report XI and store procedure (SQL 2005) with JSP.
But it occurs error that is "com.crystaldecisions.reports.reportengineinterface.JPEReportSource - failed to process getPage request: No results were returned by the query."
How can I do for solving this problem? Pls, help me !!!!!
(In other report which is not used store procedure I can run fine.)
Message was edited by:
Bonds_IdentityWhat version of CR are you using?
What CR updates are you using?
See sample apps here:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
in particular check out vbnet_win_pass_dataset_main_sub.zip
The [Crystal Reports for Visual Studio 2005 Walkthroughs|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23] will also be good to look at.
Ludek
Follow us on Twitter
http://twitter.com/SAPCRNetSup -
Permission problem calling a java object from a store procedure
When I run my store procedure
CREATE OR REPLACE PACKAGE BODY confirms_write_to_file
AS
FUNCTION translate(in_en_var in VARCHAR2)
RETURN VARCHAR2
AS LANGUAGE JAVA
NAME 'translate.translatePath(java.lang.String) return java.lang.String';
PROCEDURE write_to_file(in_file_name IN VARCHAR, in_en_var IN VARCHAR)
IS
file_handle UTL_FILE.FILE_TYPE;
file_location VARCHAR2(50);
BEGIN
file_location := translate(in_en_var);
dbms_output.put_line ('opened file location' ||file_location);
END write_to_file;
END confirms_write_to_file;
I get the following error:
exec confirms_write_to_file.write_to_file('zzzz','$RIMS_LOG');
SQL> exec confirms_write_to_file.write_to_file('zzzz','$RIMS_LOG');
Exception java.security.AccessControlException: the Permission
(java.io.FilePermission <<ALL FILES>> execute) has not been granted by
dbms_java.grant_permission to
SchemaProtectionDomain(RIMS|PolicyTableProxy(RIMS))
opened file locationProcess problem
PL/SQL procedure successfully completed.
When I try to to grant myself the permissions
begin
dbms_java.grant_permission('rims','java.io.FilePermission','*','execute');
dbms_java.grant_permission('rims', 'java.lang.RuntimePermission', '*','writeFileDescriptor' );
end;
I get the following Error:
oracle.aurora.vm.IdNotFoundException: rims is not a user or role
at oracle.aurora.rdbms.DbmsRealm.getId(DbmsRealm.java)
at oracle.aurora.rdbms.DbmsRealm.getId(DbmsRealm.java)
at
oracle.aurora.rdbms.security.PolicyTableManager.findAll(PolicyTableManager.java)
at oracle.aurora.rdbms.security.PolicyTableManager.find(PolicyTableManager.java)
at
oracle.aurora.rdbms.security.PolicyTableManager.activate(PolicyTableManager.java
at
oracle.aurora.rdbms.security.PolicyTableManager.grant(PolicyTableManager.java)
begin
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
oracle.aurora.vm.IdNotFoundException: rims is not a user or role
ORA-06512: at "SYS.DBMS_JAVA", line 0
ORA-06512: at line 2
My java code is as follows
import java.io.*;
import java.util.*;
class translate
public static String translatePath(String envar)
Runtime rt = Runtime.getRuntime();
int bufSize = 4096;
byte buffer[] = new byte[bufSize];
String path = null;
Process p = null;
int len = 0;
try
p = rt.exec("echo "+envar);
BufferedInputStream bis = new BufferedInputStream(p.getInputStream());
while ((len = bis.read(buffer, 0, bufSize)) != -1)
System.out.write(buffer, 0, len);
path = new String(buffer);
p.waitFor();
catch(Exception e)
System.out.println("Exception "+e);
return "Process problem ";
return path;Tony,
I answered this very same question that you posted at the JavaRanch forum.
Good Luck,
Avi. -
Error message when issuing a COMMIT in a store procedure
Hello experts,
Please help.
I have a problem where i cannot specify a COMMIT in a store
procedure. I have the following error message:
=================================================================
00034, 00000, "cannot %s in current PL/SQL session"
// *Cause: An attempt was made to issue a commit or rollback
from a PL/SQL
// object (procedure, function, package) in a session
which has this
// disabled (by 'alter session disable commit in
procedure')
// *Action: enable commits from PL/SQL in this session, or don't
attempt
// to use commit or rollback in PL/SQL when they are
disabled
// in the current session.
=================================================================
Thanks very much for a reply
Kind regards
YogeerajThe solution is to issue the statement
alter session enable commit in procedure;
However, I'd think carefully about doing this. Procedures are
often called as part of a wider transaction. If the procedure
issues a commit ALL the preceding work is also commited. If
there is something subsequent in the transaction that fails and
issues a rollback, it will onlt rollback the work done after the
procedure. This may lead to your database being in an
inconsistent state.
rgds, APC -
Oracle JBDC error while calling the store procedure
HI All,
I am get one strange error while calling a store procedure which has two parameter in and out.
I am pass the correct XML file which reaches the RDB and then PI receives a exception error message saying:
oracle.rdb.jdbc.common.RdbException: Closed Resultset
where as no error log is availble in RBD for the same.
Can anybody tell me what can be the cause of the error.
Let me know if you requires more information on this.
-adiHi Kiran,
Thanks..
But I am not able to understand you. I am calling a store procedure not a table. and we not doing anything in the store procedure except return one constant value in Out parameter.
-Adi -
How to pass values to Oracle store procedure in Crystal Report
Hi all,
I am newbie on passing values to stored procedure parameters. I created a Crystal Report using the Crystal Report wiward with PULL method and data come from Oracle stored procedure. In an ASP.NET page, I have stored two values in Session and need to pass them as input parameters to Oracle stored procedure to print the report. In Crystal reports 2010 once you connect to a stored-procedure as data source, it automatically creates the parameter fields with Crytal Report Viewer. Please show me how I pass values to store procedure at runtime automatically.
'Set the parametter value
myReport.SetParameterValue("@P_COURSE", "CoursetNo")
myReport.SetParameterValue("@P_CLASS", "ClassNo")
End Sub
I tried to apply above codes from Brian Bischof book but display the error from the following lines:
myReport.SetParameterValue("@P_COURSE", "CoursetNo")
myReport.SetParameterValue("@P_CLASS", "ClassNo")
I also enclosed my code. Any experts, please let me know anything wrongs on my code . I tried several methods that searching via google, but did not solve my issues. Thanks.
Edited by: avt2K7 on Mar 15, 2011 7:02 AMHi,
Thank you for your response. Here are the detailed code and error as following:
Please show what I am missing in my below VB.NET codes:
===========================================================================================
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
LogonToTables("username", "password", "servername", "")
End Sub
Private Sub LogonToTables(ByVal myUserId As String, ByVal myPassword As String, ByVal myServerName As String, ByVal myDataBaseName As String)
Dim Course, Class As String
Course = Session.Item("CourseNumber"))
Class = Session.Item("ClassNumber"))
Dim myReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
myReport.Load(Server.MapPath("CrystalReport1.rpt"))
Dim myTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
'Set the database properties and security credentials
Dim myConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
myConnectionInfo.ServerName = "servername"
myConnectionInfo.DatabaseName = ""
myConnectionInfo.UserID = "username"
myConnectionInfo.Password = "password"
'Apply the ConnectionInfo to the report tables
Dim myTables = myReport.Database.Tables
For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
myTableLogonInfo = myTable.LogOnInfo
myTableLogonInfo.ConnectionInfo = myConnectionInfo
myTable.ApplyLogOnInfo(myTableLogonInfo)
Next
'Set the parametter value to Crystal Report parameter named P_COURSE and P_CLASS
myReport.SetParameterValue("@P_COURSE", "Course")
myReport.SetParameterValue("@P_CLASS", "Class")
End Sub
=================================================================================
I put a break point to debug but display the error at the following lines:
myReport.SetParameterValue("@P_COURSE", "Course")
myReport.SetParameterValue("@P_CLASS", "Class")
Eventhough, if I set a specific value to Course=1000 and Class = math and still receive the error:
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
I tried several sources from Google search but it is not working. I really appreciate any detailed code either in C# or VB.NET to solve my issues. Thanks in advance. -
Store procedure for sale order
hi
i want store procedure that we can't add stand alone sale order without sale quatationhi,
you can check my post in this link
Re: Storeprocedure for sale order without sale quotation
regards
Fidel
Maybe you are looking for
-
What conditions - payment terms is pciked
Hi All, On what conditions do a purchase order picks up a different payment terms say x(Payment in 45 days),while thecorresponding Purchase Requistion and the vendor master have the payment term as y(Pay Immediately).The material is a non-st
-
I am unable to open PDF files or run adobe flash when its needed I have downloaded it several times and tried updating it. NEED HELP
-
Problème de pretrig Analogique
Bonjour, Voila mon problème : Je dispose actuellement d'une carte NI PCI 6254 mais je pense qu'elle n'est pas suffisante. En effet, je veux analyser (enfin du moins capter) 4 impulsion analogique en même temps qui fonctionnent sur le même trigger, ma
-
OS4 update and connect to itunes
I have the latest version of itunes on my computer. I tried to update the software on my 3rd gen ipod touch to the OS4. Computer restarted automatically (presumably after install, but I wasn't watching it the whole time). Now my computer and itunes w
-
Hi just a simple question ? the sleek and the micro photo are both supporting album arts?