Again and again : CLOB,SQLJ and JDEV 2.0 (BUG!!!)

It's the same message than before but with more informations for
jdev. Team
I use this version of ORACLE (Evaluation version):
Oracle8 Enterprise Edition Release 8.0.5.0.0 - Production
PL/SQL Release 8.0.5.0.0 - Production
CORE Version 4.0.5.0.0 - Production
TNS for 32-bit Windows: Version 8.0.5.0.0 - Production
NLSRTL Version 3.3.2.0.0 - Production
I'm beginning to develop this project with JDeveloper 1.1
(Evaluation version) and now, i continue this project with jdev
2.0 Beta.
With Jdev. 1.1 , I can compile "with Warning" and when i launch
It, It's the Crach. (It's an Datatype message Error)
With Jdev 2.0 Beta, I cannot compile.
After reading the ORACLE DOCUMENTATION about using of CLOB in a
SQLJ file, i try this:
package Pack_ConnexionOracle;
import sqlj.runtime.*;
import sqlj.runtime.ref.*;
import java.sql.*;
// Importing the Oracle Jdbc driver package makes the code more
readable
import oracle.jdbc.driver.*;
public class OraCrit
public OraCrit(String Surl,String Susr,String Spwd)
try
DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
DefaultContext.setDefaultContext(new DefaultContext
(Surl,Susr,Spwd));
catch(Exception ex)
ex.printStackTrace();
public String SQLRecupRequeteSQL(int iNumQuery) throws
SQLException
long lLongSQL;
OracleClob ORARequeteSQL;
String sRequeteSQL = new String();
#sql { select requete_sql into :ORARequeteSQL from requete where
num_query=:iNumQuery };
#sql lLongSQL={values(dbms_lob.getlength(:ORARequeteSQL)) };
#sql { call dbms_lob.read
(:ORARequeteSQL,:lLongSQL,0,:sRequeteSQL) };
return(sRequeteSQL);
at the line 61:
#sql { select requete_sql into :ORARequeteSQL from requete where
num_query=:iNumQuery };
I have this compilation error:
Error:(61) Liste of links Variables INTO...Prohibited: illegal
expression
at the line 62:
#sql lLongSQL={values(dbms_lob.getlength(:ORARequeteSQL)) };
I have this compilation error:
Error:(62) The Java type doesn't exist for the host element n 1..
at the line 63:
#sql { call dbms_lob.read
(:ORARequeteSQL,:lLongSQL,0,:sRequeteSQL) };
Same message than at line 62.
Is it possible to use a CLOB in SQLJ with JDeveloper 2.0 Beta?
HELP ME PLEASE,
Thanks a lot.............
null

