Sql parameter substitution problems

Hi,
I am having problems with the sql parameter substitution. I have a query that
looks like this:
select name,value from table where name in ('name1','name2');
I have tried building a string that equals "'name1','name2'" and passing it as
a parameter to sql entering the javaDoc comments like:
select name,value from table where name in ({nameString})
The problem is that when it is substituted and set to the database it looks like
this:
select name,value from table where name in ('\'name1\',\'name2\'');
This will not work. Does anyone have any suggestions on how to do this using a
database control. Basically I'm looking for the ability to create dynamic sql
statements.
Thanks for your help.
Regards,
James

Anurag,
Thanks for the reply. I don't think that this solves my problem though. I will
never know how many strings to pass. It's all based on what the user wants, they
could ask for 2, 20, or any other number of names. It sounds like using a Database
control is not really possible for this situation. What do you think? Any chance
of this making into workshop in the future or in these situations is creating
an EJB the only way to go?
Thanks again.
Regards,
James Chamberlain
"Anurag Pareek" <[email protected]> wrote:
Hi James,
This result is same as what you will get on executing the following prepared
statement:
conn.prepareStatement("select empid from empdemo where name in (?)");
pstmt.setString(1,"'Person 1','Person 2','Person 3'");
pstmt3.execute();
Workshop's DBControl internally uses a PreparedStatement, hence you would
obtain the same result.
To get it working, you will need to pass in the 3 strings separately
as
below:
conn.prepareStatement("select empid from empdemo where name in
pstmt.setString(1,"Person 1");
pstmt.setString(1,"Person 2");
pstmt.setString(1,"Person 3");
Please do let me know if you have further queries regarding the issue.
Regards,
Anurag
Workshop Support
"James Chamberlain" <[email protected]> wrote in message
news:[email protected]...
Hi,
I am having problems with the sql parameter substitution. I have aquery
that
looks like this:
select name,value from table where name in ('name1','name2');
I have tried building a string that equals "'name1','name2'" and passingit as
a parameter to sql entering the javaDoc comments like:
select name,value from table where name in ({nameString})
The problem is that when it is substituted and set to the databaseit
looks like
this:
select name,value from table where name in ('\'name1\',\'name2\'');
This will not work. Does anyone have any suggestions on how to do thisusing a
database control. Basically I'm looking for the ability to create dynamicsql
statements.
Thanks for your help.
Regards,
James

Similar Messages

  • Font encryption and substitution problems

    Please let me know whether Adobe content server has the option to verify a pdf for font encryption and substitution problems.
    regards,
    Sashi

    No, for anything other than basic format issues you will want to use Acrobat for verification and modification of the PDF file.

  • How to solve Oracle SQL Developer connection problem ?

    Folks,
    Hello. I am using Oracle Database 11gR1. The Database Control Console https://localhost.localdomain:1158/em works correctly. I can create a Database and a table successfully.
    My OS is Linux and connects to internet successfully.
    In order to run SQL statements. we need to use Oracle SQL Developer. I connect Oracle SQL Developer in the following way:
    Connection Name: DB1 (this is my database name as well)
    Username: SYS (this is the user name I used to login to the Console)
    Password: SYS (this the password used to login to the Console)
    Connection Type: Basic
    Host Name: localhost
    Port: 1158
    SID: DB1 (this is created during installing the Database)
    But the error message comes up: "Status: Failure - IO exception Connection Reset."
    Can any folk tell me how to solve Oracle SQL Developer connection problem ?

    user8860348 wrote:
    Folks,
    Hello. I am using Oracle Database 11gR1. The Database Control Console https://localhost.localdomain:1158/em works correctly. I can create a Database and a table successfully.
    My OS is Linux and connects to internet successfully.
    In order to run SQL statements. we need to use Oracle SQL Developer. I connect Oracle SQL Developer in the following way:
    Connection Name: DB1 (this is my database name as well)
    Username: SYS (this is the user name I used to login to the Console)
    Password: SYS (this the password used to login to the Console)
    Connection Type: Basic
    Host Name: localhost
    Port: 1158
    SID: DB1 (this is created during installing the Database)
    But the error message comes up: "Status: Failure - IO exception Connection Reset."
    Can any folk tell me how to solve Oracle SQL Developer connection problem ?username: sys
    password: enter_your_correct_password given at the time of oracle installation
    role: select sysdba if you would connect as sysdba else select normal for users other than sys
    hostname: enter your oracle server hostname or ip address eg:- 192.168.11.12
    to find the hostname open terminal/command prompt in oracle installed machine
    type ---> hostname
    type ---->ping hostname
    you can find the ipaddress of the server
    port number: 1521 (default) ----> i guess , else check the port number in the tnsnames.ora file under your ORACLE_HOME/network/admin folder
    SID: DB1
    try it
    Good Luck

  • RE: Database (SQL-SERVER) access problem

    Have you used NT Control Panel/ ODBC to set up the ODBC data source name?
    You have to define the data source (database) SecTrade as well as the
    driver to be used (SQL Server). This can be done by selecting the Add
    button on the Data Sources screen in Control Panel/ ODBC.
    Hope this helps.
    Sanjay Murthi
    Indus Consultancy Services, Inc.
    From: Administrator
    Sent: Wednesday, August 13, 1997 6:49 PM
    To: "'[email protected]'"
    Cc: murthis; thyagarajm; thyagarm; vasasm; chandraa
    Subject: Database (SQL-SERVER) access problems
    MCI Mail date/time: Mon Aug 11, 1997 10:28 pm EST
    Source date/time: Mon, 11 Aug 1997 19:25:34 +0530
    Hi Forte-Users,
    We have a setup a Sql-Server database on a NT server. In the Forte
    EConsole,
    we have
    setup a ODBC-type Resource for this server, named SERVER2_ODBC. This NT
    server
    is configured as a Client Node in the active Forte environment. Note
    that
    Server2 is not
    the Forte server, but has Forte installed. There is another NT server
    which
    acts as the
    Forte server. NODEMGR and Sql-Server are running on SERVER2.
    In our application, we have a DBSession SO with the database source
    as SERVER2_ODBC, Userid=ForteInstructor. When running the application,
    Forte
    throws an exception, the gist of it being as follows:
    USER ERROR: (This error was converted)
    Failed to connect to database: SecTrade, username: ForteInstructor.
    [Microsoft][ODBC Driver Manager] Data source name not found and no
    default
    driver specified
    We have tried
    1) Installing ODBC drivers on the NT server (Server2)
    2) Accessing local databases from Forte clients which works fine
    3) Accessing the Sql-Server database through Isqlw (Sql-Server Client
    s/w) -
    It works.
    Could someone suggest what we should try to get rid of this problem?
    Thanks for any help,
    Kishore Puvvada

    Rajsarawat wrote:
    Dear sir/mam,
    I have installed sql server 2005 (server) and on another computer installed client. It installed successfully but on client side it does not seen, from where should i start it. so please send me procedure to install sql server 2005 on both side(client and server).You have to turn on network (external to your computer) access.
    Under programs->sql server look for "surface"

  • SQL*Plus Substitution Variables Article

    I see questions on SQL*Plus substitution variables still pop up here. I've reposted the old SQL*Plus 10.1 Substitution Variables article that once was on OTN. Almost all the content and examples are still relevant.
    -- cj

    btw there is a double <tt>&lt;i></tt> tag in the line <i>"7.1 iSQL*Plus 9 and SQL*Plus Substitution Variable Compatibility"</i> causing the 2000 or so lines following it to be in italics.
    I think it's meant to be
    <i>i</i>SQL*Plus 9<i>i</i>and not
    <i>i</i>SQL*Plus 9<i><i></i>

  • SQL Parameter Order

    I'm not sure if this is a CR or BOE question but I'll post here first.
    Is there any way to change the parameter order of a SQL Command Parameter?
    I know it usually goes by the alphabetical order of the parameter name (i.e.: SQL Parameter name "StartDate" and "EndDate" would actually prompt EndDate first then StartDate).
    I guess I can easily try to change the wording of the parameter names and that's what I did (I changed it to "1StartDate" and "2EndDate").  It prompts correctly in CR when I preview it... but when I bring it up to BOE and run the report there, it will prompt me the 2EndDate first instead of 1StartDate.
    Any ideas?

    James,
    I have changed appropriately to match alphabetically (eg. Begin & End)... and like always, Crystal will display the prompt correctly and in correct when refreshing the report.  But once I bring it up on BOE, it will prompt for End first then Begin.
    Brian,
    Thanks for your suggestion.  However, I am aware of the parameter orders in the parameter viewer.  While the parameter order list applies to parameter used on the actual report, it does not apply to the order SQL Command Parameters are for some reason.  Regardless, it has always been set in the order I'd like it... just that when it comes to the SQL Parameter part, it never follows.
    Could this be a BOE issue then?

  • SQL Parameter

    How do u setup SQL parameter in .NET OLEDataAdapter. I tried to follow .NET sample to use ? but it doesn't work. Any idea? TIA

    If you want to select all items you should use a query without a WHERE clause:
    Select Id from table1
    Please refer to the following page for more information about how to add a new query to your table adapter:
    https://msdn.microsoft.com/en-us/library/kda44dwy.aspx.
    You could call the new method with the new query "FillAll" or something.
    You cannot select all values by passing some magic parameter value to the FillBy_Id query since it takes an id value to filter on.
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't post several questions in the same thread.

  • OiL - Configurable Product Text Parameter Substitution Variables

    Hi there,
    I am working on an Oracle iLearning 5.0b1 customization for a client. They have requested that the generic default "Enrollment Request Forwarded For Your Approval" message for Authorized Enrollment Web Notifications be customized to include the Username, Business Organization (configurable attribute field) and the Course title. This is required because the Manager, Training Coordinators and Registrars that are part of the authorized enrollment workflow need to be able to quickly select the appropriate enrollment request instead of having to open each one to find the correct request.
    In order to meet this requirement, I need to be able to add my own Parameter Substitution Variables to the Enrollment Request message (Message Key = WF_ILA_REQUEST_SUBJECT)
    I have been unable to find any information on adding Parameter Substitution Variables for Configurable Product Text. I know that the instructions in the Admin Console say not to change or delete the defaults when changing the messages.
    Has anyone been attempted to add their own Parameter Substitution Variables to an existing Configurable Product Text or created their own Message Key for a custom message?
    Any help is appreciated.
    ~jctrm

    There's no means within iLearning (without customization) to include additional substitution variables into notifications.
    Scott
    http://www.seertechsolutions.com

  • Substitution problem in VO with viewlink and not in expert mode

    Hi All
    i have to extend a VO ,standar VO is not in expert mode so i made it and then extended the VO(need to add two new date columns) and substituted the BC4j ,i was involved in this discussion also
    Re: Substitute ViewObject. Urgent!!!!!  Thank you
    ,and i was aware that viewlinks should take care by substituion itself ,but in my case it is creating problem ,first it has thrown the error given below
    oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidParamException: JBO-25006: Invalid parameter value PoRequisitionLinesVO for source passed to method ViewLinkImpl.setSource.  Explanation: view def mismatch
    then i modified the VOExRowImpl and added the viewlink setter getter from seede Rowimpl ,now it it not throwing the InvalidParamException ,but throwin OAAttrValException saying get method for LineNum is not resolved ,now i m puzzeled what is going on ,i m sure i have not made any mistake in substitution, any clue would be very helpful for me ,please throw some light on this issue
    thanx
    Pratap

    thanx kumar, nice to see your reply.
    basic requirement is i have to create two date fileds on the requsition line form ,it shud appear on the basis of selected value in a field of same row ,so i set PPR ,initially i bounded these fields with spared attributes of VO but it was creating problem after page refresh ,i have raised the issue in the forum
    Date value format is changed itself after page refresh
    raised a tar with oracle ,issue was that these attributes are varchar type and used for the date fields, thats y creating the problem after page refresh ,VO extension didnt work bcz these attributes are already there in seeded VO with there data type, so they can not be changed in VO extension,oracle suggested create two columns with date type in the seeded table itself and use them in VO extension , i did it ,now the problem is
    i have extended the VO ,and this problem came ,one thing i m not sure is
    since i have added two new columns ,shud i do EO extension (i did it ) and then VO extension ,if yes then how bcz when i will move all the files from server they are all standard files and ,extended VO is getting the reference of seeded VO which is using the seeded EO not the extended EO .
    so what approch or steps shuld i follow to add this newly added column in VO .
    thanx
    Pratap

  • Oracle/ SQL Developer connection problem.

    I have installed Oracle 11 g and SQL Developer, When I open SQL Developer and try to make a new connection ( I name the connection, put a user name in, put my password in), I click on "Test" and I get this error:
    Status: Failure - Test failed: Listener refused the connection with the followong error:ORA-12505, TNS: listener does not currently know of SID given in connect descriptor The connection descroptor used by the client was:localhost:1521:ex
    Can anyone explain this to me and help me resolve this issue I am having?
    Thank you in advance for your help
    -steve
    p.s. I have also tried the user name: Scott and Password: Tiger

    Windows 7 Home ... will have challenges at some point, as Oracle may not be completely compatible with Windows 7.
    Aside from that, you may find firewall issues even if you are on the same machine, since the default connection from SQLDeveloper is to use the network (even loopback).
    First step is to verify that the database and listener are running and that the database is registered to the listener. TO do that, drop into command line and issue:
    1) Listener
    lsnrctl statuswhich will give one of two results, if properly installed. First - listener is down
    C:\temp>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 07-FEB-2010 20:48
    :13
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
       32-bit Windows Error: 2: No such file or directory
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=FCC003L)(PORT=1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
       32-bit Windows Error: 61: Unknown errorIf the above is displayed, check the Service applet (Control Panel -> Admin Tools > Service) to ensure serivce is up, or enter "lsnrctl start", in which case the status shoud show
    C:\temp>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 07-FEB-2010 20:46
    :40
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date                05-FEB-2010 14:42:10
    Uptime                    2 days 6 hr. 4 min. 30 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Default Service           XE
    Listener Parameter File   C:\oracle\app\oracle\product\10.2.0\server\network\adm
    in\listener.ora
    Listener Log File         C:\oracle\app\oracle\product\10.2.0\server\network\log
    \listener.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=FCC003L)(PORT=1521)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
      Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    C:\temp>2) After the service is verified up, make sure the database is up
    sqlplus / as sysdbawhich should respond with something like
    C:\temp>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Feb 7 20:43:12 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL>if it gives something like
    C:\temp>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Feb 7 20:44:49 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    ERROR:
    ORA-12560: TNS:protocol adapter errorthe pull up the Control Panel, Admnistration Tools, Services and start the database. Then recheck the listener and it shoudl show some additional services such as
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "TEST" has 1 instance(s).
      Instance "xe", status READY, has 1 handler(s) for this service...
    Service "XEXDB" has 1 instance(s).
      Instance "xe", status READY, has 1 handler(s) for this service...
    Service "XE_XPT" has 1 instance(s).
      Instance "xe", status READY, has 1 handler(s) for this service...
    Service "xe" has 1 instance(s).
      Instance "xe", status READY, has 1 handler(s) for this service...
    The command completed successfullyIn the above, remember the "xe" from 'Service "xe" has 1 instance(s).'. I expect to see something about that in the TNSNAMES.ORA file in your ORACLE_HOME\network\admin directory. That file should have an entry like
    XE =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = FCC003L)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = XE)
      )and you will note the XE on the left side of the equal sign (which is a network alias), and one XE in the (SERVICE_NAME = XE) line. On YOUR system, the XE should be replaced by whatever you called your database (often 'orcl'). REMEMBER THIS ALIAS;-) and also make note of the host that your entry uses. If your host name changes because of DHCP, you're hooped (for a while).
    If the database is registered (shows up in the list), the next step is to make sure a userid is available. You could use 'system' (try to avoid using SYS since it is the master userid and if you mess that up, you mess up all your homework. In a production encvironment, every access to SYS will be audited.
    So, let's create a userid called me with (in 11g case sensitive) password 'myself'. Make sure that user is allow to log in (create session) and create a table.
    C:\temp>sqlplus system/oracle
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Feb 7 20:54:38 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create user me identified by myself;
    User created.
    SQL> rem to show you how to change password ...
    SQL> alter user me identified by myself account unlock;
    User altered.
    SQL> grant create session, create table to me;
    Grant succeeded.
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Productionand now see whether we can log in using the same 'network' technique we will later use with SQLDeveloper.
    Do you remember the XE discussion above? Replace XE with the one on the left of the equal sign - the system looks that up to find which service it wants to access.
    C:\temp>sqlplus me/myself@XE
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Feb 7 20:58:26 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> select * from dual;
    D
    X
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - ProductionIf the above worked, you should have no problem accessing the system using SQLDeveloper. You simply use the HOST, the PORT and the SID (alias) or service from the "lsnrctl status" output in the SQLDeveloper fields.
    If it did not work, try dropping the "@XE" to see whether you can get in (using the bequeath connection) which is useful for troubleshooting but will not help with the traditional SQLDeveloper connection. If you get in without the @XE (or whatever your alias is) but not with it, most likely either your listener is not up or your firewall is blocking the access to the listener.

  • PL/SQL Procedure Parameters PROBLEM

    Here's my problem:
    When we describe the successfully compiled PL/SQL packaged procedures in SQL*Plus, the parameter order seems reversed. For instance, my PL/SQL source looks like this:
    Create Package pkg1...
    Procedure func1 (param1 in varchar2,
    param2 in number) is
    ...function body...
    end func1;
    end pkg1;
    After it is successfully compiled in SQL*Plus, when I describe it using the desc command, it shows:
    PROCEDURE FUNC1
    Argument Name Type ......
    PARAM2 VARCHAR2
    PARAM1 VARCHAF2
    This problem occurs occasionally, if we recompile the source, it goes away. We couldn't quite tell when and how this happens. When the problem occurs, we checked the ALL_SOURCE view and verified that the parameters are in the right order.
    We use the Merant Drivers for our client side interfaces and whenever we have this problem on the db server, we get the "wrong number of types or parameters" error.
    Any clues, hints, solutions are greatly appreciated.
    Thank you for your time.
    On a different note, I couldn't find the appropriate forum to post this PL/SQL specific message, wondering why there isn't a PL/SQL forum.
    Murthy.

    Hi Yegneshwar
    Can U tell me how to invoke the procedure ? If all it can be invoked the post it or mail me and then I might help U out.
    Thank U.
    edwin

  • JSTL sql:param has problems

    a.jsp?id=1&id=2&id=3
    <c:set var="a">
    ${fn:join(paramValues.a,",")}
    </c:set>
    when print out the value of a
    ${a}
    is:
    1,2,3
    <sql:update>
    update my set t=1 where id in(?)
    <sql:param>${a}</sql:param>
    </sql:update>
    when this happens,hope have 3 datas was update
    but in fact only the data whose id is 1 is update,
    but if i use
    <sql:update>update my set t=1 where id in(${a})
    </sql:update>
    all of them are updated succeed,how does it ?
    Am i have some errors ?

    The problem is that you are telling the PreparedStatement that is being made using the
    sql:update tag that there is only one parameter. Both by adding just one ? and
    by using just one sql:param tag (which I believe has to be 1:1 with the ?s).
    Anyway, in order for the PreparedStatement to know that there is going to be multiple
    parameters, you have to pass the correct amount of ?s. If it will always be three, you
    would use:
      <sql:update>
        update my set t=1 where id in(?,?,?)
        <c:forEach var="a" items="${paramValues.a}">
          <sql:param>${a}</sql:param>
        </c:forEach>
      </sql:update>But for the more likely case where you do not know how many ?s there will be, you would use
      <c:set var="aCount">
        ${fn:count(paramValues.a)}
      </c:set>
      <c:set var="sqlString">
        update my set t=1 where id in(
        <c:forEach begin="0" end="aCount">
        </c:forEach>
      </c:set>
      <sql:update>
        ${sqlString}
        <c:forEach var="a" items="${paramValues.a}">
          <sql:param>${a}</sql:param>
        </c:forEach>
      </sql:update>You might want to check out that c:forEach ... ?, It is untested, and I am not sure how the DB will handle the extra comma.
    However, unless this same update, with the same number of parameters, is likely to occur multiple
    times, you are gaining no benefit from using the PreparedStatement, and you are probably better off
    going with the simpler Stament syntax you already used.
      <c:set var="a">
        ${fn:join(paramValues.a,",")}
      </c:set>
      <sql:update>
        update my set t=1 where id in(${a})
      </sql:update>

  • SQL*Plus Installation Problem (Ora-12705)

    Hi,
    I bought a guide to sql featuring Oracle by phillip J.Pratt published by course Technology include Oracale8i Personal Edition realease 8.1.5 for Microsoft Window 98 and Oracle Developer 6.0. I follow the documentation to install. I think i got right configuration (i have the tnslsnr window display and Oracle8i database started) but when I login (user:system and password:manager)it doen't work and it give me the error Ora-12705: invalid or unknow NLS parameter value specified. What can i do with this? I appreciate for yours help.
    ~linh
    null

    I got this error message too when I install the 9i client in my pc. You can find the NLS_LANG in the registry under \\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE. If you have multiple oracle home, you might need to check each of the entry.
    I found that the value for NLS_LANG is NA and I changed it to
    9i: AMERICAN_AMERICA.WE8MSWIN1252
    oracle form 6i : AMERICAN_AMERICA.WE8ISO8859P1
    This fixed my sqlplus problem, and I hope it helps.

  • SQL*Plus Install Problem (Ora-12705?- - -)

    Hi,
    I bought a guide to sql featuring Oracle by phillip J.Pratt published by course Technology include Oracale8i Personal Edition realease 8.1.5 for Microsoft Window 98 and Oracle Developer 6.0. I follow the documentation to install. I think i got right configuration (i have the tnslsnr window display and Oracle8i database started) but when I login it doen't work and it give me the error Ora-12705: invalid or unknow NLS parameter value specified. What can i do with this? I appreciate for yours help.
    ~linh
    null

    I got this error message too when I install the 9i client in my pc. You can find the NLS_LANG in the registry under \\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE. If you have multiple oracle home, you might need to check each of the entry.
    I found that the value for NLS_LANG is NA and I changed it to
    9i: AMERICAN_AMERICA.WE8MSWIN1252
    oracle form 6i : AMERICAN_AMERICA.WE8ISO8859P1
    This fixed my sqlplus problem, and I hope it helps.

  • Output Parameter cast problems

    Wondering if anyone has seen this ...
    Migrating a data access layer (based on the MS DAAB) using the ODP.NET provider. I wrote my own parameter discovery code to dynamically configure parameters at runtime - just like the SqlCommandBuilder.DeriveParameters() method does for SQL Server sprocs.
    (I query the "all_arguments" view to get this data, by the way, passing the package name and procedure name.)
    Here's the problem: you cannot discover the Size property for a parameter via this query. Bummer. So for VarChar2 and Char types I tried setting the Size to somethng big, like 2000.
    When I retrieve the parameters after an ExecuteNonQuery statement, I am getting Type cast errors:
    "Cast from type 'OracleString' to type 'String' is not valid"
    Here's the weird part:
    - CType(params(5).Value, Integer) 'WORKS
    - CType(params(2).Value, String) 'DOESN'T WORK
    - params(2).Value.ToString 'WORKS
    - CType(params(2).Value, Date) 'DOESN'T WORK
    What the ...? Why can't I cast a VarChar2 or Char type back to a .NET String? Why does ToString work but Ctype() not work?
    I hope somebody can offer guidance, I've got a lot invested in this DAL :-)
    Thanks eh
    Kurt Mang
    Vancouver BC

    There's not really an elegant way to provide these conversions in VB. In C# OracleString uses operator overloading to provide type conversions, but this version of VB doesn't support it.
    They might have implemented IConvertible on the oracle types.
    Then you could write
    Dim osw as new OracleString("Hello")
    Dim s as String = CType(osw, IConvertible).ToString
    But that's not really better than
    Dim osw as new OracleString("Hello")
    Dim s as String = osw.Value
    The long and short of it is, OracleTypes ( and other ADO.NET provider types), are special high-performance types (usually value types), and they convert using a different idiom. By convention they are converted to the corresponding framework type using a property called .Value, and constructed from framework types using a constructor.
    String s = New OracleString("Hello").Value
    Converts the Unicode string "Hello" to an OracleString structure, and then back to a unicode string.
    David

Maybe you are looking for

  • Can we view data in Multiprovider

    Hello All In one of my interview he asked me can v view data in multiprovider.(Not in reporting level). I said no,he said yes? If anyone knows abt this pl let me know. Regards balaji

  • Plugin check (incorrectly) says my acrobat plugin is out of date and takes me to a reader install

    Windows XP FF 20.0 I have Adobe Acrobat X 10.1.6. and the plugin checker says its out of date. I don't think it is, it's just not Abobe Reader. I don't want to have both Acrobat and Reader. When I do, then there's two different plug-ins in FF, but th

  • Flash Video

    I would like to know, what is the resource requirement for running a 20mb flash video. eg RAM, CPU, Video RAM. I have a system Via 1.3 processor, 1GB RAM, and 16 mb video ram (onboard) running flash 9 r115 on Linux kernel 2.6. Website: www.centeronet

  • Hi ALL How to keep field in input mode even if  error is fired in the PAI

    Hi all my requirement is like this Here in one screen am using the table  control now in the table control user is providing data . while user will press the save button after providing the respective data then it should check one validation by loopi

  • Cable box hdmi to dvi out using 23" ACD possible to bypass hdcp?

    i got a 23" apple cinema, and when i use a hdmi adapter to plug my monitor into the back of my hd cable box, it says the display isn't hdcp compatible, i must disconnect to continue watching tv. any way to get around this yet? no need to wait for hd-