How to use sql request with Jdev and database connection

Hello,
I have a login page with simple username and password inputsecret text and a button validate! I would like, when the user click on the validate button, to check in the database that the user and password matches. I've done the "Method BIndind..." with the commandButton_action and the database connection works fine.
How can I use an already existing procedure, say authenticate, wich is stored in the database to authenticate my user ?
Do I have to create a jdbc connection in java even if I've done the connection with the "create new database connection" wizard ?
String s1 = "jdbc:oracle:thin:@address:1521:ORCL";
System.out.println( "Connecting with: " );
System.out.println( s1 );
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
this.conn = DriverManager.getConnection( s1,"user","pass");
thanks for your help

Creating a connection to the DB in JDeveloper doesn't mean that your application is now connected to the DB - so yes you do need to create a connection to the database using JDBC.
One note - if you are trying to do a database user authentication the following is probably the better way to go about it:
http://www.oracle.com/technology/products/jdev/howtos/1013/oc4jjaas/oc4j_jaas_login_module.htm

Similar Messages

  • How to use SQL Dev with MySQL DBs ? Connection Setup

    As far as I know SQL Dev can be used with MySQL databases as well.
    How do I have to setup the connection for MySQL?
    In detail what do I have to enter for
    -role
    -connection type
    SID/ServiceName
    Or is there a separate version for Oracle and MySQLß
    Peter
    Edited by: user5328442 on Jan 5, 2011 9:23 AM

    Hi,
    After downloading the MySQL plugin did you add the details in the third party database list ?
    Do the following -
    - Tools
    - Preferences
    - expand the Database option if necessary
    - Third Party JDBC Drivers
    - add the location and file name of the plugin.
    On my setup it is -
    D:\mysql_jdbc\mysql-connector-java-5.0.8\mysql-connector-java-5.0.8-bin.jar
    The driver may be different if you have a later version.
    Regards,
    Mike
    Edited by: mkirtley on Jan 7, 2011 9:46 AM

  • How to use SQL loader with DBF fixed format record

    Hi everybody!
    My situation is that: I want to use SQL loader with Foxpro DBF format, it similar to case 2 study (Fixed format record) but DBF file has header, how can I tell SQL loader skip header.
    Thank you in advance

    Another option is to apply SQL operators to fields
    LOAD DATA
       INFILE *
       APPEND
    INTO TABLE emp
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' (
       empno,
       ename,
       job,
       mgr,
       hiredate DATE(20) "DD-Month-YYYY",
       sal,
       comm,
       deptno CHAR TERMINATED BY ':',
       projno,
    loadseq "my_seq.nextval")This is a modified control file of Case Study 3 which originally demonstrated the use of the Sequence parameter

  • Performance with MySQL and Database connectivity toolbox

    Hi!
    I'm having quite some problems with the performance of MySQL and Database connectivity toolbox. However, I'm very happy with the ease of using database connectivity toolbox. The background is:
    I have 61 variables (ints and floats) which I would like to save in the MySQL-database. This is no problem, however, the loop time increases from 8ms to 50ms when using the database. I have concluded that it has to do with the DB Tools Insert Data.vi and I think that I have some kind of performance issue with this VI. The CPU never reach more the 15% of its maximum performance. I use a default setup and connect through ODBC.
    My questions are:
    1. I would like to save 61 variables each 8-10ms, is this impossible using this solution?
    2. Is there any way of increasing the performance of the DB Tools Insert Data.vi or use any other VI?
    3. Is there any way of adjusting the MySQL setup to achieve better performance?
    Thank you very much for your time.
    Regards,
    Mattias

    First of all, thank you very much for your time. All of you have been really good support to me.
    >> Is your database on a different computer?  Does your loop execute 61 times? 
    Database is on the same computer as the MySQL server.
    The loop saves 61 values at once to the database, in one SQL-statement.
    I have now added the front panel and block diagram for my test-VI. I have implemented the queue system and separate loops for producer and consumer. However, since the queue is building up faster then the consumer loop consumes values, the queue is building up quite fast and the disc starts working.
    The test database table that I add data to is created by a simple:
    create table test(aa int, bb char(15));
    ...I'm sure that this can be improved in some way.
    I always open and close the connection to the database "outside the loop". However, it still takes some 40-50 ms to save the data to the database table - so, unfortunatly no progress to far. I currently just want to save the data.
    Any more advise will be gratefully accepted.
    Regards,
    Mattias
    Message Edited by mattias@hv on 10-23-2007 07:50 AM
    Attachments:
    front panel 2.JPG ‏101 KB
    block diagram.JPG ‏135 KB

  • How to use sql loader with sequence?

    Hi,
    I have create a sequence and I would like to use when I am using sql loader when import some data into table.
    Please give me some idea.
    Thanks

    Another option is to apply SQL operators to fields
    LOAD DATA
       INFILE *
       APPEND
    INTO TABLE emp
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' (
       empno,
       ename,
       job,
       mgr,
       hiredate DATE(20) "DD-Month-YYYY",
       sal,
       comm,
       deptno CHAR TERMINATED BY ':',
       projno,
    loadseq "my_seq.nextval")This is a modified control file of Case Study 3 which originally demonstrated the use of the Sequence parameter

  • How to use oracle APEX with an distant database located on a distant server

    Hi there,
    I'm a brand new user with Oracle Technologies. I've installed ORACLE 10g XE and updated APEX to 4.0 version on my laptop.
    My Manager has setup a distant server with a Linux Red Hat. He has installed on this server EBS R12 with a 11i database.
    As a training, I'd like to play with the tables located on the server with the APEX 4.0 installed on my laptop.
    As the server is on the same local network and following the description above, is it possible to plug my local APEX to the server database ?
    If not, does it mean I have to install APEX on the 11i server database and then connect to the server to play with those tables ?
    Thanks a lot for your time and support ACEs members.
    Regards,
    Ulrich

    Hi Ulrich,
    yes, you can access other database from your APEX database. The mechanism used to do this is called a "database link". You need to create such a database link in your local database, then you can access the remote database like this:
    SELECT *
      FROM databaselink@EMP
    ;If you want to use such remote objects from within APEX you need to create local views to wrap this (search the forum for apex and database links, you'll find interesting threads).
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • How to use Stored Procedures with SQLServer2005 and WAS 6.x

    Hi All
    I've got a problem, during the call to a StoredProcedure in SQLServer i've get the next message:
        Exception : com.microsoft.sqlserver.jdbc.SQLServerException: Fetch size cannot be negative
    The stored procedure is working correctly if I run my process out of WAS 6.x but if I get a connection from the pool the process don't work.
    Help please, thanks.

    Your procedure has a single OUT parameter ... and yet it appears you are trying to stuff something into it ... that is never going to work. Additionally everything else about your stored procedure would have gotten you a FAIL grade were you been in my beginning PL/SQL class.
    The syntax, a cursor loop, is obsolete and has been for more than 10 years.
    The formatting and use of case makes even the few lines written hard to read.
    And either no commit ever takes place or you are trying to do incremental commits in origseq: Both of which are bad practice.
    This code should use BULK COLLECT to collect all relevant records into an array and then pass the array to origseq ... no loops ... and end with a commit.
    Demo here: http://www.morganslibrary.org/reference/array_processing.html

  • How to use thunderbolt port with disks and DVI-display

    Hello,
    today I use a 15" MacBookPro and have attached 1TB LaCie with FW800  (for time machine) and DVI-Display using Mini-port.
    Need to add more external disk space and look for Lacie 2 TB with thunderbolt connection (for storing mass of pictures in Raid1 version)
    Is it possible to connect the new disk, the other disk with an Thunderbolt->FW800 adapter and the DVI-Display to one thunderbolt port?
    What are the options I have, to get all three to work at the same time?

    No, or at least not without additional hardware. You have too many end-points for one Thunderbolt chain.
    You also have the problem that the Thunderbolt->FW800 adapter is not yet for sale.
    If the new disk you get has two Thunderbolt ports (which not all do), you could daisy-chain the Thunderbolt->FW800 adapter behind it, but that adapter has to be at the end of the chain. The Mini-port->DVI adapter likewise needs to be at the end of a chain.
    So, you can probably get all three connected at one time by connecting the "1TB LaCie with FW800  (for time machine)" to your FW800 port, while connecting the Thunderbolt->FW800 adapter (when available) to the second port of the new disk. I say "probably" because nobody has the TB-FW adapter yet to try it.
    As for doing it on one Thunderbolt port with additional hardware, you might look into third-party docking stations being released in the next few months. The announced prices are in the low-to-middle hundreds. I won't mention brand names, as this is an Apple forum, but they aren't too hard to find by web search.
    The highest-priced solution would be the Apple Thunderbolt Display, which gives you a FW800 port for your 1TB drive, a pass-thru Thunderbolt port for your new disk, and of course a 2560x1440 display (plus ethernet and usb2 ports you may not need). It's available now, in the uppermost hundreds. There are some refurbs in the online Apple Store at the moment at 15% off.

  • How to use Acrobat SDK with C# and how much is it?

    I just want to know these info because I'm new here and I can't seem to find any answers to these here in the forums and on the Documentation.

    Hi,
    The Acrobat SDK is free and can be downloaded from http://www.adobe.com\devnet\acrobat. Please note to use the SDK you require Acrobat/Reader to be installed.
    As for using it with c#, there are a number of sample files in the SDK that can be used to learn. There is also documentation online and in the SDK.
    Hope thie helps
    Malcolm

  • How to use Flex builder with blazeds and JBoss

    Following the instructions it is pretty easy to set up a project to work with the turnkey tomcat. However, I am having problems with JBoss because the app has to be deployed as a .war file. I can create a war file manually and depoly it no problem. How do I get flex builder to deploy to a war file? I want to be able to debug in flex builder and run at the click of a button.

    Hi,<br /> I am trying to configure BlazeDS with JBOSS Application Server.<br /> I have downloaded BlazeDS binary version - blazeds_bin_3-0-0-544.zip from Adobe. But in the installation steps, it says that copy blazeds.war, samples.war and console.war into <JBOSS_HOME>/server/default/deploy folder. But in this zip, it contains only blazeds.war file only. I have copied it to <JBOSS_HOME>/server/default/deploy folder.<br /><br />I have restarted JBoss. I didn't get any error. But when i give <br /> http://localhost:8080/blazeds ... i am always getting "Page not found 404" error.<br /><br />Please help me, if you have detailed steps to configure BlazeDS on JBoss.<br /><br />Thanks for your time.

  • How to extract sql text with SID and SERIAL#

    Hi,
    I am new to oracle database and recently i have started my journey in performance tuning.
    i need to extract sql text which is fired by user based ont SID and SERIAL#.
    Thanks in advance..
    prabha

    seankim wrote:
    Hi~
    select a.sid, a.serial#, b.sql_fulltext
    from   v$session a, v$sql b
    where  decode(a.sql_id,null,a.prev_sql_id, a.sql_id)=b.sql_id
    and    decode(a.sql_id,null,a.prev_child_number, a.sql_child_number)=b.child_number
    and    a.sid=&sid
    and    a.serial#=&serial;
    Also a bad idea - have you checked the exection plan ?
    Do you think it might be a good idea to think about the need for statistics on fixed objects ?
    Here's a possible plan from 11.1.0.7 - and it's not very nice.
    | Id  | Operation                  | Name              | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT           |                   |     1 |  2182 |     0   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS              |                   |     1 |  2182 |     0   (0)| 00:00:01 |
    |   2 |   MERGE JOIN CARTESIAN     |                   |     1 |  2075 |     0   (0)| 00:00:01 |
    |   3 |    NESTED LOOPS            |                   |     1 |    39 |     0   (0)| 00:00:01 |
    |*  4 |     FIXED TABLE FIXED INDEX| X$KSLWT (ind:1)   |     1 |    26 |     0   (0)| 00:00:01 |
    |*  5 |     FIXED TABLE FIXED INDEX| X$KSLED (ind:2)   |     1 |    13 |     0   (0)| 00:00:01 |
    |   6 |    BUFFER SORT             |                   |     1 |  2036 |     0   (0)| 00:00:01 |
    |*  7 |     FIXED TABLE FULL       | X$KGLCURSOR_CHILD |     1 |  2036 |     0   (0)| 00:00:01 |
    |*  8 |   FIXED TABLE FIXED INDEX  | X$KSUSE (ind:1)   |     1 |   107 |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - filter("W"."KSLWTSID"=82)
       5 - filter("W"."KSLWTEVT"="E"."INDX")
       7 - filter("INST_ID"=USERENV('INSTANCE'))
       8 - filter("S"."INDX"=82 AND "S"."KSUSESER"=53 AND "S"."INST_ID"=USERENV('INSTANCE')
                  AND BITAND("S"."KSSPAFLG",1)<>0 AND BITAND("S"."KSUSEFLG",1)<>0 AND
                  "KGLOBT03"=DECODE("S"."KSUSESQI",NULL,"S"."KSUSEPSI","S"."KSUSESQI") AND
                  "KGLOBT09"=DECODE("S"."KSUSESQI",NULL,DECODE("S"."KSUSEPCH",65535,TO_NUMBER(NULL),"S"."K
                  SUSEPCH"),DECODE("S"."KSUSESCH",65535,TO_NUMBER(NULL),"S"."KSUSESCH")))You need to avoid the "full tablescan" of the library cache.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com

  • How to use Sql Lite with AiR application

    Hi,
    I am new to SqlLite , i need to fetch the details from the
    db file and i need to update every time . when the user click the
    update file . can any one help me hw to solve this issue
    ~~
    Sk

    Anything is possible. You might want to ask if it's a good idea, but look at some of the people who have asked before. It looks like there are products out there to help.
    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Btitle%3Aocx&col=javaforums&x=19&y=13

  • How to Use SQL Query having IN Clause With DB Adapter

    Hi,
    I am using 11.1.1.5 want to find out how to Use SQL Query having IN Clause With DB Adapter. I want to pass the IN values dynamically. Any ideas.
    Thanks

    invoke a stored procedure, it's safer than trying to put together an arbitrary SQL statement in the JCA adapter

  • How to create a transport request with query and only with its structure.

    HI guru,
                how to create a transport request with query and only with its structure.transport request should not  include any other query items like ( variables, conditions...etc)
    thanks in advance.
    venkata

    Hi,
    Goto RSA1 and then Transport Connection -> In SAP Transports select Object Types-> Query Elements -> Then select Query->Give Technical name of the query and then select for transfer. In the right side you can choose the components which you wanted to transport.
    Regards,
    anil

  • Using iPhone 4s with IOS5 and my Music icon has disappeared.  How do I get it back?  Please.

    Using iPhone 4s with IOS5 and my Music icon has disappeared.  Please help me to get it back.

    It should be in your applications folder.  Locate it; click and hold onto it then drag it back to where it was.

Maybe you are looking for

  • Won't print to HP7700

    When I try to print I get a Red stop sign with ! on my lower tool bar at the printer icon. The printer has wored fine for years. I have looked at my system preferences an it is set for the HP 7700. I had the printer at the shop and they said it works

  • Xsl document() cannot find resources..

    I am running SS 11gr1 I have an xsl tranform that requires an external document for lookups. However, I cannot figure out how to load the document, relative to the current project (or composite)... <xsl:variable name="uom_lookup" select="document('uo

  • How to create a database schema

    could any one help me with database schema I need create one thanks!

  • Issue With Dashboard

    Hi , In a dashboard i have created a prompt ,i.e MOnth. If i select month from drop down list we will get only one month data right, but my requirement is if i select one month in prompt i need to display six monthdata. How is it possible? Waiting fo

  • Don't want a PDF file with notification

    Hi We don't want a PDF file when we send out notifications. We want the notification with certain fonts and formatting that can go in standard email body. Has anyone had experience with that?