Creating two or more procedures from ODBC
Hi.
I'm trying to create several standalone procedures in an Oracle 8.1.7 server, using ODBC pass-thru.
I'm trying to create these procedures:
CREATE OR REPLACE PROCEDURE EMSetContext(compid CHAR)
AS BEGIN
dbms_session.set_context('EMCTX','compid',RPAD(compid,5));
END;
CREATE OR REPLACE FUNCTION EMGetContext
RETURN VARCHAR
AS BEGIN
RETURN SYS_CONTEXT('EMCTX','compid');
END;
CREATE OR REPLACE PROCEDURE EMPutInContext(p_table CHAR, p_schema CHAR)
AS BEGIN
DBMS_RLS.ADD_POLICY(p_schema,p_table,'EMCTX_ACF',p_schema,'EMCTX_ACF','SELECT,UPDATE,INSERT,DELETE');
END;
GO
CREATE OR REPLACE FUNCTION EMCTX_ACF(p_schema varchar2, p_object varchar2)
RETURN varchar2
AS
cCompID CHAR(5) := SYS_CONTEXT('EMCTX','compid');
BEGIN
IF cCompID <> 'DBA' THEN
RETURN 'compid=''' || cCompID || '''';
ELSE
RETURN '';
END IF;
END;
GO
I already tests all these procedures in PL/SQL and they are sintaxticaly correct. I send to the Oracle server one procedure at a time, but just the first one is created without errors, no matter which of then I send first.
Is there any special sign or command I'm missing after each CREATE OR REPLACE statement?
TIA
Victor Espina
Ok, I did query the user_errors table. Then, I open a new connection to Oracle and sucessfuly sent this command via ODBC SPT:
CREATE OR REPLACE PROCEDURE EMSetContext(compid CHAR)
AS BEGIN
dbms_session.set_context('EMCTX','compid',RPAD(compid,5));
END;
Then, I sent this command:
SELECT * FROM user_errors;
and the result was:
NAME: EMSETCONTEXT
TYPE: PROCEDURE
SEQUENCE: 1.0
LINE: 1.0
POSITION: 37.0
TEXT:
PLS-00103: Encountered the symbol "" when expecting one of the following:
; is with authid deterministic parallel_enable as
Then, I tried to run the same command using SQL Plus and it worked just fine.
Any ideas?
Victor Espina
Similar Messages
-
Pick activity is not working properly while creating two or more file adapt
Hi,
pick activity is not working properly while creating two or more file adapter for bpel process.
bpel process compiled and deployed succesfully but while observing the wsdl file of deployed process you can find only one file adapter. so it polls only from that location.
can anybody help on over this? or it's limitation of jdev to use only one file adapter at time while using Pick.
Thanks
sagarDoes anybody tried this?
Thanks
sagar -
How to create two or more JVM in one machine ?
Hi to some background ,I want to invoke RMI call to a server ,and I have written the following client code ,that access a getCounter()to show the incremented static variables value ,each time calling the getCounter() will increment the static variable by 1.That code is deployed in the server.
PDOS_Remote_Interface service1 =(PDOS_Remote_Interface)Naming.lookup("rmi://x.xxx.xxx.xxx/REMOTE_SERVICE");
String s1= service1.sayHello();
int cont1 = service1.getCounter();
System.out.println(">>>>>> "+s1);
System.out.println(">>>>>> cont1 "+cont1);
PDOS_Remote_Interface service2 =(PDOS_Remote_Interface)Naming.lookup("rmi://y.yyy.yyy.yyy/REMOTE_SERVICE");
String s2= service2.sayHello();
int cont2 = service2.getCounter();
System.out.println(">>>>>> "+s2);
System.out.println(">>>>>> cont2 "+cont2);
This is working fine with even two different server (I mean in two physically different machine(x ip and y ip) ,there ip are different )
with following output :
Server Says Hai!
cont1 0
Server Says Hai!
cont2 0that is static variable is not shareing as they are in two different server
Now My problem:
I want to hit the one and only server ,In this case Service1 and Service2 are getting the remote instance from only one machine .And when I am doing that I am getting the static variable incremented ,That is following output
Server Says Hai!
cont1 0
Server Says Hai!
cont2 1Is this possible to create two JVM instance in a particular machine ..??
I mean I want the first output (both static variable shows 0)in second implementetion (using only one machine )???Yes, but the naming service is only going to accept one registration for a given name.
-
Hi, thanks to whoever will be able to respond - which the Apple assistance on line in Italy could not do, after minutes of conversation!
The point is that I cannot see anymore the total duration of two or more audio tracks selected from the same CD, but only the duration of the whole CD.
With the previous version of iTunes this was very easy, as I simply clicked on the tracks the interested me and I suddenly had the total time.
It makes no sense that Apple provides a new version which lacks one of the endless options of the program, therefore I hope it's only my faul in not being able to understand what to do. Otherwise, please tell me how can I downgrade and go back to iTunes 10....
Paul MeadowPress CTRL+/
tt2 -
Create two or more GL account in same material grp
Is it possible to create a two or more GL account for material group based on plant level.
ThanksHi Elaine,
I am not quite sure what are you trying to do. Do you mean material type? Either or the assignments of GL accounts to materials mainly depend on the valuation class. So under the same material type you could have different materials going to different accounts or valuation class. Typically each Material Type is defaulted to one valuation class, but that doesn't necessary mean that individual materials master records can be changed to another one, which may be pointing to another GL account.
Hope this helps.
GG -
Create two or more flash files from one (Excel) data source
Hi experts,
I have the following requirement about Xcelsius.
Our data source is a relational database. Via the ODBC driver we manage to create several queries and execute them into Microsoft Excel. Those excel sheets are the basic for the Xcelsius reports.
Now we want to build some highly visualized reports on that, but the crucial fact is. We don't want to have all the reports in one FlashFile, but we need several flash file depending on the area of the queries.
Hence our requirement would be one of the following points:
- create multiple flash files from one .xlf
- create multiple .xlf from data source
Another requirement is the automatic execution of the process. We don't want to have a person in between, who has to call all the .xlf files to create the Flash reports step by step. What we need is an automatic process.
Can this requirement be fulfilled in a way?
Maybe by using the Xcelsius SDK?
Thanks for any helps and comments!
SebastianSebastian,
Firstly talking about the important requirement i.e. automating the process:
In your case you can achieve this by using the XML maps. This will pick the data automatically when ever report is refreshed.
Secondly, both the approaches are correct, however i would go with the first one.
1. Create multiple flash files from one .xlf
You just need to create one dashboard and have a filter on areas (Invisible) and then export to flash (for every area).
2. Create multiple .xlf from data source
This approach is also fine, however you need to create multiple dashboards and do the same thing i.e filter data based on area.
P.S. Did you get a chance to explore options to integrate Xcelsius with your Relational Database, this will be much effective.
-Anil -
How to call PL/SQL stored procedure with TWO or more arguments from URL?
Hi all,
does anybody know, how to call stored procedure with more than one argument?
How to do this with one argument is known -
<img src="#OWNER#.retreive_img_data?i_id=#IMG_ID#" width="70" height="80" alt="No Picture">
But if I need to call procedure with two formal parameters? And need to pass through URL, for example, two page item values?Just separate with an "&". Using your previous example, I'll add i_name and i_type:
<img src="#OWNER#.retreive_img_data?i_id=#IMG_ID#&i_name=somename&i_type=jpg" width="70" height="80" alt="No Picture" />
Tyler -
Calling Stored Procedure from ODBC
I call a stored procedure that contains a reference to a database link through ODBC.
I get the following errors (LOAD_PDI is the name of the procedure):
ORA-02041: Client database did not begin a transaction
ORA-06512: at "LOAD_PDI" line 16
ORA-06512: at "LOAD_PDI" line 42
ORA-06512: at line 1
The procedure works if called from SQLplus and executes a query on a remote database to insert or update tables in the local data base. In the procedure I define two CURSORS to get data from the remote Database.
Is there anything unsupported using ODBC ?
Same error messages calling from Visual Basic using ADO. I have installe dthe last versione of OLEDB driver (8.1.6.2).
I am using Oracle Enterprise 8.1.6 release 2 on Windows NT server 4.0 with service pack 6.
Thanks for collaboration.
nullThe only way I'm aware of to turn off autocommit is to issue the ODBC call
SQLSetConnectAttr( hdbc, SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF, SQL_NTS )
Note that you'll have to issue a SQLEndTran call with SQL_COMMIT or SQL_ROLLBACK to commit or rollback your changes with autocommit off.
I'm curious as to whether you saw any documentation which indicated that the way to turn off autocommit was to add the registry entry 'autocommit=F'. That's certainly not an option I'm familiar with, so I'd like to ensure that we don't have incorrect documentation laying around.
The reason you'll see different behavior using ODBC as opposed to SQL*Plus is because the two have different semantics.
In SQL*Plus, statements that you execute are not committed until you execute an explicit commit statement. This is pretty standard for database interfaces, and is generally necessary if you want to maintain state in a transaction.
When Microsoft wrote the ODBC specification, they broke with this convention and specified that ODBC would, by default, commit every statement immediately after is suceeds. This may cause problems if your procedure assumes that it is able to maintain state between uncommitted calls.
For example, in SQL*Plus, if you issue the command "select empno from emp for update", the "for update" clause places a lock on those elements. Subsequent updates generally assume that those locks are still present. If you issue a "commit", however those locks are discarded.
In ODBC, if you issue the same command without explicitly turning off autocommit, the statement succeeds, taking out the locks, but then is immediately & automatically committed, releasing those locks. If you turn off autocommit, you get the same behavior you saw with SQL*Plus.
I suspect that the stored procedure LOAD_PDI maintains some state and that the code on lines 16 & 42 are doing some form of update that relies on this state being present.
Note that, since you don't specify that you are, I'm assuming that you're not using XA or Microsoft's transaction server to do coordinated multi-machine transactions. If you are using one of these, please let me know.
Justin Cave
ODBC Development -
Create two or more data sources and mapping to DSO
Hi,
I´m using SAP Netweaver BI 7.0.
If there are two or three data sources which have to be mapped to DSO which field from Data Sources has to be mapped to which field in DSO?
Is it possible to have only one DSO or should it be three DSOs because of the three Data Sources?
The thing is I have created one view out of three tables. For the view I have created one DSO. Everything worked fine. But now the requirements have changed because of currencies.
The view I have created is now mixing currencies because in the view is only one currency field, which is filled from the three tables. Two tables have different currencies and one table has one currency.
The one currency of the one table is important and should stay like it is.
I´m thinking about something like three different currency key fields in DSO which are mapped from data source. Also for every field of data source mapping with corresponding field in DSO.
Some hints? I have found articles in SDN about creating data sources and so on but they don´t help me in this matter.
Thank you in advance!Thank you guys for explaining! I´m new to SAP BW and trying to better understand.
I`ll try it also with the view. It sounds "easier".
But if I´m doing it with the 3 data sources, that means that for each currency field of the data source I will need an corresponding currency field in the DSO for mapping.
Is it possible to have 3 times the 0Currency field in the DSO and each data source currency field will be mapped to the DSO?
If that would work the 0Currency has to be contained in the key figures.
But if the 0Currency is contained in each key figure will the assignment of currency work correct?
+For example:+
Data Source1:
Turnover in Euro.
(All currency is in Euro)
Data Source2:
Profit in Dollar.
Profit in Euro.
Profit in Yen.
Profit in different currencies available.
Data Source3:
Sales in Dollar.
Sales in Euro.
Sales in Yen.
Sales in different currencies available.
For mapping from DataSources to DSO if it is possible to have 3 times 0Currency in DSO:
Data Source1 currency fiield ---> DSO 0Currency
Data Source2 currency fiield ---> DSO 0Currency
Data Source3 currency fiield ---> DSO 0Currency
Does it make sense? -
How to create two or more Automated Row Fetch on 1 Page
Hello!
Please help me to create 2 ARF processes from 2 different tables but on one Page. Is it possible in Apex 4.0?
Thank you!Hi,
Nope, i dont think so. If you want to make a form from only one table then use ARP. If you want to develop form based on two or three tables then write a custom pl/sql process of your own and you cannot able to use ARP.
Brgds,
Mini
Mark Answers Promptly -
Choose from List in A matrix for choosing two or more rows at same time
Hi Friends,
Actually I m using choose from list to select Items in a row, i can select Two or more rows from the List but while clicking choose it is taking only one value.
The no of rows are not activated tat i m choosing from list.
Thanks in advance
VivekHi.
Here is a [link|https://forums.sdn.sap.com/click.jspa?searchID=12829558&messageID=5584893] where are you can find on of my example on CFL on matrix column.
I think, you need to made some changes in code from these lines...
Dim oDataTable As SAPbouiCOM.DataTable
oDataTable = oCFLEvento.SelectedObjects
for ...
end for
Reply if this guideline was usefull for you.
Bye -
Middle clicking links will sometimes open two or more tabs
I imagine this is probably a bug and nothing can be done. It SEEMS as if it's only happening since the latest update.
Basically, what happens is when I open a bunch of links with middle click (pretty sure it needs to be more than one), sometimes the links will create two or more tabs of that linkThe dialog Firefox displays when you click the "close window" (X) button doesn't have the option to only close the current tab. Instead, you can use one of these methods to close just the current tab:
* Click the "x" that should appear on the current tab itself
* Right-click the current tab > Close tab
* Press Ctrl+w to close the current tab
(Note: If you accidentally press Ctrl+w twice, you can re-open the tab by pressing Ctrl+Shift+t to Undo Close Tab) -
I had created two photo albums on my ipad, by transferring photos from my hp laptop. I want to make space available on my ipad by deleting these photos, but the same hp laptop is no more with me. How do I delete these photos?
1, you can't at the moment, though with iOS 5 in the Autumn, from http://www.apple.com/ios/ios5/features.html#photos :
Even organize your photos in albums — right on your device
2, by removing it from you synced from and re-syncing. Only photos taken with the iPad, copied to it via the camera connection kit, or saved from emails/websites etc can be deleted directly on the iPad (either via the trashcan icon in the top right corner if viewing the photo in full screen, or via the icon of the box with the arrow coming out of it in thumbnail view)
3, the location of the photos that you synced to the iPad should be listed on the iPad's Photos tab when connected to your computer's iTunes.
4, you can copy the photos from your iPad to your computer : http://support.apple.com/kb/HT4083 . You should also be able to delete them from the iPad as part of the transfer process to your computer, and it's then your choice whether to add them to your sync photo list so as to copy them back to the iPad. Copying them to your computer would allow you to organise them into folders and therefore be able to sync them back into separate albums.
5, I don't use Dropbox either. There are some third-party browser apps in the iTunes App Store that allow you to download pages so that you can view them when offline e.g. Atomic Web (the whole page is saved within Atomic Web, it doesn't place a photo into the Photos app)
6, deleting content should help. If you remove an app from your iPad then you also remove the content that it's got on the iPad - so if you then decide to reinstall it back onto the iPad then you will need to manually add back any content that you want in it. None of the Apple built-in apps (including Photos) can be removed from the iPad -
I am beginner in MVC and I would like to create a view which populates two (or more) joined tables in a single view table as described below.
I have two tables:
1 - Bloggers: - bloggerID (int);
- bloggerName (string)
2 - Blogs: - blogID (int);
bloggerID (int);
- blogTitle (string);
- blogImage (string)
A blogger can have one or more blogs while one blog must be related to only one blogger.
I would like to have a view table on my webpage as the following:
Blogger Name
Blog Title
Blog Image
Noris Gang
Virus
virus.jpg
Noris Gang
Desktops
desktop.jpg
Gauthier
Books
books.png
John Leon
NNNMHJhjdhj
Nmbj.jpg
I'm using MVC 4 (or at least 3).
Thanks for your help.Hello,
From your description, it is not very clear that what you mean about the View, if it means the View concept in database as SQL Server, your required view should be as below:
Create view
as
Select Bloggers.bloggerName, Bloggers.blogTitle, Bloggers.blogImage
From Bloggers join Blogs on Bloggers.bloggerID = Blogs. bloggerID
If it means the UI view in MVC concept, I suggest you could ask it on the MVC forum:
http://forums.asp.net/1146.aspx
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
WHERE clause creating a join for two or more tables
The CS3 Dreamweaver book says that the WHERE clause can
create a join for two or more tables. The join was created, but the
data is repeating. I have searched the web and this forum and have
not found the answer.
My Master page filters the recordset by Style No and when a
customer clicks on a particular style, it sends him to the Detail
page. All the records are showing from all tables on the detail
page from the Dynamic List, except they are showing multiple times
(ex. Size table has 4 sizes and Color table has 2 colors - my Size
Drop Down list is showing 8 options and my Color Drop Down List is
showing 8 options) I have a Master Page with a recordset pointing
to a Detail Page using the same recordset.
Master page works perfectly.
Master Recordset SQL:
SELECT products.itemID, products.category, products.styleno,
products.name, products.description, products.ourprice,
products.imageTH, products.image, coloroption.color,
sizeoption.size
FROM products, coloroption, sizeoption
WHERE category = 'chefcoats' AND
products.styleno=sizeoption.styleno AND
products.styleno=coloroption.styleno
GROUP BY products.styleno
ORDER BY styleno ASC
The Detail Recordset:
SELECT products.itemID, products.category, products.styleno,
products.name, products.description, products.ourprice,
products.imageTH, products.image, sizeoption.size,
coloroption.color
FROM products, sizeoption, coloroption
WHERE itemID=colname AND products.styleno=sizeoption.styleno
AND products.styleno=coloroption.styleno
I tried using the GROUP BY on the detail page, but then it
only showed one size and color from the dynamic drop down list. I
tried changing the field name "styleno" in the other tables to be
unique, however, I was using the table identifer. I tried using the
JOIN command instead of the WHERE clause and that didn't help
either.
On the detail page, the customer is supposed to click on the
Size box and see sizes XSM - 6XL ONLY ONE TIME. and then be able to
click on the Color option and see White, Black, Red ONE TIME.
Is this possible?
Thank you for giving your time to read this.!
EvieDo you have a link we can look at to see what you are trying
to do?
Dave
"EviePhillips" <[email protected]> wrote in
message
news:[email protected]...
> The CS3 Dreamweaver book says that the WHERE clause can
create a join for
two
> or more tables. The join was created, but the data is
repeating. I have
> searched the web and this forum and have not found the
answer.
>
> My Master page filters the recordset by Style No and
when a customer
clicks on
> a particular style, it sends him to the Detail page. All
the records are
> showing from all tables on the detail page from the
Dynamic List, except
they
> are showing multiple times (ex. Size table has 4 sizes
and Color table has
2
> colors - my Size Drop Down list is showing 8 options and
my Color Drop
Down
> List is showing 8 options) I have a Master Page with a
recordset pointing
to a
> Detail Page using the same recordset.
>
> Master page works perfectly.
> Master Recordset SQL:
> SELECT products.itemID, products.category,
products.styleno,
products.name,
> products.description, products.ourprice,
products.imageTH, products.image,
> coloroption.color, sizeoption.size
> FROM products, coloroption, sizeoption
> WHERE category = 'chefcoats' AND
products.styleno=sizeoption.styleno AND
> products.styleno=coloroption.styleno
> GROUP BY products.styleno
> ORDER BY styleno ASC
>
> The Detail Recordset:
> SELECT products.itemID, products.category,
products.styleno,
products.name,
> products.description, products.ourprice,
products.imageTH, products.image,
> sizeoption.size, coloroption.color
> FROM products, sizeoption, coloroption
> WHERE itemID=colname AND
products.styleno=sizeoption.styleno AND
> products.styleno=coloroption.styleno
>
> I tried using the GROUP BY on the detail page, but then
it only showed
one
> size and color from the dynamic drop down list. I tried
changing the
field
> name "styleno" in the other tables to be unique,
however, I was using the
table
> identifer. I tried using the JOIN command instead of the
WHERE clause and
that
> didn't help either.
>
> On the detail page, the customer is supposed to click on
the Size box and
see
> sizes XSM - 6XL ONLY ONE TIME. and then be able to click
on the Color
option
> and see White, Black, Red ONE TIME.
>
> Is this possible?
>
> Thank you for giving your time to read this.!
> Evie
>
>
Maybe you are looking for
-
Error during installation of a new SLD
Hello people, During installation of a new SLD I got different kind of errors in the Log. Does anyone has a suggestion what to do? <b>#79</b> 09/10/2007 14:04:01.536 [Thread-74] INFO com.sap.lcr.pers.delta.importing.ImportHandler: Finished full impor
-
Please, please, please make ICC profile info available for RGB files.
I know, I know, I know - if everything's working properly one should never care what the icc profile is that's being used to interpret the colors in a file. And good people shouldn't get killed by falling tree branches... but stuff happens, and somet
-
Mac book pro facetime hd camera is not connected
Built in camera is not being detected by applications. The message "there is no connected camera" is displayed
-
I don't have any birthday photos since I haven't celebrated it in years but I just watched the Matrix again and I hope this is acceptable-. Good luck everyone!
-
I want to change countries but because Itunes match it will not work
Hey, I just moved to another country and wanted to change my land and bankcard information but when i try it there is a message that i first have to deactivate itunes match before changing countries. I tried to turn off itunes match but it doesn't wo