David,
I think the problem is that the code you have written is for the
8.0.5 JDBC driver (the default driver for JDev 1.1). By default,
JDeveloper 2.0 uses the 8.1.4 JDBC driver and there are some
syntax/API changes for LOB support between 8.0.5 and 8.1 (namely
that OracleClob is replaced by oracle.sql.CLOB).
Also, while you can still use the DBMS_LOB package, there are new
methods provided in the oracle.sql package that allow more direct
access to LOBs.
You have two options:
1. switch your driver to use JDBC 8.0.5
2. switch your code to use the new 8.1 JDBC APIs
1. Switch your driver version:
a. For the project you are workin on, select Project->Project
Properties from the menu
b. Look in the Java Libraries list box. You want to see Oracle
8.0.5 JDBC listed BEFORE Oracle 8.1.4 JDBC AND Oracle EJB. I
don't have immediate access to Jdev right now, so I'm not
positive what the libraries were called.
If Oracle JDBC 8.0.5 is not listed at all, click the Add button,
select the Oracle JDBC 8.0.5 library and add it to the list, then
select it and drag it up so it is above the other two I
mentioned.
c. Exit from JDeveloper and edit the jdeveloper.ini file in your
<JDEV_HOME>/bin directory. Make sure
..\jdbc\lib\oci8\classes111.zip appears in the IDE_CLASSPATH
setting before ..\aurora\lib\classes111.zip (8.1.4 JDBC).
2. Switch your code to use the new 8.1 JDBC APIs
a. you will need to import oracle.sql.*
b. change 'OracleClob' to 'CLOB'
c. to read from the CLOB locator (you can still use DBMS_LOB, but
there are new methods as well):
char stream:
//Read CLOB data into Reader char stream
Reader char_stream = the_clob.getCharacterStream();
char [] char_array = new char[10];
int chars_read = char_stream.read (char_array, 0, 10);
//Read CLOB data into Input ASCII character stream
Inputstream asciiChar_stream = the_clob.getAsciiStream();
byte[] asciiChar_array = new byte[10];
int asciiChar_read =
asciiChar_stream.read(asciiChar_array,0,10);
The above examples are from the JDBC 8.1.5 User's Guide and
Reference.
Here is one from the 8.1.5 SQLJ doc:
void readFromClob (CLOB clob) throws SQLException
long clobLen, readLen;
String chunk;
clobLen = clob.length();
for (long i = 0; i< clobLen; i+= readLen) {
chunk = clob.getSubString(i,10);
readLen = chunk.length();
System.out.println("Read " + readLen + " chars: " + chunk);
-L
David DUPONT (guest) wrote:
: It's the same message than before but with more informations
for
: jdev. Team
: I use this version of ORACLE (Evaluation version):
: Oracle8 Enterprise Edition Release 8.0.5.0.0 - Production
: PL/SQL Release 8.0.5.0.0 - Production
: CORE Version 4.0.5.0.0 - Production
: TNS for 32-bit Windows: Version 8.0.5.0.0 - Production
: NLSRTL Version 3.3.2.0.0 - Production
: I'm beginning to develop this project with JDeveloper 1.1
: (Evaluation version) and now, i continue this project with jdev
: 2.0 Beta.
: With Jdev. 1.1 , I can compile "with Warning" and when i
launch
: It, It's the Crach. (It's an Datatype message Error)
: With Jdev 2.0 Beta, I cannot compile.
: After reading the ORACLE DOCUMENTATION about using of CLOB in a
: SQLJ file, i try this:
: package Pack_ConnexionOracle;
: import sqlj.runtime.*;
: import sqlj.runtime.ref.*;
: import java.sql.*;
: // Importing the Oracle Jdbc driver package makes the code more
: readable
: import oracle.jdbc.driver.*;
: public class OraCrit
: public OraCrit(String Surl,String Susr,String Spwd)
: try
: DriverManager.registerDriver(new
: oracle.jdbc.driver.OracleDriver());
: DefaultContext.setDefaultContext(new DefaultContext
: (Surl,Susr,Spwd));
: catch(Exception ex)
: ex.printStackTrace();
: public String SQLRecupRequeteSQL(int iNumQuery) throws
: SQLException
: long lLongSQL;
: OracleClob ORARequeteSQL;
: String sRequeteSQL = new String();
: #sql { select requete_sql into :ORARequeteSQL from requete
where
: num_query=:iNumQuery };
: #sql lLongSQL={values(dbms_lob.getlength(:ORARequeteSQL)) };
: #sql { call dbms_lob.read
: (:ORARequeteSQL,:lLongSQL,0,:sRequeteSQL) };
: return(sRequeteSQL);
: at the line 61:
: #sql { select requete_sql into :ORARequeteSQL from requete
where
: num_query=:iNumQuery };
: I have this compilation error:
: Error:(61) Liste of links Variables INTO...Prohibited: illegal
: expression
: at the line 62:
: #sql lLongSQL={values(dbms_lob.getlength(:ORARequeteSQL)) };
: I have this compilation error:
: Error:(62) The Java type doesn't exist for the host element n
1..
: at the line 63:
: #sql { call dbms_lob.read
: (:ORARequeteSQL,:lLongSQL,0,:sRequeteSQL) };
: Same message than at line 62.
: Is it possible to use a CLOB in SQLJ with JDeveloper 2.0 Beta?
: HELP ME PLEASE,
: Thanks a lot.............
null

