PL/SQL error - help needed.
I have a item which gives me an error message when tring to open a page.
When field is null (back end) there is no problem but when I input any value I get this error.
ORA-06550: line 1, column 48: PLS-00201: identifier 'P9_CANC_BY' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
Any idea?
Thanks
I am using oracle back-end but not build-in apex therefore creating application in apex.oracle.com won't work (I guess, correct me if I am wrong).
Going back to the error message.
I have various items like that on form and this is the first one giving me this error. I even deleted it and recreated with different name. Another thing that I would like to point out is that my page contains more than 100 items. Is there a limit of how many items you can create on the page?
Regards
Robert
Similar Messages
-
Having trouble with SQLServer 2008 (not MySQL) and my database connection in Dreamweaver CS6. My document type is set as .asp using VBScript. I can list the table information but cannot use the insert wizard to add new records. I don't get any errors after creating the insert form, but no records get inserted. I'm not a VBScript expert, but do I have to manually write some code to insert records? How do I attach it to a button?
Thanks for the quick reply. I won't be back in the office for a few days, but I'll try to post it when I get back in. It's pretty much the code generated from the Dreamweaver Insert Record wizard. I see where the submit button is created and the value is set but the action on the form is set to MM_insert, so I don't see where the submit code is actually called.
Date: Wed, 3 Oct 2012 12:06:14 -0600
From: [email protected]
To: [email protected]
Subject: SQL Server2008 help needed
Re: SQL Server2008 help needed
created by bregent in Dreamweaver General - View the full discussion
This post should be moved to the app dev forum. Please post the code from your form and the insert script pages.
Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4746757#4746757
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4746757#4746757
To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4746757#4746757. In the Actions box on the right, click the Stop Email Notifications link.
Start a new discussion in Dreamweaver General by email or at Adobe Community
For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746. -
SQL Exception: General Error - Help Needed
Hi,
I am getting an error at QuerySales.executeUpdate() statement in the following code.
I never had this kind of problem with other examples using executeUpdate statement. I even checked with "addBatch" but got the same error. Please help me if you know anything.
Thanks,
Ravi
PreparedStatement QuerySales;
insertString= "insert into TestNoName values (?, ?)";
String query2 = "SELECT Number, Name FROM TestNoName";
Statement stmt;
try {
con = DriverManager.getConnection(url,"","");
System.out.println("Successfully Connected to Database");
stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
QuerySales = con.prepareStatement(insertString, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet rs2 = stmt.executeQuery(query2);
for (int i=0; i<=10; i++)
rs2.last();
int count = rs2.getRow();
System.out.println(count);
if (count == 0)
lNumber = 1;
else {
lNumber = rs2.getInt("Number");
lNumber++;
QuerySales.setInt(1,lNumber);
QuerySales.setString(2,"Ravi");
QuerySales.executeUpdate();
System.out.println("Hi");
System.out.println("Exececuted SQL Statement- Inserted One Record");
System.out.println("Fields of TestNoName");
int count1=0;
ResultSet rs3 = stmt.executeQuery(query2);
//rs2.beforeFirst();
while (rs3.next()) {
count1++;
int n = rs3.getInt("Number");
String Name1 = rs3.getString("Name");
System.out.println(n + " " + Name1);
System.out.println(count1);
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}I found the reason for error. I declared the result set object within the for loop. Now it is working fine.
Ravi -
Oracle 11G Install on Win 7 With PL/SQL Developer Help Needed
Today is my first day with Oracle. I have tried to Install Ora11g from our network drive.I think the installation went fine. I also installated PL/SQL Developer when i try to log in i got the following error see below.
PL/SQL Developer - (Not logged on)
Initialization error
SQL*Net not properly installed
OracleHomeKey: SOFTWARE\ORACLE
OracleHomeDir:
OK
After i did some research online i found this solution "go to Tools > Preferences > options set manually "Oracle Home" to the folder of ORACLE_HOME and "OCI Library" to the oci.dll file located in ORACLE_HOME/bin/oci.dll"
C:\app\user\product\11.2.0\client_1\bin.dll <=== I believe this is my Oracle_Home
C:\app\user\product\11.2.0\client_1\bin\oci.dll <==== Is my OCI Library.
When i apply thse 2 paths i get the following error.
Initialization error
COuld not load " C:\app\user\product\11.2.0\client_1\bin.dll
OCIDLL forced to C:\app\user\product\11.2.0\client_1\bin.dll
LoadLibrary(C:\app\user\product\11.2.0\client_1\bin\.dll)returned 0
Can someone help me with this ???????????????/Pl indicate which version of Win 7 - you will need Professional or higher - Home versions are not supported/certified, so things may or may not work as expected.
http://download.oracle.com/docs/cd/E11882_01/install.112/e16773/reqs.htm#CHDHGGFE
HTH
Srini -
Hi,
I normally get a csv having data as
column1 ;columnb;columnc;
13 ; 12 ; 13 ;
11 ;13 ;33;
as the table where it needs to go is say table
xys( a number, b number , c number).
so the control file is fairly simple ...
But from now I need to restrict data entry if the change in format happens in the csv
say if it is like
column2;column1;column3,
12,13;12;
11;13;14;
or say the csv like
column1;column2;column3;column4;
11;13;14;15;
111;134;14;12;
in both cases sql loader should not run and throw the error saying the reason in the log.
how do i manage it in the control file `???
any ideas???
regards
Message was edited by:
SHUBHHello,
do you only need to check the first line of the file if it contains a line like
column1;column2;column3 ?
If yes, maybe a small script like this could be a starting point:
You have to replace "column1;column2;column3" with the header information that's valid and instead of file1 in the CURRENTSTRING=... Line write the name of your input file.
I hope this helps. (But maybe some of the experts here knows a way to do the verification checks with SQLLDR, so maybe its worth to wait a little bit :)
#!/bin/ksh
VALIDSTRING="column1;column2;column3"
CURRENTSTRING=`head -n 1 file1`
if [[ $VALIDSTRING == $CURRENTSTRING ]]
then
echo "They match."
else
echo "They dont match."
fi
-- -
Hi All,
I am creating a report which is having 2 sql queries ,1 for the main columns that i need to show and 2 from total sum and count.
Report is something as given below
SET TAB OFF;
set linesize 1500;
set pagesize 50;
SET FEEDBACK OFF;
SET WRAP OFF
COLUMN today NEW_VALUE VAR1 NOPRINT;
TTITLE LEFT 'ABC Inc.' SKIP 1 -
LEFT 'Daily Report' SKIP 1 -
LEFT 'As Of ' VAR1 SKIP 2
BTITLE LEFT SKIP 'Page No : ' FORMAT 9999999999 SQL.PNO SKIP 3;
COL SR_NO HEADING 'Seq' FORMAT 999999;
COL REFNO HEADING 'Ref No' FORMAT A20;
COL ORIG_NAME HEADING ' Branch Name'
FORMAT A50;
SELECT ROWNUM SR_NO,
REF_NO REFNO,
ORIGIN_NAME BRNAME
FROM BANK
WHERE PASS_CD=101
SELECT ' Failure Count : '|| NVL(COUNT(DECODE(CODE,1,CODE,NULL)),0) ||
' Failure Total Amt : '|| NVL(SUM(DECODE(CODE,799,AMT,NULL)),0)
|| CHR(10) ||
' Successful Count : '|| NVL(COUNT(DECODE(CODE,000,CODE,NULL)),0) ||
' Successful Total Amt: '|| NVL(SUM(DECODE(CODE,000,AMT,NULL)),0)
FROM BANK;
CLEAR BREAKS;
CLEAR COLUMN;
TTITLE OFF;
When i am running this second query output is going to secong page and title is repeated again and same as 1rst page is showing page no-1
Kindly help me,i want the output on the same page at bottom.
Thanksi think its only work in ISQL* PLUS enivironment iam
not sure.It does work in SQL*Plus
is that i can use in the package??http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12048.htm -
How to optimize this SQL. Help needed.
Hi All,
Can you please help with this SQL:
SELECT /*+ INDEX(zl1 zipcode_lat1) */
zl2.zipcode as zipcode,l.location_id as location_id,
sqrt(POWER((69.1 * ((zl2.latitude*57.295779513082320876798154814105) - (zl1.latitude*57.295779513082320876798154814105))),2) + POWER((69.1 * ((zl2.longitude*57.295779513082320876798154814105) - (zl1.longitude*57.295779513082320876798154814105)) * cos((zl1.latitude*57.295779513082320876798154814105)/57.3)),2)) as distance
FROM location_atao l, zipcode_atao zl1, client c, zipcode_atao zl2
WHERE zl1.zipcode = l.zipcode
AND l.client_id = c.client_id
AND c.client_id = 306363
And l.appType = 'HOURLY'
and c.milessearchzipcode >= sqrt(POWER((69.1 * ((zl2.latitude*57.295779513082320876798154814105) - (zl1.latitude*57.295779513082320876798154814105))),2) + POWER((69.1 * ((zl2.longitude*57.295779513082320876798154814105) - (zl1.longitude*57.295779513082320876798154814105)) * cos((zl1.latitude*57.295779513082320876798154814105)/57.3)),2))
I tried to optimize it by adding country column in zipcode_atao table. So that we can limit the search in zipcode_atao table based on country.
Any other suggestions.
ThanksWelcome to the forum.
Please follow the instructions given in this thread:
How to post a SQL statement tuning request
HOW TO: Post a SQL statement tuning request - template posting
and add the nessecary details we need to your thread.
Depending on your database version (the result of: select * from v$version; ):
Have you tried running the query without the index-hint?
Are your table (and index) statatistics up-to-date? -
Error: ORA-12560 TNS : Protocol Error help need urgently
HI
i m working on win 2k adv server
i installed orcale 8i
and then i started sql plus
and entered us id and pass : scott / tiger
and also tried :system / manager
but i m having this error
plz tellme how can i solve it
Error: ORA-12560 TNS : Protocol Error
plz do it soon
Nurali
03002199037You're attempting to go across SQL*Net. I'm a unix guy so I can't help very much except to point this out.
On Unix I'd either undefine the TWO_TASK environmental variable. Probably a reg entry on 2k.
Or configure Sql*Net.
Ken -
AE CS4 Error Help Needed!!
Hey I get 3 errors everytime Ii run AE.
1- failed to create process default activation context
2- Microsoft C++ Runtime Library Runtime Error!! Error Code R6034 - An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team fow more information.
3- Microsoft C++ Runtime Library Runtime Error!! Error Code R6030 - CRT not initialized.
Please Need Help!!83 :: xx are all resource errors, many times related to fonts as listed on my site. The logical conclusion therefore is that you have changed something outside AE, that is added a rubbish font or updated an external component like Quicktime. Still, as the others said, it's miraculous AE runs/ ran at al lon your system and you were actually able to use it.
Mylenium -
I've worked through the Adobe tutorial, "Developing a web
application with
Dreamweaver"
http://www.adobe.com/devnet/dreamweaver/articles/develop_web_application.html).
Everything works fine until I get to the final step of
testing the Record
Insert form be submitting data. When I click the Insert
record button
instead of going to the View page I get these errors for each
form field:
Warning: mysql_real_escape_string()
[function.mysql-real-escape-string]:
Access denied for user 'ODBC'@'localhost' (using password:
NO) in
F:\Webs\cafe_php\TMPh4f4n13a5b.php on line 8
Warning: mysql_real_escape_string()
[function.mysql-real-escape-string]: A
link to the server could not be established in
F:\Webs\cafe_php\TMPh4f4n13a5b.php on line 8
The warnings appear on the form page above the page itself.
When I connected the database to the site the test worked.
Here are the first 8 lines of code:
<?php require_once('Connections/connTownsend.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "",
$theNotDefinedValue = "")
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
: $theValue;
$theValue = function_exists("mysql_real_escape_string") ?
mysql_real_escape_string($theValue) :
mysql_escape_string($theValue);
Any suggestions?
WaltFirst, thanks for helping.
2nd, sorry to be so thick, this is all still Greek to me, but
I have no idea
where to insert
with a die($rsInsert_query):
Here is all the PHP code above the DOCTYPE:
<?php require_once('Connections/connTownsend.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "",
$theNotDefinedValue = "")
$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;
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" .
htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_insert"])) &&
($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO comments (FIRST_NAME,
LAST_NAME) VALUES
(%s, %s)",
GetSQLValueString($_POST['FIRST_NAME'], "text"),
GetSQLValueString($_POST['LAST_NAME'], "text"));
mysql_select_db($database_connTownsend, $connTownsend);
$Result1 = mysql_query($insertSQL, $connTownsend) or
die(mysql_error());
?>
Walt
"Murray *ACE*" <[email protected]> wrote
in message
news:[email protected]...
> Walt - this is a good puzzle.
>
> All of your observations suggest that you have adequate
permissions, yet,
> this error says you don't -
>
>> Warning: mysql_real_escape_string()
[function.mysql-real-escape-string]:
>> A link to the server could not be established in
>> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
>
> Let's take a look at your insert command - can you trap
the insert process
> with a die($rsInsert_query) command, right before the
actually execution?
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
>
http://www.dreamweavermx-templates.com
- Template Triage!
>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
> ==================
>
>
> "Walt F. Schaefer" <[email protected]> wrote
in message
> news:[email protected]...
>> Murray,
>>
>> Here's an Update/Summary:
>>
>> 1. I have a MySQL database (localhost) I can see and
manipulate via
>> Navicat
>> 2. In my site (in DW) I created a connection to that
database. It tested
>> successfully.
>> 3. I created a recordset using that database. It
tested successfully.
>> 4. On a new page Insert > Application Objects
> Insert Record > Record
>> Insertion Form Wizard.
>> 5. Save page and preview locally in IE6.
>> 6. Input info in form and click Insert record.
>> 7. Record IS added to table but every field is Null.
>> 8. Errors for each form field:
>> Warning: mysql_real_escape_string()
[function.mysql-real-escape-string]:
>> Access denied for user 'ODBC'@'localhost' (using
password: NO) in
>> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
>>
>> Warning: mysql_real_escape_string()
[function.mysql-real-escape-string]:
>> A link to the server could not be established in
>> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
>>
>> As I can read from the database/table and the Insert
record form DOES ADD
>> a record it would seem I am connected to the db just
unable to add data.
>>
>> What have I done wrong?
>>
>> Thanks.
>> --
>>
>> Walt
>>
>>
>> "Murray *ACE*"
<[email protected]> wrote in message
>> news:[email protected]...
>>> OK - I think we will have to solve your database
connectivity issues
>>> first. What does your Connections file look
like?
>>>
>>> --
>>> Murray --- ICQ 71997575
>>> Adobe Community Expert
>>> (If you *MUST* email me, don't LAUGH when you do
so!)
>>> ==================
>>>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>>>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>>> ==================
>>>
>>>
>>> "Walt F. Schaefer" <[email protected]>
wrote in message
>>> news:[email protected]...
>>>>> LOL - you are interpreting my code MUCH
too literally. Change this -
>>>> It's only because I don't have a clue. Hence
the need to use this
>>>> beginner's tutorial.
>>>>
>>>> I replaced to code as instructed. No
improvement. Error messages:
>>>>
>>>> Warning: mysql_real_escape_string()
>>>> [function.mysql-real-escape-string]: Access
denied for user
>>>> 'ODBC'@'localhost' (using password: NO) in
>>>> F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
>>>>
>>>> Warning: mysql_real_escape_string()
>>>> [function.mysql-real-escape-string]: A link
to the server could not be
>>>> established in
F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
>>>>
>>>> Warning: mysql_real_escape_string()
>>>> [function.mysql-real-escape-string]: Access
denied for user
>>>> 'ODBC'@'localhost' (using password: NO) in
>>>> F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
>>>>
>>>> Warning: mysql_real_escape_string()
>>>> [function.mysql-real-escape-string]: A link
to the server could not be
>>>> established in
F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
>>>> INSERT INTO comments (FIRST_NAME, LAST_NAME)
VALUES (NULL, NULL)
>>>> --
>>>>
>>>> Walt
>>>>
>>>>
>>>> "Murray *ACE*"
<[email protected]> wrote in message
>>>> news:[email protected]...
>>>>> LOL - you are interpreting my code MUCH
too literally. Change this -
>>>>>
>>>>> $insertSQL = sprintf("INSERT INTO
comments (FIRST_NAME, LAST_NAME)
>>>>> VALUES
>>>>> (%s, %s)",
>>>>> GetSQLValueString($_POST['FIRST_NAME'],
"text"),
>>>>> GetSQLValueString($_POST['LAST_NAME'],
"text"));
>>>>> $insert_rsEmails = sprintf("INSERT INTO
tblcontactdata SET emailValue
>>>>> =
>>>>> %s", GetSQLValueString($filter_rsEmails,
"text"));
>>>>> die($insert_rsEmails);
>>>>> $rsEmails =
mysql_query($insert_rsEmails, $selectData) or
>>>>> die(mysql_error()); // insert this email
into the database
>>>>>
>>>>> mysql_select_db($database_connTownsend,
$connTownsend);
>>>>>
>>>>> to this -
>>>>>
>>>>> $insertSQL = sprintf("INSERT INTO
comments (FIRST_NAME, LAST_NAME)
>>>>> VALUES
>>>>> (%s, %s)",
>>>>> GetSQLValueString($_POST['FIRST_NAME'],
"text"),
>>>>> GetSQLValueString($_POST['LAST_NAME'],
"text"));
>>>>> die($insertSQL);
>>>>>
>>>>> mysql_select_db($database_connTownsend,
$connTownsend);
>>>>>
>>>>>
>>>>> --
>>>>> Murray --- ICQ 71997575
>>>>> Adobe Community Expert
>>>>> (If you *MUST* email me, don't LAUGH
when you do so!)
>>>>> ==================
>>>>>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>>>>>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>>>>> ==================
>>>>>
>>>>>
>>>>> "Walt F. Schaefer"
<[email protected]> wrote in message
>>>>>
news:[email protected]...
>>>>>> Murray,
>>>>>>
>>>>>> Here's all the PHP code that
precedes the DOCTYPE *after* inserting
>>>>>> the code you provided:
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
> -
Eclipse error | Help needed badly
Hi,
My Eclipse was working properly a couple of days back but suddenly It's stopped working and gives me an error : "workspace does not contain a main type,Do you have a public void run method"
Now,I think the problem Is some how the jar's that I'm trying to upload aren't getting uploaded.
I say this because a strange problem has arised and I think this might have to do with Eclipse giving the above error.
This Is what I do to create a new java project
-Open eclipse
-save files to workspace
-click on new > java project
-Then,give the project a name and then click finish
-after that I create a new class by right clicking on the project folder > new > class >give the class a name and then click finish.
-after that I open workspace(thats on my desktop) click on the project folder make a new folder name It "lib" and upload the jar that I need for the project.
-after this I go back Into eclipse and right click on the project folder and hit refresh,now I see the folder"lib" containing the jar Inside It.
-I right click on the jar file and select "add to build path",and now theres the Issue comes In.
I want the jar to Into the reference librarys,because the last time I got the jar In the reference library It worked.
But this time I can't even manage to find where the reference library Is.
so when I click on add to build path the jar Instead of appearing in the reference library (which Isn't there) just dissapears.
I really need to fix this,because I cant test and write code until Its fixed.
heres a snapshot of how my eclipse framework looks : [http://www.flickr.com/photos/38561743@N03/4122304046/sizes/o/]
I tried to solve this on my own for hours and hours but It just Isn't working.
please guys help,I need to solve this.
Thanks,
Edited by: Parastar on Nov 21, 2009 7:26 AM
Edited by: Parastar on Nov 21, 2009 7:27 AMParastar wrote:
okay guys,I'v tried the eclipse forums for about 24 hours now.
but no response,those guys are really really slow.
please,some one here help me out.Quit begging. You've already been told this is not the place for this question. You're complaining about not getting an answer there, and begging people here to answer, as if that vindicates your decision to post here in the first place. But you haven't gotten your solution here either. Which is worse--no answer there, or a bunch of answers that don't help you here? -
Hi I am trying to check the conflict resolution on my active-active bi-directional OGG, when i am trying to set the parameters in replicat file i am getting this error:
2011-08-17 18:09:59 GGS ERROR 182 OCI Error describe for query lookup (bad syntax) (status = 911-ORA-00911: invalid character), SQL<select count(*) conflict from TEST where t_id = ? and t_timestamp > ?>.
My replicate file for that table:
MAP TEST_MODEL.TEST, TARGET TEST_MODEL.TEST, &
REPERROR (21000, DISCARD), &
SQLEXEC (ID lookup, ON UPDATE, &
QUERY "select count(*) conflict from TEST where t_id = ? and &
t_timestamp > ?", &
PARAMS (p1 = t_id, p2 = t_timestamp), BEFOREFILTER, ERROR REPORT, &
TRACE ALL),&
FILTER (lookup.conflict = 0, ON UPDATE, RAISEERROR 21000);
MAP TEST_MODEL.TEST #exception_handler()
Gurus can anybody tell me what could be the error? I have used it according to the documentation;
Oracle admin guide, Page 97
Thanks in advanceYes it is working fine steven, thanks
But my question is, if you remember or not, i want to use same strategy for conflict resolution in active-active bi-directional OGG setup which are on two different time zone
Datacenter(DC) 1 on PST & DC2 on EST, is there any ways i can change this query to match the records? i mean
DC1(PST) ----> "using this in replicat parameter from target to source, i mean data coming from EST to PST"
MAP resolved (entry ISAAC_MODEL_BEA2.ECODBPARAM):
MAP ISAAC_MODEL_BEA2.ECODBPARAM, TARGET ISAAC_MODEL_BEA2.ECODBPARAM, REPERROR (21000, DISCARD), SQLEXEC (ID lookup, ON UPDA
TE, QUERY "select count(*) conflict from ISAAC_MODEL_BEA2.ECODBPARAM where id = :p1 and lastmodifieddate-180/1440 > :p2", PAR
AMS (p1 = id, p2 = lastmodifieddate), BEFOREFILTER, ERROR REPORT, TRACE ALL),FILTER (lookup.conflict = 0, ON UPDATE, RAISEERR
OR 21000)
DC2(EST) ----> "using this in replicat parameter from source to target, i mean data coming from PST to EST"
MAP resolved (entry ISAAC_MODEL_BEA2.ECODBPARAM):
MAP ISAAC_MODEL_BEA2.ECODBPARAM, TARGET ISAAC_MODEL_BEA2.ECODBPARAM, REPERROR (21000, DISCARD), SQLEXEC (ID lookup, ON UPDA
TE, QUERY "select count(*) conflict from ISAAC_MODEL_BEA2.ECODBPARAM where id = :p1 and lastmodifieddate+180/1440 > :p2", PAR
AMS (p1 = id, p2 = lastmodifieddate), BEFOREFILTER, ERROR REPORT, TRACE ALL),FILTER (lookup.conflict = 0, ON UPDATE, RAISEERR
OR 21000);
by adding 3hr's to the comparision function and do the conflict resolve?
Please do comment on this. Thanks a lot for your help. -
UploadedFile component - af:inputFile to upload blob Errors - help needed
Hi,
I am working with JDev, Toplink, and ADF Faces. I am using the af:inputFile component to read in a pdf file which I want to save as a blob into my oracle DB.
This is the code on the jspx page:
<af:inputFile label="Label 1"
binding="#{backing_app_ATBlobs1.inputFile1}"
valueChangeListener="#{backing_app_ATBlobs1.fileUploaded}"
id="inputFile1" columns="40"/>
<af:commandButton text="commandButton 1"
binding="#{backing_app_ATBlobs1.commandButton1}"
id="commandButton1"/>
The following is my code in the backing bean:
public void fileUploaded(ValueChangeEvent event) {
UploadedFile file = (UploadedFile)event.getNewValue();
if (file != null && file.getLength() > 0) {
FacesContext context = FacesContext.getCurrentInstance();
FacesMessage message =
new FacesMessage(JSFUtils.getStringFromBundle("srmain.srfileupload.success") +
" " + file.getFilename() + " (" +
file.getLength() + " bytes)");
context.addMessage(event.getComponent().getClientId(context),
message);
FileInputStream fis;
fis = null;
try {
fis = new FileInputStream((File)file);
catch (FileNotFoundException ex)
System.out.println("f2: Oops, FileNotFoundException caught");
finally
System.out.println("f2: finally block");
PreparedStatement pstmt =
cm.getCon().prepareStatement("INSERT INTO BLOBS (BLOB_ID, PROCUR_ID, PF_NUM, DOCUMEN, FILENAME_TXT) " +
"VALUES ('" + BLOB_SEQUENCE.NEXTVAL + ",1, 2, ?, " + file.getFilename() + ")");
pstmt.setBinaryStream(1, fis, (int)file.length());
pstmt.executeUpdate();
Following are the errors:
Name cm Not Found
Method getCon Not Found
Method prepareStatement Not Found
Method length() Not Found
Name BLOB_SEQUENCE.NEXTVAL Not Found, BLOB_ID is sequentially generated.
Exception Not handled: java.sql.SQLException for these lines:
pstmt.setBinaryStream(1, fis, (int)file.length());
pstmt.executeUpdate();
I am not very sure about coding the values for the insert statement. Any help would be appreciated. Thanks!
LinHi,
I got some of the errors taken care of, but I have some questions.
Below is my code:
public void fileUploaded(ValueChangeEvent event) {
// Add event code here...
UploadedFile file = (UploadedFile) event.getNewValue();
if (file != null)
FacesContext context = FacesContext.getCurrentInstance();
FacesMessage message = new FacesMessage( "Successfully uploaded file " + file.getFilename() + " (" + file.getLength() + " bytes)");
context.addMessage(event.getComponent().getClientId(context), message);
// Here's where we could call file.getInputStream()
InputStream fis;
fis = null;
try {
fis = file.getInputStream();
catch (FileNotFoundException ex)
System.out.println("FileNotFoundException caught");
} catch (IOException e) {
// TODO
System.out.println("IOException caught");
finally
System.out.println("finally block");
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
catch (ClassNotFoundException ex) {
System.out.println("ClassNotFoundException caught");
// DriverManager.registerDriver(new OracleDriver());
try {
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@oradev2.tceq.state.tx.us:1521:sand3", "kding", "kd5469");
PreparedStatement pstmt =
conn.prepareStatement("INSERT INTO BLOBS (BLOB_ID, PROCUR_ID, PF_NUM, DOCUMEN, FILENAME_TXT) " +
"VALUES (?,?,?,?,?)");
int blob_id;
blob_id = BLOB_SEQUENCE.NEXTVAL;
String filename = file.getFilename();
pstmt.setInt(1, blob_id);
pstmt.setString(2, "1");
pstmt.setString(3, "2");
pstmt.setBinaryStream(4, fis, (int)file.getLength());
pstmt.setString(5, filename);
pstmt.executeUpdate();
catch (SQLException e) {
// TODO
System.out.println("SQLException caught");
I am unable to get the value for the blob_id which is sequentially generated. The error is in this line:
blob_id = BLOB_SEQUENCE.NEXTVAL;
Another question:
Can someone tell me how to display variable in JDeveloper. I tried System.out.println - but I think this is for command line printing?
Thanks for the assistance.
Lin -
SQL problem - help needed ASAP!!
Hey guys,
Doing a college project... would really appreciate some help. I am trying to use a variable in the where clause of a select cursor in PL/SQL. The code is this:
procedure results(p_search_entry varchar2, p_search_field varchar2) is
cursor c_results is
select * from physics_b where p_search_field = p_search_entry;
begin
for cv_results in c_results
loop
-- loop through actions
end loop;
The problem is that I don't know how to get the where clause to accept the variable passed into the procedure as the field name. Does anyone know the syntax for this?
Thanks very much!
NiallThis isn't the correct forum for this kind of question. The SQL and PL/SQL forum PL/SQL is probably best.
That said, you can't do what you want that way.
You can do
procedure results (p_search_entry in varchar2)
cursor c_result is
select * fro physics_b where subject=p_search_entry;(assuming subject is a column in physics_b)
You can't use a variable to represent a column directly. You need to build the statement as a string and then use execute immediate.
statement:='select * fro physics_b where '||p_search_field||' = :1';
-- this bit is probably bad syntax.
execute immediate statement using p_search_entry;Look up execute immediate and bind variables -
Guys,
Help me understand the syntax please!! With PL/SQL I have achieved a task quite easily, with a branch of code to include or exclude some part of the query - no problem. But to use SQL ......
If i have a variable on a page, say :p10_open_or_closed
.. and I set the value of this to the text "Is Not Null"
How can I incorporate this into an SQL query, say
Select ID, Date1, Date2, Comment
From Table1
where Date1 Is Not Null
Is there a way of substituting the ":p10_open_or_closed" variable into this query?
ie
Select ID, Date1, Date2, Comment
From Table1
where Date1 ":p10_open_or_closed"
Thanks.Thanks for your help gents.
Originally, I had a PL/SQL Statement constructing the code as needed, as Rekha
suggested.
if :P1_OPEN_OR_CLOSED = 1 then
q:=q||' and ';
q:=q||' p.ACTUAL_INSTALL_DATE is null ';
end if;
if :P1_OPEN_OR_CLOSED = 2 then
q:=q||' and ';
q:=q||' p.ACTUAL_INSTALL_DATE is not null ';
end if;
But, to use a Tabular form, where users can update fields of multiple records on screen then submit for a MRU, the option of PL/SQL code is not allowed, only SQL. So Phil UK, no it's not an elegant way of doing things, but I'm forced to use SQL, yeah?
There are definitely ways that I can filter for the solution I am after, but they all involve more in depth solutions (that are not that great). Thus, I asked at this forum.
Andy, your solution works :~) which makes me very happy. I'm not sure how just now but I'll learn from it.
Thanks again.
Maybe you are looking for
-
Does anyone know how to reset a system password for a Macbook?
-
hi i have an ipod 4g 8gb, with 4.2.1 firmware and i wanted to update to 4.3 firmware not ios 5.1.1 because i've read in a lot of forums that it peope who upgraded to ios5 made their ipods 4g really slow. and im really worried with a limited memory su
-
I am new to ABAP development I have 3 table, A905, A919 and KONP. Knumh field - condition record is common in both A905 and A919. common fields in A905 and A919 is VKORG, VTWEG , KSCHL, KSCHL, REGIO . From A919 AUART_sd to be be displayed in the rep
-
How to identify various objects used in code
Hi All, Can anyone tell me how can I list down various objects used in a program. For example in a report program if I am calling a function module, calling an include program, implementing a class and so on. Now I want to list down the objects used
-
How to plot 3D spectrogra​m using usrp2920 spectrum sensing output
hi, i'm woring on Real-time spectrum sensing using usrp with labview. i would like to know how to plot the usrp baseband spectral info as a 3D spectrogram over the time interval of sensing.