Storing
Hello,
I'm just facing one request from client - automatically generated PDF files whose will be stored in database (in www_flow_files).
I'm using for PDF standard report engine with Apache FOP. It works. But, the result (generated PDF) is "pushed" into client computer and I don't know how can I call report query via pl/sql to store data. I've tried to use package utl_http.get_response with link to page 0 and report query, but I wasn't successful, because I'm faced strange problems with SESSION_ID.
After that I've tried to go via db packages (directly), I have found package wwv_flow_render_query, but it's not documented :(
Has anybody an idea how to solve it?
Thanks a lot, Martin
Hi
The escape sequence for "\^_" is not valid.Other way is to use unicode char representing this symbol. But I could not find the unicode in Hexadecimal/Octal number e.g., char ch= '\uxxxx' in Hexadecimal or char ch='\ooo' in Octal, for this symbol("^_").Because in NT I cant store ^_ as a single character.
I visited www.unicode.org but could not find.
Similar Messages
-
i am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier photo please help me to recover my photos
Well I'll guess you're using iPhoto 11:
Option 1
Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
If that fails:
Option 2
Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
Regards
TD -
hi
i have stored proc like this
ALTER PROCEDURE [dbo].[p_member]
@MemberID INT = NULL,
@ID INT = NULL,
@Type varchar(20) = NULL
AS
IF NOT EXISTS (SELECT Memberid FROM Member mcd JOIN Pro p WITH(NOLOCK)
on mcd.ProgramID = p.ProgramID WHERE ((mcd.MemberID = @MemberID) OR (mcd.ID = @ID and p.CD = @Type)))
BEGIN
select 'CAN''T BE FOUND'
END
i am not sure what i am doing in if statement, its not working.my logic should be like
check if atleast on or the other is available ..ie memberid or id+type, if nto i need to print message.
thanksWhat do you get for the following:
DECLARE @MemberID INT = 444,
@ID INT = NULL,
@Type varchar(20) = NULL;
IF NOT EXISTS (SELECT Memberid FROM Member mcd JOIN Pro p WITH(NOLOCK)
on mcd.ProgramID = p.ProgramID WHERE ((mcd.MemberID = @MemberID) OR (mcd.ID = @ID and p.CD = @Type)))
BEGIN
select 'CAN''T BE FOUND'
END
ELSE SELECT 'FOUND'
Kalman Toth Database & OLAP Architect
Free T-SQL Scripts
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Excel Workbook with Excel Data Model stored on SharePoint - daily refresh
I'm not sure if this is exactly the right forum but I'm hoping that someone here can either answer or point me in the right direction.
I have an Excel Workbook with an Excel Data Model.
The Excel Data Model uses SQL to contact our data warehouse and pull through data into tables.
We are storing the Workbook on a SharePoint site and viewing it using Excel Services.
The data in our data warehouse is updated daily and so I would like to refresh the workbook daily and remove the option to refresh the data in the browser.
Is this possible with a workbook that has an Excel Data Model (I've seen lots of posts that relate to workbooks with connections to tabular models).
Thanks
PaulHi Paul,
I have answered this issue in this thread that you posted in SQL Server PowerPivot for SharePoint forum, please see:
http://social.msdn.microsoft.com/Forums/en-US/9627939c-e9f1-48ae-a6ed-0c238d8f2d69/excel-workbook-with-excel-data-model-stored-on-sharepoint-daily-refresh?forum=sqlkjpowerpointforsharepoint
Furthermore, this issue is more related to PowerPivot for SharePoint. If you have any more questions about PowerPivot for SharePoint, I would sugget you open a new thread in the forum below for better support:
http://social.msdn.microsoft.com/Forums/en-US/home?forum=sqlkjpowerpointforsharepoint
Thanks for your understanding.
Regards,
Elvis Long
TechNet Community Support -
Get variable values from a stored procedure
I am using SQL 2008R2 and I want to replace a view inside a stored procedure with a new stored procedure to return multiple variable values. Currently I am using the code below to get values for 4 different variables. I would rather get the 4 variables
from a stored procedure (which returns all of these 4 values and more) but not sure how to do so. Below is the code for getting the 4 variable values in my current sp.
DECLARE @TotalCarb real;
DECLARE @TotalPro real;
DECLARE @TotalFat real;
DECLARE @TotalLiquid real;
SELECT @TotalCarb = ISNULL(TotCarb,0),
@TotalPro = ISNULL(TotPro,0),
@TotalFat = ISNULL(TotFat,0),
@TotalLiquid = ISNULL(TotLiq,0)
FROM dbo.vw_ActualFoodTotals
WHERE (MealID = @MealID);You can replace the view with inline table valued user-defined function:
http://www.sqlusa.com/bestpractices/training/scripts/userdefinedfunction/
See example: SQL create INLINE table-valued function like a parametrized view
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Every time I login I get the message "aosnotifyd wants to use your confidential information stored in "my name" in your keychain." How do I know if it is safe to allow this? Can anyone advise please?
My immediate reaction is to deny.
Have you downloaded or installed any application that may relate to the abbreviation AOS? It may not necessarily be the application's name, could be the developer or distributor.
As it's occuring at log-in, go to System Preferences > Accounts > your account > Login Items and look for a related item. If there's one there, right-click (or ctrl click) on it and select Reveal in Finder. That will show you where the originator of the item is on your system and should give you more of a clue as to what it is.
I'd remove the item from login items anyway (highlight and click the minus sign at the bottom of the window). There shouldn't be anything trying to use your keychain info to notify anyone. -
To pass new session variable value to stored proc before running a report.
Hi,
Below is summary of the report requirement -
Database level design
1. Created a view and a global temporary table (GTT)
2. Created an Oracle package procedure to accept from and to business dates on basis of which it will fetch, process and populate the GTT.
Repository level design
1. Created a business model containing the view and the GTT (mentioned above)
2. Created two SESSION variables "from_dt" and "to_dt" to be initialized by their respective init blocks. Each of the variable is initialized with a DATE column value (of type DATETIME) from a database lookup table. I have also set the option "Enable that variable to be set by any user" for both variables.
Query for these variables :
from_dt = select from_date from <table>
to_dt = select add_months(from_date,12) from <table>
Presentation level design
1. Using a text box, i display the default/initialized values of these variables like this -
Current business date:@{biServer.variables['NQ_SESSION.from_dt']} Future business dt:@{biServer.variables['NQ_SESSION.to_dt']}
Dates get displayed in YYYY-MM-DD 00:00:00 format
The text msg displays these default dates and allows the user to specift different date range for which i create prompts as shown below.
2. Using any random two columns of date type from the business model, i create two date dashboard prompts with labels "From Dt" and "To Dt".
i select Calender Controls for both; setting Default To = Report Defaults.
The Set Variable is set to Presentation variables - such that pv_from_dt maps to "From Dt" and pv_to_dt maps to "To Dt".
3. i create the report using the business model created above. In the report "Advanced Tab" => "Prefix" field i specify the following -
SET VARIABLE from_dt='@{pv_from_dt}',to_dt='@{pv_to_dt}';
Note : The logic here is to display the default dates and allow user to specify different date values which will be stored in presentation variables.
If the user does specify different "from dt" and "to dt" values, then using the presentation variables, i want to "write" back these new values to the corresponding session variables mentioned above.
If the user does not specify different date range, then the default/initialized dates must be considered.
I also display the default and new date values in the report title.
Back to Repository level design
To execute the stored procedure that will load the GTT before running the report I need to pass two date parameters to the stored procedure on basis of which it will fetch data, process and populate the GTT.
In the Connection Pool --> Connection Script Tab --> Execute before query, I wrote the below query using the repository variables FROM_DT and TO_DT to execute the procedure -
DECLARE
v_from_dt date;
v_to_dt date;
BEGIN
v_from_dt := VALUEOF(From_Dt);
v_to_dt := VALUEOF(To_Dt);
package_name1.package_body(v_from_dt,v_to_dt);
END;
Now when i try to run the report i get the following error :
[nQSError: 10058] A general error has occurred. [nQSError: 23006] The session variable, NQ_SESSION.to_dt, has no value definition. (HY000)..
Need help on this.
Is it possible to "write back" a new value to a session variable ?
Any other alternatives.
Thanks
Nusrat
Edited by: user10309945 on Jan 24, 2011 10:08 PMSandeep, I found a several topics where users describe saving values in DB through stored procedure or function. For example, [How to store OBIEE presentation level variable values in DB |http://forums.oracle.com/forums/thread.jspa?threadID=892006] I tried it and get an error
*10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 14551, message: ORA-14551: cannot perform a DML operation inside a query ORA-06512*
It's not a BI error. This error are generated by Oracle DB. If I write next:
SELECT MyPLSQLFunction(p1,p2) FROM DUAL
I get the same error.
Oracle doesn't allow DML operations in SELECT.
Did you relalize this feature yourself? Where did I mistake? -
Image path not storing in sql database
Hello,
I have read here on the forum how to upload an image to server and store path in your database, the image uploads correctly to the correct folder on my server but the image path does not get stored on my sql database (not local hosting). I receive the error: The file has been uploaded, and your information has been added to the directory. Column 'image' cannot be null.
My database has the following columns:
id
datum
image
sectie
My code is as follows:
<?php require_once('Connections/dbTroch.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
mysql_select_db($database_dbTroch, $dbTroch);
$query_rs_aanbod = "SELECT * FROM tblSlideshow ORDER BY id ASC";
$rs_aanbod = mysql_query($query_rs_aanbod, $dbTroch) or die(mysql_error());
$row_rs_aanbod = mysql_fetch_assoc($rs_aanbod);
$totalRows_rs_aanbod = mysql_num_rows($rs_aanbod);
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
$target = "images/slides/"; //This is the directory where images will be saved//
$target = $target . basename( $_FILES['image']['name']); //change the image and name to whatever your database fields are called//
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "add-photos-aanbod")) {
$insertSQL = sprintf("INSERT INTO tblSlideshow (image, sectie) VALUES (%s, %s)",
GetSQLValueString($_POST['file'], "text"),
GetSQLValueString($_FILES['image']['name'], "text"));
//This code writes the photo to the server//
if(move_uploaded_file($_FILES['image']['tmp_name'], $target))
//And confirms it has worked//
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory";
else {
//Gives error if not correct//
echo "Sorry, there was a problem uploading your file.";
mysql_select_db($database_dbTroch, $dbTroch);
$Result1 = mysql_query($insertSQL, $dbTroch) or die(mysql_error());
?>
<!doctype html>
<html>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Troch Project Solutions - Admin - Toevoegen</title>
<link rel="stylesheet" href="css/foundation.css" />
<link rel="stylesheet" href="css/layout.css" />
<!-- Fonts
================================================== -->
<script type="text/javascript" src="//use.typekit.net/vob8gxg.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<!-- jQuery
================================================== -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="js/vendor/modernizr.js"></script>
</head>
<body>
<div class="row">
<div class="large-8 medium-8 small-8 large-centered medium-centered small-centered columns intro">
<h2 class="subheader text-center">Admin</h2>
<p><a>Log uit</a></p>
<p><a href="admin.php">Terug naar Admin menu</a>
<h4>image toevoegen naar aanbod slideshows:</h4>
<form action="<?php echo $row_rs_aanbod['']; ?>" method="POST" name="add-photos-aanbod" id="add-photos-aanbod" enctype="multipart/form-data">
<table>
<tbody>
<tr>
<td><label for="image">Kies foto:</label></td>
<td><input name="image" type="file" id="image" value="<?php echo $row_rs_aanbod['image']; ?>" /></td>
<tr>
<td>Sectie:</td>
<td><select name="sectie" id="sectie" option value="sectie">
<?php
do {
?>
<option value="<?php echo $row_rs_aanbod['sectie']?>"><?php echo $row_rs_aanbod['sectie']?></option>
<?php
} while ($row_rs_aanbod = mysql_fetch_assoc($rs_aanbod));
$rows = mysql_num_rows($rs_aanbod);
if($rows > 0) {
mysql_data_seek($rs_aanbod, 0);
$row_rs_aanbod = mysql_fetch_assoc($rs_aanbod);
?>
</select></td>
</tr>
<tr>
<td><input type="Submit" name="Add" id="add" value="Toevoegen" /></td>
</tr>
</tbody>
</table>
<input type="hidden" name="MM_insert" value="add-photos-aanbod" />
</form>
</div><!-- end large-8 -->
</div><!-- end row -->
<script src="js/vendor/jquery.js"></script>
<script src="/js/vendor/fastclick.js"></script>
<script src="js/foundation.min.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>
<?php
mysql_free_result($rs_aanbod);
?>
I cannot work out what is wrong and I would appreciate any help on this. ThanksYour form field and array variable names do not match
<td><input name="image" type="file" id="image" value="<?php echo $row_rs_aanbod['image']; ?>" /></td>
GetSQLValueString($_POST['file'], "text"), -
XML Publisher Report EXCEL output Huge stored as Web Pages
Hello
I have a XML Publisher Report which generates EXCEL output and the output file size is huge.
What I notice that it is stored as Web Pages *.htm; *.html (Save as Type) in Excel this is the reason it is huge.
If I save as Microsoft Office Excel Workbook *.xls it Reduce the size.
I don't know how to save as ".xls" through XML Publisher using PL/SQL.
Any body knows? please Help..
XML Publisher Template Builder for WORD
Version 5.6 Build 45
PATCH BUG_NUMBER
XDO.H *3263588*
4.5.0 *3554613*
5.0.0 *3822219*
5.5.0 *4206181*
5.0.1 *4236958*
5.6.0 *4561451*
5.6.1 *4905678*
5.6.2 *5097966*
5.6.3 *5472959*
Thanks.Hi Vetsrini,
We're on 10.1.3.4.1 and siebel 8.1.1.3 and when trying to open a report from within siebel in the output format EXCEL (selected from the parameter applet), it just opens the document in the browser.
Is there a way to get it to open directly in Excel? I guess the reason is the file extension*.EXCEL, how could we get the extension to be in excel format (xls)?
We don't want our users to have to do this themself.
Regards,
Hakan -
How can i display a list of all the names stored in the Mail app?
When sending an email, the program shows a list of names according to the first and subsequent letters that I type into the To: field. There are times I cannot recall someone's email user name. How can I display a complete list of all the names Mail has stored? I know that I can go to the To: field then type in the letter A, then write down all listings under A, and then repeat for each letter of the alphabet, but there should be an easier method.
I have perhaps dozens of names in Mail, but only five names in Address Book, so the latter does me no good.On the menubar, Mail > Window > Previous Recipients
Regards,
Captfred -
Pointbase : How can I create a stored procedure with Pointbase database?
Hello,
Excuse me for my english, I'm not anglophone. I try to create a stored procedure.
This is my file SampleExternalMethods.java :
import java.sql.*; //import com.pointbase.jdbc.jdbcInOutDoubleWrapper; public class SampleExternalMethods { // A connection object to allow database callback static Connection conn = null; static Statement l_stmt; static Statement m_stmt; static CallableStatement m_callStmt = null; static ResultSet l_rs = null; public static void main(String[] args) { try { String url = "jdbc:pointbase:server://localhost/pointbaseDB"; String username = "PBPUBLIC"; String password = "PBPUBLIC"; conn = DriverManager.getConnection(url, username, password); doCreateProcedure(); doInvokeProcedure(); } catch (SQLException e) { e.printStackTrace(); } finally { if (m_stmt != null) { try { m_stmt.close(); } catch (Exception e) { e.printStackTrace(); } } if (m_callStmt != null) { try { m_callStmt.close(); } catch (Exception e) { e.printStackTrace(); } } if (conn != null) { try { conn.close(); } catch (Exception e) { e.printStackTrace(); } } } } public static void getCountry(String Iso_Code) { try { // Query the database for the country iso code l_stmt = conn.createStatement(); l_rs = l_stmt.executeQuery( "SELECT * FROM countries" + " WHERE country_iso_code ='" + Iso_Code + "'"); //Affichage du résultat de la requête l_rs.next(); System.out.print(l_rs.getString(1) + " - "); System.out.print(l_rs.getString(2) + " - "); System.out.println(l_rs.getString(3)); // Close the result set l_rs.close(); } catch (SQLException e) { e.printStackTrace(); } finally { if (l_rs != null) { try { l_rs.close(); } catch (Exception e) { e.printStackTrace(); } } if (l_stmt != null) { try { l_stmt.close(); } catch (Exception e) { e.printStackTrace(); } } } } public static void doCreateProcedure() throws SQLException { // SQL statement to create a stored procedure String SQL_CREATE_PROC = "CREATE PROCEDURE getCountry(IN P1 VARCHAR(30))" + " LANGUAGE JAVA" + " SPECIFIC getCountry" + " NO SQL" + " EXTERNAL NAME \"SampleExternalMethods::getCountry\"" + " PARAMETER STYLE SQL"; // Create a SQL statement m_stmt = conn.createStatement(); // Execute the SQL m_stmt.executeUpdate(SQL_CREATE_PROC); // Close the statement //m_stmt.close(); } public static void doInvokeProcedure() throws SQLException { // Create SQL to invoke stored procedures String SQL_USE_PROC = "{ call getCountry(?) }"; // Create a callable statement with three binding parameters m_callStmt = conn.prepareCall(SQL_USE_PROC); m_callStmt.setString(1, "CA"); m_callStmt.executeQuery(); // Close the callable statement //m_callStmt.close(); } }
Afterwards, I have read this note in a Pointbase document:
To invoke the dateConvert external Java method from a stored function, you must use the
CREATE FUNCTION statement. The dateConvert external Java method is called from the
class, SampleExternalMethods.
In order for the database to access this external Java method, the class SampleExternalMethods
must be included in the database CLASSPATH. For PointBase Embedded - Server Option, it
must be in the Server CLASSPATH, but not in the Client CLASSPATH.
If PointBase Server is run with the Java Security Manager, in the java policy file grant
’com.pointbase.sp.spPermission’ to the class that implements the external Java method.
An "spPermission" consists of a class name with no action. The class name is a name of a class
that could be used in creating a Stored Procedure in PointBase. The naming convention follows
the hierarchical property naming convention and that is supported by
"java.security.BasicPermission". An asterisk may appear by itself, or if immediately preceded
by ".", may appear at the end of the name, to signify a wildcard match. The name cannot
contain any white spaces.
I'm not sure, but I suppose that I must include the class SampleExternalMethods in a .jar file.
The database CLASSPATH could be : C:\Sun\AppServer\pointbase\lib\
These my files in this database CLASSPATH:
pbclient.jar
pbembedded.jar
pbtools.jar
pbupgrade.jar
I have tryed to include the class SampleExternalMethods in pbclient.jar and pbembedded.jar with this command:
jar -uf pbembedded.jar SampleExternalMethods
Afterwards I do that,
1) Start Pointbase
2) Configuration of classpath
set classpath=C:\Sun\AppServer\pointbase\lib\pbclient.jar
set classpath=%classpath%;D:\J2EE\Ch07Code\Ch07_06
I precise that my file SampleExternalMethods is into D:\J2EE\Ch07Code\Ch07_06\Ch07.
Then, I run the program:
D:\J2EE\Ch07Code\Ch07_06>java -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver Ch07.SampleExternalMethods
But I have an error message:
Exception in thread "main" java.lang.NoClassDefFoundError: Ch07.SampleExternalMethods (wrong name: SampleExternalMethods)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.DefineClass(ClassLoader.java:539)
The problem, I suppose, comes from that the class SampleExternalMethods
must be included in the database CLASSPATH, but there is a pbserver.jar with pointbase normally, but I didn't find it. That's why I use pbembedded.jar or pbclient.jar in order to include the class SampleExternalMethods. May be I must start from C:\Sun\AppServer\pointbase\lib\ instead of D:\J2EE\Ch07Code\Ch07_06\Ch07?
Please, can somebody helps me?
Thank you in advance.
cagou!jschell wrote:
And I doubt you can recurse like that for embedded java. You must have a class that does the functionality and another class that creates the proc.
>And I doubt you can recurse like that for embedded java. You must have a class that does the functionality and another class that creates the proc.
>
And I doubt you can recurse like that for embedded java. You must have a class that does the functionality and another class that creates the proc.
Thank you for your response, I have done two classes:
SampleExternalMethods.java:
package Ch07;
import java.sql.*;*
*public class SampleExternalMethods*
*public static void getCountry(String Iso_Code)*
*// A connection object to allow database callback*
*Connection l_conn = null;*
*Statement l_stmt = null;*
*ResultSet l_rs = null;*
*try*
*String url = "jdbc:pointbase:server://localhost/pointbaseDB";*
*String username = "PBPUBLIC";*
*String password = "PBPUBLIC";*
*l_conn = DriverManager.getConnection(url, username, password);*
*// Query the database for the country iso code*
*l_stmt = l_conn.createStatement();*
*l_rs = l_stmt.executeQuery( "SELECT* FROM PBPUBLIC.COUNTRIES"
+" WHERE country_iso_code ='"+ Iso_Code +"'");+
+//Affichage du résultat de la requête+
+l_rs.next();+
+System.out.print(l_rs.getString(1)+ " - ");
System.out.print(l_rs.getString(2) +" - ");+
+System.out.println(l_rs.getString(3));+
+// Close the result set+
+l_rs.close();+
+} catch (SQLException e) {+
+e.printStackTrace();+
+} finally {+
+if (l_rs != null) {+
+try {+
+l_rs.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+if (l_stmt != null) {+
+try {+
+l_stmt.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+if (l_conn != null) {+
+try {+
+l_conn.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+}+
+}+
+}+
CreateMethods.java:
+package Ch07;+
+import java.sql.*;+
+public class CreateMethods+
+{+
+// A connection object to allow database callback+
+static Connection m_conn = null;+
+static Statement m_stmt;+
+static CallableStatement m_callStmt = null;+
+public static void main(String[] args)+
+{+
+try+
+{+
+String url = "jdbc:pointbase:server://localhost/pointbaseDB";+
+String username = "PBPUBLIC";+
+String password = "PBPUBLIC";+
+m_conn = DriverManager.getConnection(url, username, password);+
+doCreateProcedure();+
+doInvokeProcedure();+
+} catch (SQLException e) {+
+e.printStackTrace();+
+} finally {+
+if (m_stmt != null) {+
+try {+
+m_stmt.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+if (m_callStmt != null) {+
+try {+
+m_callStmt.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+if (m_conn != null) {+
+try {+
+m_conn.close();+
+} catch (Exception e) {+
+e.printStackTrace();+
+}+
+}+
+}+
+}+
+public static void doCreateProcedure() throws SQLException {+
+// SQL statement to create a stored procedure+
+String SQL_CREATE_PROC = "CREATE PROCEDURE PBPUBLIC.getCountry(IN P1 VARCHAR(30))"+
" LANGUAGE JAVA"
+" SPECIFIC getCountry"+
" NO SQL"
+" EXTERNAL NAME \"SampleExternalMethods::getCountry\""+
" PARAMETER STYLE SQL";
// Create a SQL statement
m_stmt = m_conn.createStatement();
// Execute the SQL
m_stmt.executeUpdate(SQL_CREATE_PROC);
// Close the statement
//m_stmt.close();
public static void doInvokeProcedure() throws SQLException {
// Create SQL to invoke stored procedures
String SQL_USE_PROC = "{ call getCountry(?) }";
// Create a callable statement with three binding parameters
m_callStmt = m_conn.prepareCall(SQL_USE_PROC);
m_callStmt.setString(2, "CA");
m_callStmt.executeQuery();
// Close the callable statement
//m_callStmt.close();
}But I have the same error message that previously.
I have read this note and I suppose that the problem is linked:
If PointBase Server is run with the Java Security Manager, in the java policy file grant
*com.pointbase.sp.spPermission to the class that implements the external Java method.*
An "spPermission" consists of a class name with no action. The class name is a name of a class
that could be used in creating a Stored Procedure in PointBase. The naming convention follows
the hierarchical property naming convention and that is supported by
*"java.security.BasicPermission". An asterisk may appear by itself, or if immediately preceded*
by ".", may appear at the end of the name, to signify a wildcard match. The name cannot
contain any white spaces.
Can you explain me what I must to do in order to solve this problem of spPermission.
Thanks. -
How to view the returned data from a stored procedure in TOAD?
Hi,
I created ref cursor in the stored procedure to return data. The stored procedure works fine, just want to view the result in TOAD. The BEGIN... EXEC... END can execute the stored procedure, but how to make the result display?
Thanks!Right click the editor and choose
"Prompt For Substitution Variables".
Run for example the following code:
DECLARE
PROCEDURE p (cur OUT sys_refcursor)
AS
BEGIN
OPEN cur FOR
SELECT *
FROM DUAL;
END p;
BEGIN
p (:cur);
END;
The result will display in Toad's Data Grid!
Regards Michael -
Maybe my question has an answer too "obvious" for me to see it. But lately I've become aware of tunes that, for one reason or another, are not showing in my iMac's iTunes program. I went to System Preferences and clicked on "iCloud." Immediately, I saw how to check iCloud for the following files and documents: Mail, Contacts, Calendar, Notes, Safari (not sure what this category could be for--seeing what was on the web at some prior point in history?), Photo Stream, Documents & Data, Back to My Mac, Find My Mac.
In other words, going to iCloud appears to reveal categories for all of your iCloud content EXCEPT your music files. I know about iTunes Match, and I think I like it, now that I've gotten used to a few of its quirks. But certainly there are times when the owner of downloaded, commercial audio files (i.e. Tunes) will not have them on his computer. And certainly there must be a way for me to see what I've previously stored in the Cloud--if only to remind myself of the music I've purchased and have available to me.
I may be missing something about the whole iCloud concept. Is there a way for me to see tunes I've previously stored in the iCloud but no longer have on my computer? (I'm always careful not to delete tunes from my iTunes program unless I see 2 or more identical files appearing on my computer).
Thanks for any directions to the iCloud musical holdings / archives--or clarification of any misunderstandings.
Cap
(I see that I'm currently running OS 10.8.2. I have only 500 gigs of memory, and my music collection is so larg, I'm almost dependent on being able to access songs in the iCloud. Next time, I'll certainly pony up for the largest memory Apple offers on an iMac.)They are not showing up in Lightroom at all. I already deleted them.
When I try to import them again into Lightroom it wants to add another 2012 folder to wherever I am trying to insert them and then it does the month/day folder when it already has the month folder it should automatically go into and not be adding a seperate 2012 folder first.
I can't even get it to do the above right now. Now all it does is it wants to make this seperate 2012 folder with the month/day folders but has little boxes beside each folder showing that there are no images to import. The images do show up on the import screen but they are all darkened and unchecked. When I click the proper folder to import them they come on bright and have little boxes checked, but that lasts for less than a second before it decides they are not new. They are new images, I deleted them all out of Lightroom, and probably missed deleting some through Lightroom but instead deleted them straight from the folder outside of Lightroom. This is what is probably causing me such grief and I have found nothing in my searches to tell me how to correct this. *sigh* -
Error while running a stored procedure in SBO
Hi all,
i have a stored procedure that i run in my sbo. When i run the stored procedure i get the following error :
1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Warning: Null value is eliminated by an aggregate or other SET operation.
'Servicecontracten' (OCTR) 05/10/2011 18:03:36 -1
i launch my sp like this :
exec [spu_DS_HistProjektUserVeldenViewBetalingen] (i pass no parameters while testing. i put them fix in my sp)
my stored procedure looks like this :
USE [def1]
GO
/****** Object: StoredProcedure [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen] Script Date: 10/05/2011 18:03:05 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Batch submitted through debugger: SQLQuery2.sql|8|0|C:\Users\kvanhauwaert\AppData\Local\Temp\~vs2A98.sql
ALTER PROCEDURE [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]
/* @project_number varchar(20),
@billperiod_type varchar(10) */
AS
BEGIN
SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase, isnull(factuurbedrag,0) as factuurbedrag,
isnull(billperiod_type,'') as billperiod_type
INTO #tempDS_HistProjektUserVeldenViewBetalingen
FROM DS_HistProjektUserVeldenViewBetalingen t1
WHERE project_number = '08053A'
SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase , isnull(factuurbedrag,0) as factuurbedrag,
(select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where lijnnr <= t1.lijnnr) as lijntotaal,
(select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where lijnnr <= t1.lijnNr and billperiod_type = '110-01' ) as lijntotaalKetting
FROM #tempDS_HistProjektUserVeldenViewBetalingen t1
WHERE fase,'') is not null
ORDER BY t1.fase
DROP TABLE #tempDS_HistProjektUserVeldenViewBetalingen
END
GO
Somebody has a clue what i'm doing wrong ?
thnxThanks Gordon for your reply.
i've changed my sp to :
USE [def1]
GO
/****** Object: StoredProcedure [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen] Script Date: 10/05/2011 18:56:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Batch submitted through debugger: SQLQuery2.sql|8|0|C:\Users\kvanhauwaert\AppData\Local\Temp\~vs2A98.sql
CREATE PROCEDURE [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]
/* @project_number varchar(20),
@billperiod_type varchar(10) */
AS
BEGIN
SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase, isnull(factuurbedrag,0) as factuurbedrag,
isnull(billperiod_type,'') as billperiod_type
INTO #tempDS_HistProjektUserVeldenViewBetalingen
FROM DS_HistProjektUserVeldenViewBetalingen t1
WHERE isnull(project_number,'') = '08053A'
SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase , isnull(factuurbedrag,0) as factuurbedrag,
(select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where isnull(lijnnr,0) <= isnull(t1.lijnnr,0)) as lijntotaal,
(select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where isnull(lijnnr,0) <= isnull(t1.lijnNr,0) and isnull(billperiod_type,'') = '110-01' ) as lijntotaalKetting
FROM #tempDS_HistProjektUserVeldenViewBetalingen t1
WHERE isnull(fase,'') <> ''
ORDER BY t1.fase
DROP TABLE #tempDS_HistProjektUserVeldenViewBetalingen
END
GO
but that didn't solved my problem. Any other idea's ?
kind regards.
Kurt -
Error while checking in and storing
Dear All
I am trying to attaching a file using CV01n, when i am doing for check in - i am getting following error message
Error while checking in and storing
Message no. 26253
What may be the issues, even my my repositories working fine ( configured contentserver, status is active)
Regards
chandraDear Chandra,
please check in transaction OACT if the storage category is assigned to the correct content repository. Further please read also through notes 707568 and 833576.
Best regards,
Christoph -
Error while deploying a Java Stored Procedure using JDeveloper
Hi,
I was going thru the Oracle By Example article: "Developing SQL and PL/SQL with JDeveloper". (http://www.oracle.com/technology/obe/obe9051jdev/ide1012/plsqlobe/obeplsql.htm)
One of the items in this article is - "Creating and Deploying a Java Stored Procedure"
I was able to create a java class, compile it. Created a deployment profile. created a pl/sql wrapper. While trying to deploy the java stored procedure, I am getting the following error:
Invoking loadjava on connection 'hr_conn' with arguments:
-order -resolve -thin
errors : class package1/mypackage/JavaStoredProc
ORA-29521: referenced name java/lang/StringBuilder could not be found
The following operations failed
class package1/mypackage/JavaStoredProc: resolution
oracle.aurora.server.tools.loadjava.ToolsException: Failures occurred during processing
at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:863)
at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:116)
at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:46)
at oracle.jdevimpl.deploy.OracleDeployer.deploy(OracleDeployer.java:97)
at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:474)
at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:361)
at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:285)
at oracle.jdevimpl.deploy.StoredProcProfileDt$Action$1.run(StoredProcProfileDt.java:383)
#### Deployment incomplete. #### Oct 27, 2005 1:38:56 PM
Appreciate your help on this..I am using Jdeveloper 10.1.3 Early Access Version. JDK comes with it. I also have another JDK on my machine (JDK1.4.2_09)
Maybe you are looking for
-
Hi, I wanted to know the ABAP code structure.while coding we write the code in a sequence,I just wanted to have a layout for the same. Thanks.
-
Data interpreter for loading of DASYLAB data into DIADEM
Can NI deliver a data interpreter for loading DASYLAB data into DIADEM?
-
How to create a measure for COUNT and compare year-to-date/last year?
Hello expert, I have gone through the Oracle by example tutorial for creating the repository. However, I can't find out how to create a measure to display the COUNT (sequence ID). I tried the Aggregation function on the sequence ID on the Fact table
-
Seahorse keeps asking about password, even when ssh-key is used
Hi, I want easy access to my repos on bitbucket. I have set my id_rsa.pub in bitbucket preferences, but when I try take any action on repo I have to type password . First there is graphical popup menu to type password, when I cancel it I can type pas
-
What are SCMRWBS and SCMEMWCL for ?
Hello all, I'm now filling the installation parameter sheet of SCM(APO) system. This sheet has two paraemters whose content I'm not sure of. That is, software units SCMRWBS and SCMEMWCL. What are SCMRWBS and SCMEMWCL for ? Do we need to install them