Similar Messages

  • ViewObject LOV query is executing again and again..

    Hi Experts,
    Currently in my application VO has one LOV component
    DeparmentVO - countryID (LOV) pointing to the CountryVO
    Where CountryVO is a query based and it depends on the user session language "Select countryID, country from Counties where language=:language
    Now application works fine, however whenever the user launched the page the countryVO query is executed again and again and it is not cached. In the DeparmentVO view accessor the is there any way we can specify the CountryVO to be taken fro cache? Or is there any configuration that we need to do inorder to run the country query only once per session?
    Looking forward you advice on this.
    Thanks

    Hi Timo,
    Our jdev version is 11.1.2.1
    We have the page which shows the department table each record has the country LOV.
    After the login the user can view the page at that time the query is executed, after that he may visit some other page and then come back to the same page then again it is executed. The CountryVO list is based on the language so it needs to be load only once per session in my case to optimize the performance.
    Thanks

  • When i login on game center it say enter your birth date when i enter it and i perss next the birth day will come again and again what should do

    when i login on game center it say enter your birth date when i enter it and i perss next the birth day will come again and again what should do

    Start a game with Game Center and go from there.

  • 15" i7 Macbook Pro from early 2011.takes the mac laptop two or three tries to boot successfully. It would turn on, show gray screen, shut down, turn on again, show gray screen, shutdown, and then turn on, show gray screen, before it can finally get

    Hello All,
    I have a 15" i7 Macbook Pro from early 2011. The past few weeks, it has been getting increasingly difficult to get on my computer. It takes the mac laptop two or three tries to boot successfully. It would turn on, show gray screen, shut down, turn on again, show gray screen, shutdown, and then turn on, show gray screen, before it can finally get to the dark gray log-in screen. Even when I finally get logged in to start working, thinking it would be okay now, it shuts down randomly.
    I've ruled out the possibility of a software problem because I've just done a clean re-install of Mac OS X Mavericks on my computer just yesterday.
    I did upgrade the RAM recently, about a month and a half ago, from 4GB to 16GB, I went to the apple store four days after that upgrade to have them do a hardware test, and clean the inside of my laptop, which helped with previous heat issues. When they did the hardware test, the hardware was all registered as fine from their system.
    I've tried resetting the SMC, PRAM, and doing the internet recovery hardware test, but to no avail. I thought I could at least find out what parts needed to be replaced from the hardware test but it seems that when the hardware test is almost finished, the computer just shuts down, So I am unable to see the results.
    My computer is also having battery issues, under battery condition, it says "replace now," parts have been ordered, waiting for arrival. But if the battery health is low, it should still boot up fine, it would just hold a significantly less charge.
    Could this be a hard drive issue?
    Has anyone had similar symptoms and how was it resolved?
    Does anyone know what I can do to alleviate this issue?
    I haven't had time to take it to Apple because I'm currently taking a 21 credit semester academically. I'm an art and design student so my computer is basically the bane of my existence. Help! Any constructive advice is welcomed!
    Thank you so much for your input!
    -Christina C.

    Problem description:
    The Hard Disk is failing.
    EtreCheck version: 2.0.11 (98)
    Report generated November 4, 2014 at 7:59:28 AM EST
    Hardware Information: ℹ️
      MacBook Pro (15-inch, Early 2011) (Verified)
      MacBook Pro - model: MacBookPro8,2
      1 2.2 GHz Intel Core i7 CPU: 4-core
      16 GB RAM Upgradeable
      BANK 0/DIMM0
      8 GB DDR3 1600 MHz ok
      BANK 1/DIMM0
      8 GB DDR3 1600 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 3000 - VRAM: 512 MB
      Color LCD 1440 x 900
      AMD Radeon HD 6750M - VRAM: 1024 MB
    System Software: ℹ️
      OS X 10.9.5 (13F34) - Uptime: 0:3:43
    Disk Information: ℹ️
      TOSHIBA MK7559GSXF disk0 : (750.16 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      HDV4 (disk0s2) /  [Startup]: 749.30 GB (712.10 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      MATSHITADVD-R   UJ-898 
    USB Information: ℹ️
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Inc. BRCM2070 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Kernel Extensions: ℹ️
      /Library/Application Support/Avast/components/fileshield/unsigned
      [loaded] com.avast.AvastFileShield (2.1.0 - SDK 10.9) Support
      /Library/Application Support/Avast/components/proxy/unsigned
      [loaded] com.avast.PacketForwarder (1.4 - SDK 10.9) Support
    Launch Agents: ℹ️
      [not loaded] com.adobe.AAM.Updater-1.0.plist Support
      [loaded] com.avast.userinit.plist Support
    Launch Daemons: ℹ️
      [invalid?] com.adobe.SwitchBoard.plist Support
      [loaded] com.avast.init.plist Support
      [loaded] com.avast.uninstall.plist Support
      [loaded] com.avast.update.plist Support
      [invalid?] com.perion.searchprotectd.plist Support
    User Launch Agents: ℹ️
      [invalid?] com.avast.home.userinit.plist Support
      [loaded] com.google.keystone.agent.plist Support
      [invalid?] com.jdibackup.ZipCloud.autostart.plist Support
    User Login Items: ℹ️
      None
    Internet Plug-ins: ℹ️
      AdobePDFViewer: Version: 10.1.1 Support
      QuickTime Plugin: Version: 7.7.3
      JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Check version
      Default Browser: Version: 537 - SDK 10.9
    User Internet Plug-ins: ℹ️
      TroviNPAPIPlugin: Version: 1.0 - SDK 10.9 Support
      Google Earth Web Plug-in: Version: Unknown
    Safari Extensions: ℹ️
      Avast Online Security
      Trovi Search for Safari
    3rd Party Preference Panes: ℹ️
      None
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          16% mds
          7% WindowServer
          1% loginwindow
          1% fontd
          1% com.avast.daemon
    Top Processes by Memory: ℹ️
      120 MB com.avast.daemon
      86 MB Google Chrome
      52 MB Finder
      52 MB WindowServer
      41 MB Google Chrome Helper
    Virtual Memory Information: ℹ️
      13.45 GB Free RAM
      1.34 GB Active RAM
      944 MB Inactive RAM
      1.43 GB Wired RAM
      1.11 GB Page-ins
      0 B Page-outs

  • Io6 update deleted my mobileme account and all my emails and won't let me add it again. Does anyone know if there is a way?

    I updated my iPhone 3GS with the new IO6 update last night and when it rebooted, my mobileme email account had been deleted along with all of my emails. I am unable to add the account again despite copying the settings on my ipad. There must be a way to get it back? I hope? Does anyone have any ideas?
    I am using incoming mail server: mail.me.com  this seems to be the problem as it will send emails using the smtp.me.com server.
    I have also tried imap.mail.me.com, and smtp.me.com and mail.icloud.com and smtp.me.com Nothing seems to work but it could be something simple I've overlooked? Help would be much appreciated... any method of getting the emails to my iPhone would be fine by me.

    Mobile Me was turned off months ago.

  • My new ipod touch 4g doesn't let me download apps, it just says type in Apple ID password and when i do it asks for it again and again and again....

    My new ipod touch 4g doesn't let me download apps, it just says type in Apple ID password and when i do it asks for it again and again and again.... what should i do?

    I've got the same problem as well. When i connect all i see is "set up your iphone" screen. It worked perfectly fine a couple of weeks back when I last synced but, doesn't sycn anymore.
    Any help would be appreciated.

  • My appstore wont let me download anything. It says i have to agree to the terms and i agree and again it pop up the same thing over and over! Please help me

    My appstore wont let me download anything. It says i have to agree to the terms and i agree and again it pop up the same thing over and over! Please help me

    I thought i was the only one!! but its happening on my ipad! and i dont even want to try on my iphone uhhh its annoying!

  • Itunes keeps asking for me to authorize purchased songs again and again

    I placed all my songs on an external harddrive. Then I got a new computer. I am now using a Vista machine with an Intel Dual Processor. I placed the songs on a new internal harddrive using SATA. I reinstalled Itunes, etc. Now, whenever I ask for a song purchased from Itunes to play, it says that the machine is not authorized to play the song. So I put in my password and a prompt comes up indicating that my machine is now authorized to play the song. I push okay. The song does not play. If I push the play button, a new prompt comes up saying agin that my machine is not authorized to play the song. I then put in the password and a new prompt says that my machine is now authorized to play. I again push okay, but the song does not play and I do this again and again and again.
    I have tried to get rid of the sd file. I have tried changing my password. I have tried changing my ID. I have never changed my account. It's always been the same one since I joined Itunes in 2004 or 2005. I have purchased 280 songs since then, so I'm really upset that I can't access those purchased songs. Everything that is not purchased works fine.
    I should say that my new computer stutters sound and video a little bit. I've done some things to minimize that but it still happens. I don't know if the two are related.

    If you've done all the steps in this article,
    http://docs.info.apple.com/article.html?artnum=306424
    contact iTunes store support at the bottom of this page
    http://www.apple.com/support/itunes/store/authorization/

  • ITunes 11.0.3 asks for password again and again, have re-done my credit card details, have changed my Apple ID password, tried to log in and out of iTunes, none of thos seem to work, just keeps happening without end, please help

    I have tried to re-install iTunes 11.0.3 at least 6 times.
    I have also downloaded iTunes 11.0.3 at least 5 times.
    I have changed my Apple ID password.
    I have downloaded (again, I've done that many times) iTunes 11.0.3, then I switched off the iMac, then restarted the wi-fi modem.  Switched on the iMac, loaded iTunes, same problem.
    I tried to just switch off the wi-fi, did the same as point above, same problem.
    Even tried to change the system date to 2038, this only seemed (although I doubt it) to fix the "not responding" issue which I had this morning.
    The Apple ID password issue, where it asks me for the password loads and loads of times (probably 50 times or more), one after the other has been happening for about 3 days now.
    Here is a copy of my message problem:
    iTunes Problem, can't seem to find a solution online.
    I am running OS X 10.8.3 on an iMac, have just loaded iTunes 11.0.3 a few days ago.
    Firstly, I'd open iTunes and it would immediately say it was not responding, I'd have to force quit, try again, re-boot, try again etc.  I tried re-installing iTunes, changing password, everything to no avail, then changed my date to 2038, and voila it started responding (no, don't ask me, I just read in online and was desperate enough to try it).  Of course, I don't believe that this actually helped, I would like to know what did help or if there is something specific one needs to do to fix this.
    I have not been able to get rid of this problem:  Whenever I try to make a purchase it asks for my Apple ID password, dozens of times until I give up and press cancel, cancel, cancel.
    Why does it do this?  I don't want to purchase anything because I can't keep typing in my password again and again.  I'm not exaggerating.
    As I mentioned, I have tried to re-install iTunes, about 6 times, and I changed my password.  I still get the same problem.
    Also, my iTunes still looks like the classical iTunes and doesn't have the new interface.
    Has anyone experienced this and was able to fix it, or does anyone know what the problem is?  Please help, I'm at my wits end.

    Because too much time has passed I can't edit this into the prior comment, but here is the info regarding reverting to iTunes 11.0.2 (assuming you do have a time machine backup) from https://discussions.apple.com/message/22057703#22057703
    W. Raider wrote:
    Repairing permissions doesn't fix it.
    I reverted to the previous version, 11.0.2.
    1. Quit the new crash-prone iTunes.
    2. Delete the app.
    3. Restore v. 11.0.2 with Time Machine.
    4. In your iTunes folder look for a folder called "Previous iTunes Libraries", find the latest one.
    5. In the iTunes folder itself you'll see "iTunes Library.itl", delete it (or compress it and save a copy for later just in case.
    6. Copy the newest .itl file in Previous iTunes Libraries to the iTunes folder and rename it "iTunes Library.itl".
    7. Launch the older version of iTunes.
    My crashing has seemed to have ceased with a revert to an older version. I noticed today that the newer crashing iTunes had been launched for hours but not playing anything, when I played internet radio it crashed within 5mins, fed up I reverted to an older version.
    Btw, a simpler way to do this is to revert to older iTunes app, then hold Option when it launches and choose an older library.

  • Problem with internet. When i open System preferences, Network, message drops down: 'your network settings have been changed by another application'. I click OK, but it drops a message again and again, preventing me to do anything about the setting.

    Problem with internet. When i open System preferences, Network, message drops down: 'your network settings have been changed by another application'. I click OK, but it dropps the message again and again, preventing me to do anything about the setting.

    A Fix for "Your network preferences have been changed by another application" Error 
    In the Library/Preferences/SystemConfiguration/ folder delete the following:
    com.apple.airport.preferences.plist
    NetworkInterfaces.plist
    preferences.plist
    com.apple.nat.plist
    You will have to re-configure all your network settings since deleting.
    (10.4.10)
    Use Software Update to update your OS to last version of Tiger.  Install all the other updates that goes along w/it.

  • Can we open and close the cursor again and again

    hi all,
    with the help of cursor select statement i am writing some columns into the text file. while writing into the file in between i want to write something which belongs to others cursor. shall i close the first cursor and reopen it again..
    is its works?

    If you are using for loop the you don't need to open and close the cursor like:
    SQL> set autot off
    SQL> begin
      2     for i in (select ename, deptno, sal from emp)
      3     loop
      4             for j in (select dname from dept where deptno = i.deptno)
      5             loop
      6             dbms_output.put_line ('Ename:' || i.Ename ||'  Dept Name:'|| j.dname);
      7             end loop;
      8     end loop;
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> /
    Ename:SCOTT  Dept Name:RESEARCH
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:SALES
    Ename:first_0  Dept Name:RESEARCH
    Ename:first_1  Dept Name:SALES
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:ACCOUNTING
    Ename:first_0  Dept Name:RESEARCH
    Ename:first_1  Dept Name:ACCOUNTING
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:RESEARCH
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:RESEARCH
    Ename:first_0  Dept Name:ACCOUNTING
    PL/SQL procedure successfully completed.
    SQL> Or let us know about your requirements i.e. why you need to open/close the cursor again and again.

  • Whenever i open firefox it held and not responding and i have to close it through task manager.i have uninstall it and again download it but problem is still there.what shoud i do?

    i am using firefox for many years.its a great browser i have ever used.but the problem i am having from couple of days is unexpected.whenever i open my firefox it held and do not respond even cant close it.nothing respond.i have uninstall it many times and then download it and install it again and again but the problem is still there.please help me out.

    Did you see this article linked from the main Firefox Help page?
    [[Removing Babylon, SearchQU or MyStart]]
    Post back if you need more help.

  • Can someone plz confirm me that how i can change or update the security questions related to my apple id? as i have been never put them since i create my apple id but now due to some security reasons its asking me again and again the answers. i am unable

    can someone plz confirm me that how i can change or update the security questions related to my apple id? as i have been never put them since i create my apple id but now due to some security reasons its asking me again and again the answers. i am unable to go through the process. thanks.

    Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities

  • Photoshop CC wont open it asks me to log in every time and when i do and it says im good to continue it just asks me to login again

    my photoshop CC will not work bridge and lightroom 5 open just fine but when i go to open photoshop it asks me to log in every time and when i do and it says im good to continue it just asks me to login again today is the first time i am experienceing this problem i have been using CC for about 2 to 3 months now need this problem fixed asap please

    Open the Desktop Application manager.  click on the little cog icon > Preferences > Account.
    If you sign out, and sign back in again, that will force the Desktop Application Manager to rescan your system and check installed Adobe apps.
    I think that the latest updates fixed the 'You have been signed out' problem.  If not the fix is a bit long winded, so try first, and if you are stuck I/we will talk you through the fix.
    Photoshop: Basic Troubleshooting steps to fix most issues

  • Photoshop CC: Have a template that I moved image into.  Image is too small.  How do I resize the image while in the template?  Or must I go to original image file and resize there again and again until I get the right fit?

    I have a template that I am able to plug different pictures into at different times.  The problem is that when I plug an image into that template, I find that the image is either too big or too small.  Is there a way to plug the image into the template and resize the image (and not the template itself) OR will I have to go to the file with the original image and resize it there and then try to plug it in to the template to see if it fits------and if it does not fit, go back to the original file with the image and resize it again and see if that fits---and so on and so on...........?  I have tried the" image size" option but it's hit or miss------mostly miss!
    Thanks!

    Read up on Smart Objects. It looks like you have no idea as to how to create and use them.
    Jut create a Smart Object from the layer containing whatever it image it is that you are "plugging into your template".  But you do need to learn the application at its most basic levels.
    Photoshop is a professional level application that makes no apologies for its very long and steep learning curve.  You cannot learn Photoshop in a forum, one question at a time.
    Or is it possible that you don't even have Photoshop proper but the stripped-down Photoshop Elements?"
    If the latter is the case, you're in the wrong forum.  This is not the Elements forum.
    Here's the link to the forum you would want if you're working in Elements.:
    https://forums.adobe.com/community/photoshop_elements/content
    If you do have Photoshop proper, please provide the exact version number of that application and of your OS.
    (edited for clarification)

Maybe you are looking for