How to get images from sybase database

i have been trying to fix this code and so far after 10 hours have no succes my jsp page is coded like so...
<html>
<head><title>JSP The Short Course - Lesson 13 </title></head>
<body>
<jsp:useBean id="myBean" scope="session" class="examplebean.bean2" />
<img src= "<%=myBean.getImage(1)%>">
</body>
</html>
and the bean is coded like so
package examplebean;
import java.sql.* ;
import java.io.Serializable;
public class bean2 implements java.io.Serializable {
public bean2() {}
public javax.servlet.http.HttpServletResponse getImage(int p){
java.io.BufferedInputStream bufferedInputStream;
Connection sqlca = null;
Statement sqlStatement = null;
ResultSet myResultSet = null;
javax.servlet.http.HttpServletResponse response = null;
java.io.InputStream i = null;
int popo = 0;
try {
Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
String theDatabase = "jdbc:sybase:Tds:compserver:5000/syb3026";
sqlca = DriverManager.getConnection(theDatabase,"syb3026","oohyeahh");
sqlStatement = sqlca.createStatement();
myResultSet = sqlStatement.executeQuery("select Product_Picture from PRODUCT_TABLE where Product_Id = " + p + " ");
/* Construct the heading for the table */
/* Move to next row and & its contents
to the html output */
response.setContentType("image/jpeg");
while(myResultSet.next()) {
byte[] pepe = myResultSet.getBytes("Product_Picture");
popo = pepe.length;
i.read(pepe,0,popo);
bufferedInputStream = new java.io.BufferedInputStream(i);
java.io.ByteArrayOutputStream byteArrayOutputStream = new java.io.ByteArrayOutputStream();
int start = 0;
int length = 1024;
byte[] buff = new byte[popo];
int bytesRead;
while(-1 != (bytesRead = bufferedInputStream.read(buff, 0, popo))) {
byteArrayOutputStream.write(buff, 0, bytesRead);
bufferedInputStream.close();
response.setContentLength( byteArrayOutputStream.size() );
response.getOutputStream().write( byteArrayOutputStream.toByteArray() );
response.getOutputStream().flush();
JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(img);
param.setQuality(1.0f,true);
encoder.encode(img,param);
out.close();*/
sqlStatement.close();
catch (SQLException e) {
System.out.println(" Error: SQL error of: " + e.getMessage());
catch (Exception e) {
System.out.println(" Error: JDBC Class creation: " + e.getMessage());
finally {
try {
sqlca.close();
catch(SQLException e) {
System.out.println(" Error: Closing connection: " + e.getMessage());
return response;
I KNOW THIS CODE IS NOT THE BEST WRITEN BUT I SHOULD WORK. BUT IT DOESNT I REALLY NEED HELP AND DONT HAVE ANY ASISTENCE IN COLLEGE ANY HELP WOULD BE APPRECITAED SINCERLY AS I AM LOST WITH THIS PROBLEM
THANK YOU
THANK YOU
THANK YOU
THANK YOU

maybe not so complex
if (RS_photo.next()){ 
buf = RS_photo.getBytes(1);
response.setContentType("image/"+photoname);
OutputStream out = response.getOutputStream();
out.write(buf);
out.flush();
}catch (Exception e){ 
//throw e;
}

Similar Messages

  • How to extract image from oracle database and display at html page

    Could you help me how to make the image to display. i manage to extract the data but the data is in Blob so i need to convert it so make it display at html page.

    Thanks for ur reply Mr.Rajasekhar
    I tried as u said,
    i tried without converting to sql date ,but still i din't get any results
    java.text.SimpleDateFormat dateFormat=new java.text.SimpleDateFormat("dd/MM/yyyy");
             java.util.Date fromDate=dateFormat.parse(startDate);
            java.util.Date tillDate=dateFormat.parse(endDate);          
              String query1="select MTName,Date,MTLineCount from linecountdetails where mtname='"+MTName+"'  and Date >='"+fromDate+"' and Date <='"+tillDate+"' " ;
            System.out.println(query1);
    //From main method
    databaseConnection("prasu","1/12/2005","31/12/2005");I got the output as
    ---------- java ----------
    select MTName,Date,MTLineCount from linecountdetails where mtname='prasu'  and Date >='Thu Dec 01 00:00:00 GMT+05:30 2005' and Date <='Sat Dec 31 00:00:00 GMT+05:30 2005'
    java.lang.NullPointerException
    null
    null
    java.lang.NullPointerException
    Output completed (4 sec consumed) - Normal TerminationThanks
    Prasanna.B

  • How to get Image from JEditorPane

    I have an HTML which is rendered in JEditorPane. I need to get the image, shrink it, and create an icon. any idea how to do this?
    Thanks

    You can call the component's paint method and supply another Graphics object for it to paint to. Then use this Graphics object as your Icon's paint buffer...
    Quick ugly pseudocode...
    tempGraphics = createImage(...).getGraphics();
    pane.paint(tempGraphics); //ok now you have the image.
    //scale it...
    Icon icon = new Icon(){
    public void paintIcon(Component c, Graphics g, int x, int y)
    tempGraphics.copyTo(g);
    };

  • How to get image from MIME folder

    Dear Experts!!
    I am doing the WebDynpro Exercise on /docs/DOC-8661#22 [original link is broken] [original link is broken].
    I put the images files to be shown with the UI elements in srcmimesComponents<package folder> in my workplace, gave the source of the pictures in the layout setting of the UI elements.
    However, I am not getting the images in the UI elements.
    I want some hints on the place to put the image files.
    I have put the images in the above mentioned folder  of the workplace, but when I check the navigation view of the project, I cannot see those imagefiles in srcmimesComponents<package folder>.
    Thanks in advance for your suggestions.
    regards,
    sudeep

    Hi Sudeep
    The procedure you are following in copying the images into src\mimes\Components\<package folder> is absolutely correct, but you are saying that you are not able to see those in navigation tab, then do one thing . directly nagivate through the 
    src\mimes\Components\<package folder> in your navigation tab and try to paste in image there only.
    remember one thing. the image name is CASE SENSITIVE . and you need to specify the extension along with the image name in the SOURCE property of the ImageUIElement.
    CLOSE YOUR PROJECT AND REOPEN THE PROJECT . and then go through navigation tab and see. now you can see those images
    Best Regards
    Chaitanya.A

  • Getting image stored in database !!

    Hey !!
    I'm really trying to solve so much problems i'm having with javafx !!
    So, like the title may suggest, i'm having problems as to get image from the database !!
    Everything seems fine but it tells me that there is "Exception while runing Application"
    here is the code !!
    @James D, i will come back bugging yu again to see how to use the stored images and display them inside the combobox and to render them ^^
    I haven't well understand how well as to use the enum struc in which yu declared the composed <Image,String> type ^^
    import java.awt.image.BufferedImage;
    import java.io.ByteArrayInputStream;
    import java.io.InputStream;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import javafx.application.Application;
    import javafx.event.Event;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.ComboBox;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    import javax.swing.JOptionPane;
    * @author Minedun6
    public class DynamicCustomComboBox extends Application {
        Connection c = connection.ConnecrDb();
       PreparedStatement pst = null;
       ResultSet rs = null;
       ComboBox box1;
       ImageView view;
        @Override
        public void start(Stage primaryStage) {
            box1 = new ComboBox();
            box1.setPrefSize(100, 25);
            box1.setOnShowing(new EventHandler() {
                @Override
                public void handle(Event t) {
                    box1.getItems().clear();
                    try {
                String sql = "select libelle_constr,img_constructeur from constructeurs where libelle_constr='Citroen';";
                pst = c.prepareStatement(sql);
                rs = pst.executeQuery();
               while(rs.next()){
                   box1.getItems().add(rs.getString("libelle_constr"));
                   InputStream input = new ByteArrayInputStream(rs.getBytes("img_constructeur"));
                   Image imge = new Image(input);
                   view.setImage(imge);
            } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
            StackPane root = new StackPane();
            root.getChildren().addAll(box1);
            Scene scene = new Scene(root, 300, 250);
            primaryStage.setTitle("Hello World!");
            primaryStage.setScene(scene);
            primaryStage.show();
        public static void main(String[] args) {
            launch(args);
    }

    In any real application, it's a mistake to mix your presentation (user interface) code with your persistance (database access) code.
    Why? You want maintainability, flexibility, and testability.
    Maintainability:
    Suppose you want to change the structure of your database. E.g. the database admin (which may be you, or someone else) determines that the database design you have is inefficient and needs to be changed. If your database code is scattered over the whole application, mixed in among your user interface code, tracking down what needs to be changed will be a nightmare. If all your database code is in a single class, or perhaps a set of classes in a single package, then the updates are localized and much easier to manage. Furthermore, you can build the new database access code on its own, test it out, and then when you are sure it works just switch your user interface code to use the new persistance layer instead of the old one. The same applies if you decide you're going to use a completely different technology to store the data; perhaps you want to use something like Hibernate instead of plain JDBC, or maybe you decide you want to make the data accessibile via a web service.
    Flexibility:
    What if you (or, more likely, your manager) decides they're going to change to a new user interface technology. Maybe they decide to switch to a web application (i.e. HTML-based) instead of a desktop application. You obviously need to rewrite the user interface code, but you should be able to keep all the database access code you've written. If your database access code is all jumbled up with the user interface code you're replacing, it's going to be way harder to reuse that code. If the two are separated out, you just build a new user interface in whatever new technology you're using, and access the same class(es) you used for your database access without touching them.
    Testability:
    This whole thread is actually a demo of how testability is much harder if you don't properly separate your code. You posted "getting image stored in database", thinking that was your problem. It wasn't; your problem was actually an error in the way you'd set up your JavaFX code. Because the two were completely mixed together, it was hard to know where the error was. The error you had was actually a really simple one; it would have been much easier to see if you had simpler, properly separated code; but because you didn't organize your code like that it took you days to figure out the problem. This was only a couple of dozen lines of code; imagine how this looks in a real application with hundreds or thousands of classes.
    The point is that decisions about how to access your data (standalone database, web service, or EJB?; plain JDBC, JPA, Hibernate, etc?) , and decisions about the presentation technology (desktop or web? JavaFX or Swing?, or Servlets/JSPs, JSF, Swing MVC, or any of a huge number of frameworks) are completely independent. You should be in a position to change those decisions - to redesign aspects of the application - with the least amount of effort possible. Failing to properly design things will make this much harder, or likely completely impossible.
    These are real concerns that affect every application that goes into production.
    Even if you're just making a small application, it will benefit you to set things up correctly from the outset.

  • How to get images dynamically from database without file paths in the table field

    I have a MS-Access database. I am working with ASP.NET. In the database there is product table in which I have "CodeNo" as a field which is a text field, and the product codes like "SM-R-2035". I also have another field "Image" which is also a text field and which have a file path in it corresponding to the particular product Image (e.g. Images\Products\SM-R-2035.jpg). So far every thing is ok. I have to update this site very frequently and lots of images are added each and every time. Its a tedious work to type the paths and file name every time and it also take a lot of time.
    What I am asking is : Is it possible to get images from a specific folder at runtime which is referenced by the "code no" itself and not the file path from the database. (Say at run time the "code no" is referenced from the database and the corresponding image is loaded dynamically from the specified folder). In other word I want to avoid the tedious work of typing.
    Can any one help with this issue. Any other simple suggestions are welcome.

    All you need to do is simple concatenation to obtain the path for the image file.  You didn't mention whether you are using VB.Net, C# or some other language to do your coding.
    If the code in your database is SM-R-2035, the file name is SM-R-2035.jpg and the path to the images foilder is Images\Products\SM-R-2035.jpg, Conceptually here is what you need to do:
    dim code_var
    dim path_var
    code_var = the code you obtain from your relevant field in the database
    path_var = "Images\Products\" & code_var & ".jpg"
    Now path_var is what you would call to obtain the image from your images folder.

  • Error while getting  image from database in SUP using ios?

    Hi All,
      Im developing native iOS application using sup 2.1.3 . Im getting error While retrieving  image from SUP database. Here i'm trying to get image from database and show in imageView.can any one help me how to fix this issue?
    In database image datatype is  'LONG Binary' .
    My table Schema:
    CREATE TABLE dba.ImagesTable (
    RowID INT NOT NULL,
    ImageName VARCHAR(20) NOT NULL,
    PhotoData LONG BINARY NOT NULL,
    IN SYSTEM
    ALTER TABLE dba.ImagesTable
      ADD CONSTRAINT ASA137 PRIMARY KEY CLUSTERED (RowID)
    ALTER TABLE dba.ImagesTable
      ADD CONSTRAINT ASA138 UNIQUE NONCLUSTERED (RowID)
    in Xcode:
                [SUP107SUP107DB synchronize];
                SUP107ImagesTable *imgTable =[[SUP107ImagesTable alloc]init];
                SUP107ImagesTableList *list =[SUP107ImagesTable findAll];
                SUP107ImagesTable * oneRecord =[list objectAtIndex:0];
                NSLog(@"rowId:%d---imageName:%@---photoData:%@---photoLenght:%d",oneRecord.rowID,oneRecord.imageName,oneRecord.photoData,oneRecord.photoDataLength);
                NSData *tempData =[[NSData alloc]init];
                SUPBigBinary *responseBinaryData = (SUPBigBinary *)oneRecord.photoData.value;
                @try {
                    [responseBinaryData openForWrite:[oneRecord.photoData length]];
                    [responseBinaryData write:tempData];
                @catch (NSException *exception) {
                    NSLog(@"exception: %@",[exception description]);
                UIImageView *imgView =[[UIImageView alloc] initWithFrame:CGRectMake(50,50,100,100)];
                [self.window addSubview:imgView];
                UIImage * tempImage =[UIImage imageWithData:tempData];
                imgView.image = tempImage;
                [responseBinaryData close];
    Error Log:
    2014-04-02 18:42:15.150 SUP102[2873:70b] rowId:1---imageName:Apple---photoData:SUPBigBinary: column=c pending=1 allow_pending_state=1 table=sup107_1_0_imagestable mbo=0x0 key=(null) ---photoLenght:90656
    Printing description of responseBinaryData:
    <OS_dispatch_data: data[0xc891b40] = { leaf, size = 90656, buf = 0x1213a000 }>
    2014-04-02 18:42:33.304 SUP102[2873:70b] -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.305 SUP102[2873:70b] exception: -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.305 SUP102[2873:70b] -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.306 SUP102[2873:70b] [ERROR] [AppDelegate.m:497] NSInvalidArgumentException: -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40

    This thread talks about uploading image to SAP from a IOS device,Sending Image to SAP via iOS Native app (SUP 2.1.3)
    Midhun VP

  • How can i get data from another database SQL Server use database link from

    I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • How can i  get data from anather database system  ????????

    Hi every body..
    I 've a problem .....
    I've an old program work on "DOS" and it's content database which content all Data that i need for that program
    The data file extension with ".FD" , ".VW" , ".LSS" & "SLP"
    I want to kow:-
    1) what is that database system
    2)What program could open or can get data from that database tables.
    3)can i do that with oracle...
    please describe every thing in details...
    ... Please replay quickly... urgently
    ...waiting your answer....

    You're probably better off consulting the documentation for the DOS program you're trying to deal with than hoping someone here will be able to guess what program you're using, identify the structure of the files, and tell you how to extract the data into something Oracle can import.
    Justin

  • How do i store and fetch image from the Database(Access)

    i am facing one problem in inserting the image into the database.the steps i followed as
    1)i have created one database(access) as "Image" and into that one table as "Image" and field as "image"
    type of the field is ole object.
    2)i have inserted one image into the image field through "database.vi"
    3)now i am trying to get the image from the database by "Fetching Example.vi"
    4)it will succesfully retrieve the image from that field .
    5)but when i close the both programs and reopen those that time i am unable to get retrieve the image.
    Attachments:
    Add_to_Database.vi ‏78 KB
    Fetch_from_database.vi ‏67 KB

    I would like to suggest different approach for saving the images in the database.
    I was working on Medical Imaging Company. The way we save the images in real-time was by writing the name and path of the images to database.
    The images themselves where saved directly to disk.
    I don�t think that access is very good in taking care of GBytes of data.
    It happens some time that the database gets damage. If you have the images separately you can create fix procedure. (We had one).
    Good Lack,
    Amit Shachaf,

  • How do I get images from Aperture into print shop for mac?

    Friends,
    I have Print Shop for Mac and Aperture. How do I get images from Aperture into Print Shop? I'musing managed images with previews. Is there any option besides exporting to the desktop and importing?
    Thanks!
    Steve

    if you have previews turned on in Aperture and they're all genereated, you can simply drag-n-drop them into any application (just about). drag-n-drop is essentially the same as copy/paste as long as the application is setup to accept "drops" onto its windows.
    otherwise, if you're running Leopard (10.5) as your version of Mac OS X, when you import (or whatever it is in PrintShop), you should get a file selection dialog. from here, scroll down the left-hand side bar set of icons. near the bottom is a group called "Media". click on the triangle to open the group, choose Photos, and from here you should see an Aperture icon. click this and you'll see your whole library (or at least the portion of it that you have previews generated for. select the photo you want and viola!
    scott

  • How to load images from css file in JavaFX 8

    I have this css file which loads images in JavaFX 8 application:
    #pill-left {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/left-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-left:selected { -fx-border-image-source: url("/com/dx57dc/images/left-btn-selected.png"); }
    #pill-left .label {
        -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-left:selected .label {
        /* -fx-text-fill: black; */
        -fx-text-fill: white;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-center {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/center-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-center:selected { -fx-border-image-source: url("/com/dx57dc/images/center-btn-selected.png"); }
    #pill-center .label {
        -fx-text-fill: #d3d3d3;
         -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-center:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-right {
        -fx-padding: 5;
        -fx-border-image-source: url("/com/dx57dc/images/right-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
         -fx-border-image-repeat: stretch;
        -fx-background-color: null !important;
    #pill-right:selected { -fx-border-image-source: url("/com/dx57dc/images/right-btn-selected.png"); }
    #pill-right .label {
         -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-right:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    The images are located at the Java package com.dx57dc.images
    In Java 7_25 this code works as expected but in JavaFX 8 b99 I get this error:
    ava.lang.NullPointerException
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1129)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:99)
    at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:210)
    at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:95)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
    at java.lang.Thread.run(Thread.java:724)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    What is the proper way to load images from css in Java 8?
    Ref
    How to load images from css file in JavaFX 8 - Stack Overflow

    There is nothing special to do - you execute the statement from your program just like any other SQL statement.  The only thing to be aware of are the privilege/permission issues:
    When loading from a file on a client computer:
    READ CLIENT FILE privilege is also required for the database user.
    Read privileges are required on the directory being read from.
    The allow_read_client_file database option must be enabled.
    The read_client_file secure feature must be enabled.
    Revoking these privileges is also the only way you can prevent a user from executing the statement.

  • How to get CLOB from stored procedure via StoredProcedureCall

    hi all
    I got "sp" on server : procedure get_text(p_in in varchar2, o_list out clob);
    in code:
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName("get_text");
    call.addNamedArgumentValue("p_in", new String("MyList"));
    call.addNamedOutputArgument("o_list"); // <- out CLOB
    Vector v = (Vector)this.m_UnitOfWorkt.executeSelectingCall( call ); // <- here I got error
    but if o_list is varchar is all ok
    so how to get data from clob?
    Please help
    Regards
    Krzysztof

    Post Author: achaithanya
    CA Forum: Data Connectivity and SQL
    I'm connecting to database through stored procedure only.We have sybase installed on our local system so that we are given permissions only to access the stored procedures.When u see the fields in CR XI i.e Field explorer you are able to see only 1st result fileds.I connected to sybase and there i'm able to see the output of 1st & 2nd Result set.
    Regards,
    Chaithanya.

  • Get Images from jar. getResource() not working

    I've read some of the posts in the forum and I've tried the solutions but still cant get the images in my program.
    I'll write all the things I've tried (All of them works fine when I run them from bluej):
    1- The code used in the jar files in demo folder of jdk:
    /** Inside the main class: */
    private static ResourceBundle resources;  
        static {
            try {
                resources = ResourceBundle.getBundle("resources.Recursos", Locale.getDefault());
            } catch (MissingResourceException mre) {
                JOptionPane.showMessageDialog(new JFrame(), "ResourceBundle not found","Error",JOptionPane.ERROR_MESSAGE);
                System.exit(1);
    public String getResourceString(String nm)
            String str;
            try {       
                str = resources.getString(nm);   
                  } catch (MissingResourceException mre) {       
                str = null;
            return str;
        public URL getResource(String key)
            String name = getResourceString(key);
            if (name != null)
                URL url = getClass().getResource(name); //  Here is the exception
                return url;  
            return null;
        public ImageIcon loadImage(String image_name)
            URL image_url = null;    
            try
                image_url = getResource(image_name);             
                if (image_url != null)
                    return new ImageIcon(image_url);
                else
                return null;                  
            }catch(Exception e)
                JOptionPane.showMessageDialog(new JFrame(), e.getMessage() + "In load Image","Error",JOptionPane.ERROR_MESSAGE);
                return null;
    /** Inside the constructor */
    abrirButton = new JButton(loadImage("open"));
    }//End of the class}
    The ResourceBundle is a file named: Recursos.properties and it's in a folder inside the folder of my *.class and *.java And have this information:
    Title=Recursos
    ElementTreeFrameTitle=Elements
    ViewportBackingStore=false
    open=resources/open24.gif
    save=resources/saveAs24.gif
    cut=resources/cut24.gif
    copy=resources/copy24.gif
    paste=resources/paste24.gif
    analisis=resources/bean24.gif
    This one, runs with the jar, but the images are not in the buttons and I get the Dialog message telling me that there was an error in loadImage. Check that method. I used this dialogs to track the error and the exception it's generated by:
    URL url = getClass().getResource(name);
    in public URL getResource(String key) method.
    2- I also tried to follow the instructions of this article that describes how to get resources from jars:
    http://www.javaworld.com/javaworld/jw-07-1998/jw-07-jar-p2.html
    This is the first page of the article:
    http://www.javaworld.com/javaworld/jw-07-1998/jw-07-jar.html
    And I did something like this:
    /** Inside constructor */
    abrirButton = new JButton(new ImageIcon(getImageFromJAR("Imagenes/open24.gif")));
    /** Inside of my main class */
    public Image getImageFromJAR(String fileName)
               try{
               if( fileName == null ) return null;          
               Image image = null;
               Toolkit toolkit = Toolkit.getDefaultToolkit();          
                image = toolkit.getImage( getClass().getResource(fileName) );           
                return image;
                }catch(Exception exc){
                    JOptionPane.showMessageDialog(new JFrame(), "Exception loading the image","Error",JOptionPane.ERROR_MESSAGE);
                    return null;
    ...The images in this one are in the folder Imagenes inside the folder of my *.class and *.java
    This one work fine in bluej too, but the jar... It doesn't even start.
    3- And the last one.
    abrirButton = new JButton(new ImageIcon(getClass().getResource("Imagenes/open24.gif"));Works fine in bluej, not running in jar.
    Am I doing something wrong? Please somebody help me.
    thanks in advance

    Are you putting the image files inside the jar? If you are, then use "jar tf jarfile.jar" to display the contents of the jar and make sure the files are there and inside the right directory. If you are not, then you can not use getClass().getResource() from a jar file because it will look inside the jar file.
    If you are getting an error message, please post it.

  • Insert an image from a Database

    Hi - I am trying to insert an image from a database into a webpage.  Basically when clients register on the site they upload their logo which i want to come up when they look at their account details and when they post a job.  When I test the file upload the file name is in an "image" field in my database and the image is in the website files on the server but I am having problems trying to get the logo to shop up on the webpage.  I have one table called Recruiters where all the client's contact details (and logo upload goes) and a table called jobs where all the job details go when they post a job (this does not hold the logo upload). 
    At the moment i am trying to insert the image into the Recruiter account Details page where all the clients contact details are and all this information comes from the Recruiter table (including the image) but the image does not appear.  the query in my recordset is:-
    SELECT *
    FROM recruiters
    WHERE RecruiterID = colname
    (colname = $_GET['RecruiterID'])
    <?php require_once('../Connections/laura.php'); ?>
    <?php
    //initialize the session
    if (!isset($_SESSION)) {
      session_start();
    // ** Logout the current user. **
    $logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
    if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
      $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
      //to fully log out a visitor we need to clear the session varialbles
      $_SESSION['MM_Username'] = NULL;
      $_SESSION['MM_UserGroup'] = NULL;
      $_SESSION['PrevUrl'] = NULL;
      unset($_SESSION['MM_Username']);
      unset($_SESSION['MM_UserGroup']);
      unset($_SESSION['PrevUrl']);
      $logoutGoTo = "../index.php";
      if ($logoutGoTo) {
        header("Location: $logoutGoTo");
        exit;
    ?>
    <?php
    if (!isset($_SESSION)) {
      session_start();
    $MM_authorizedUsers = "Recruiter";
    $MM_donotCheckaccess = "false";
    // *** Restrict Access To Page: Grant or deny access to this page
    function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
      // For security, start by assuming the visitor is NOT authorized.
      $isValid = False;
      // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
      // Therefore, we know that a user is NOT logged in if that Session variable is blank.
      if (!empty($UserName)) {
        // Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
        // Parse the strings into arrays.
        $arrUsers = Explode(",", $strUsers);
        $arrGroups = Explode(",", $strGroups);
        if (in_array($UserName, $arrUsers)) {
          $isValid = true;
        // Or, you may restrict access to only certain users based on their username.
        if (in_array($UserGroup, $arrGroups)) {
          $isValid = true;
        if (($strUsers == "") && false) {
          $isValid = true;
      return $isValid;
    $MM_restrictGoTo = "../Unavailablepage.php";
    if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {  
      $MM_qsChar = "?";
      $MM_referrer = $_SERVER['PHP_SELF'];
      if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
      if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
      $MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
      $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
      header("Location: ". $MM_restrictGoTo);
      exit;
    ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $colname_rsAccountDetails = "-1";
    if (isset($_GET['RecruiterID'])) {
      $colname_rsAccountDetails = $_GET['RecruiterID'];
    mysql_select_db($database_laura, $laura);
    $query_rsAccountDetails = sprintf("SELECT * FROM recruiters WHERE RecruiterID = %s", GetSQLValueString($colname_rsAccountDetails, "int"));
    $rsAccountDetails = mysql_query($query_rsAccountDetails, $laura) or die(mysql_error());
    $row_rsAccountDetails = mysql_fetch_assoc($rsAccountDetails);
    $totalRows_rsAccountDetails = mysql_num_rows($rsAccountDetails);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Nursery and Childcare Jobs in the UK</title>
    <link href="../CSS/Global.css" rel="stylesheet" type="text/css" />
    <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="../SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    <!-- google adwords -->
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-6435415-4']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </script>
    </head>
    <body>
    <div class="container">
      <div class="header"><!-- end .header --><a href="../index.php"><img src="../Images/Logo.png" width="900" height="200" alt="Logo" /></a></div>
       <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="../index.php">Home</a>      </li>
          <li><a href="#" class="MenuBarItemSubmenu">Recruiters</a>
            <ul>
              <li><a href="recruiterbenefits.php">Benefits</a></li>
              <li><a href="recruiterfees.php">Fees</a></li>
              <li><a href="recreg.php">Register</a></li>
              <li><a href="reclogin.php">Login </a></li>
            </ul>
          </li>
          <li><a class="MenuBarItemSubmenu" href="#">Jobseekers</a>
            <ul>
              <li><a href="../Jobseekerarea/jobseekerbenefits.php">Benefits</a>          </li>
              <li><a href="../Jobseekerarea/jobseekerreg1.php">Register</a></li>
              <li><a href="../Jobseekerarea/jslogin.php">Login</a></li>
            </ul>
          </li>
          <li><a href="../contactus.php">Contact Us</a></li>
      </ul>
      <div class="sidebar1">
        <p> </p>
        <div class="recruitsidebar">
          <ul id="MenuBar2" class="MenuBarVertical">
            <li><a href="postajob.php">Post a Job</a></li>
            <li><a href="recruiterjobs1.php">My Jobs</a></li>
            <li><a href="recAccdetails.php?RecruiterID=<?php echo $row_rsAccountDetails['RecruiterID']; ?>">My Details</a></li>
            <li><a href="Saferrecruitment.php">Safer Recruitment</a></li>
            <li><a href="Interview1.php" class="MenuBarItemSubmenu">Interviewing Staff</a>
              <ul>
                <li><a href="recInterviewquestions.php">Nursery Staff Interview Questions</a></li>
              </ul>
            </li>
            <li><a href="Nurseryjobsdescriptions.php">Nursery Job Descriptions</a></li>
            <li><a href="recruiterarea.php">Recruiter Home</a></li>
    <li><a href="<?php echo $logoutAction ?>">Log Out</a></li>
          </ul>
          <p> </p>
        </div>
    </div>
      <div class="content">
        <h1>Account Details</h1>
        <p>Below are the details you have provided us with about your nursery/setting.</p>
        <p> </p>
        <form id="accountdetailsform" name="accountdetailsform" method="post" action="recUpdate.php?RecruiterID=<?php echo $row_rsAccountDetails['RecruiterID']; ?>">
          <table width="580" border="0" cellpadding="3" cellspacing="3" id="accountdetails">
            <tr>
              <td width="212" scope="col">Nursery/Setting Name</td>
              <td width="347" scope="col"><?php echo $row_rsAccountDetails['client']; ?></td>
            </tr>
            <tr>
              <td>Contact Name</td>
              <td><?php echo $row_rsAccountDetails['contactname']; ?></td>
            </tr>
            <tr>
              <td>Setting Type</td>
              <td><?php echo $row_rsAccountDetails['settingtype']; ?></td>
            </tr>
            <tr>
              <td>Nursery/Setting</td>
              <td><?php echo $row_rsAccountDetails['Setting']; ?></td>
            </tr>
            <tr>
              <td>Building Name/Number</td>
              <td><?php echo $row_rsAccountDetails['buildingnumber']; ?></td>
            </tr>
            <tr>
              <td>Street Name</td>
              <td><?php echo $row_rsAccountDetails['streetname']; ?></td>
            </tr>
            <tr>
              <td>Address</td>
              <td><?php echo $row_rsAccountDetails['address3']; ?></td>
            </tr>
            <tr>
              <td>Town/City</td>
              <td><?php echo $row_rsAccountDetails['town']; ?></td>
            </tr>
            <tr>
              <td>Post Code</td>
              <td><?php echo $row_rsAccountDetails['postcode']; ?></td>
            </tr>
            <tr>
              <td>Region</td>
              <td><?php echo $row_rsAccountDetails['region']; ?></td>
            </tr>
            <tr>
              <td>Telephone</td>
              <td><?php echo $row_rsAccountDetails['telephone']; ?></td>
            </tr>
            <tr>
              <td>Email</td>
              <td><?php echo $row_rsAccountDetails['email']; ?></td>
            </tr>
            <tr>
              <td>Website</td>
              <td><?php echo $row_rsAccountDetails['WebAddress']; ?></td>
            </tr>
            <tr>
              <td>Password</td>
              <td> </td>
            </tr>
            <tr>
              <td>Logo</td>
              <td><img src="<?php echo $row_rsAccountDetails['Image']; ?>" alt="Logo" /></td>
            </tr>
            <tr>
              <td>Date Registered</td>
              <td><?php echo $row_rsAccountDetails['dateregistered']; ?></td>
            </tr>
          </table>
          <p>
            <input name="hiddenField" type="hidden" id="hiddenField" value="<?php echo $row_rsAccountDetails['RecruiterID']; ?>" />
          </p>
          <p>
            <input type="submit" name="Update" id="Update" value="Update Details" />
          </p>
          <p> </p>
        </form>
        <p> </p>
        <table width="600" border="0" cellpadding="3" cellspacing="3" class="postform">
          <tr>      </tr>
          <tr>      </tr>
          <tr>      </tr>
        </table>
        <p> </p>
    <p> </p>
    </div>
      <div class="sidebar2">
        <h4> </h4>
        <!-- end .sidebar2 --></div>
      <div class="footer">
        <p><a href="../index.php">Home</a> | <a href="../contactus.php">Contact us</a> | <a href="../PrivacyPolicy.php">Privacy</a> | <a href="../termsandconditions.php">Terms of Business</a></p>
        <p>&copy; theNurseryJobSite.com 2011</p>
        <!-- end .footer --></div>
      <!-- end .container --></div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($rsAccountDetails);
    ?>

    Hi
    You were right – I had to insert full path and it has worked so thanks.
    Would you be able to help me out with inserting the logo into a job post page and  the recordset I will need to insert the logo?
    Basically I want to add the logo that is uploaded when a client registers on the site onto a job info page.  To access the the details about a job, jobseekers just click on the job that interests them which takes them to the job details page which pulls all the information from the "Job" table in the database.  However, the logo is stored in the "image" field in the "Recruiter" table in the database.   I have tried setting up a recordset as:-
    SELECT Image
    FROM recruiters
    WHERE RecruiterID = colname
    (colname = $_GET['RecruiterID'])
    <?php require_once('../Connections/laura.php'); ?>
    <?php
    //initialize the session
    if (!isset($_SESSION)) {
      session_start();
    // ** Logout the current user. **
    $logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
    if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
      $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
      //to fully log out a visitor we need to clear the session varialbles
      $_SESSION['MM_Username'] = NULL;
      $_SESSION['MM_UserGroup'] = NULL;
      $_SESSION['PrevUrl'] = NULL;
      unset($_SESSION['MM_Username']);
      unset($_SESSION['MM_UserGroup']);
      unset($_SESSION['PrevUrl']);
      $logoutGoTo = "../index.php";
      if ($logoutGoTo) {
        header("Location: $logoutGoTo");
        exit;
    ?>
    <?php
    if (!isset($_SESSION)) {
      session_start();
    $MM_authorizedUsers = "Recruiter";
    $MM_donotCheckaccess = "false";
    // *** Restrict Access To Page: Grant or deny access to this page
    function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
      // For security, start by assuming the visitor is NOT authorized.
      $isValid = False;
      // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
      // Therefore, we know that a user is NOT logged in if that Session variable is blank.
      if (!empty($UserName)) {
        // Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
        // Parse the strings into arrays.
        $arrUsers = Explode(",", $strUsers);
        $arrGroups = Explode(",", $strGroups);
        if (in_array($UserName, $arrUsers)) {
          $isValid = true;
        // Or, you may restrict access to only certain users based on their username.
        if (in_array($UserGroup, $arrGroups)) {
          $isValid = true;
        if (($strUsers == "") && false) {
          $isValid = true;
      return $isValid;
    $MM_restrictGoTo = "../Unavailablepage.php";
    if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {  
      $MM_qsChar = "?";
      $MM_referrer = $_SERVER['PHP_SELF'];
      if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
      if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
      $MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
      $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
      header("Location: ". $MM_restrictGoTo);
      exit;
    ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $colname_rsDetails = "-1";
    if (isset($_GET['JobID'])) {
      $colname_rsDetails = $_GET['JobID'];
    mysql_select_db($database_laura, $laura);
    $query_rsDetails = sprintf("SELECT * FROM jobs WHERE JobID = %s", GetSQLValueString($colname_rsDetails, "text"));
    $rsDetails = mysql_query($query_rsDetails, $laura) or die(mysql_error());
    $row_rsDetails = mysql_fetch_assoc($rsDetails);
    $totalRows_rsDetails = "-1";
    if (isset($_GET['JobID'])) {
      $totalRows_rsDetails = $_GET['JobID'];
    mysql_select_db($database_laura, $laura);
    $query_rsDetails = sprintf("SELECT recruiters.Image, jobs.JobID, jobs.RecruiterID, jobs.jobtitle, jobs.`Position`, jobs.Nursery, jobs.branchlocation, jobs.ContactName, jobs.JobDescription, jobs.Location, jobs.town, jobs.employmenttype, jobs.Hours, jobs.qualifications, jobs.Salary, jobs.ContactNo, jobs.Email, jobs.dateposted  FROM jobs, recruiters WHERE JobID = %s", GetSQLValueString($colname_rsDetails, "int"));
    $rsDetails = mysql_query($query_rsDetails, $laura) or die(mysql_error());
    $row_rsDetails = mysql_fetch_assoc($rsDetails);
    $totalRows_rsDetails = "-1";
    if (isset($_GET['JobID'])) {
      $totalRows_rsDetails = $_GET['JobID'];
    mysql_select_db($database_laura, $laura);
    $query_rsDetails = sprintf("SELECT recruiters.Image, jobs.JobID, jobs.RecruiterID, jobs.jobtitle, jobs.`Position`, jobs.Nursery, jobs.branchlocation, jobs.ContactName, jobs.JobDescription, jobs.Location, jobs.town, jobs.employmenttype, jobs.Hours, jobs.qualifications, jobs.Salary, jobs.ContactNo, jobs.Email, jobs.dateposted FROM jobs, recruiters WHERE JobID = %s", GetSQLValueString($colname_rsDetails, "int"));
    $rsDetails = mysql_query($query_rsDetails, $laura) or die(mysql_error());
    $row_rsDetails = mysql_fetch_assoc($rsDetails);
    $totalRows_rsDetails = "-1";
    if (isset($_GET['JobID'])) {
      $totalRows_rsDetails = $_GET['JobID'];
    mysql_select_db($database_laura, $laura);
    $query_rsDetails = sprintf("SELECT recruiters.Image, jobs.JobID, jobs.RecruiterID, jobs.jobtitle, jobs.`Position`, jobs.Nursery, jobs.branchlocation, jobs.ContactName, jobs.JobDescription, jobs.Location, jobs.town, jobs.employmenttype, jobs.Hours, jobs.qualifications, jobs.Salary, jobs.ContactNo, jobs.Email, jobs.dateposted FROM jobs, recruiters WHERE JobID = %s", GetSQLValueString($totalRows_rsDetails, "int"));
    $rsDetails = mysql_query($query_rsDetails, $laura) or die(mysql_error());
    $row_rsDetails = mysql_fetch_assoc($rsDetails);
    $totalRows_rsDetails = mysql_num_rows($rsDetails);
    $colname_rsRecruiterID2 = "-1";
    if (isset($_GET['RecruiterID'])) {
      $colname_rsRecruiterID2 = $_GET['RecruiterID'];
    mysql_select_db($database_laura, $laura);
    $query_rsRecruiterID2 = sprintf("SELECT RecruiterID FROM recruiters WHERE RecruiterID = %s", GetSQLValueString($colname_rsRecruiterID2, "int"));
    $rsRecruiterID2 = mysql_query($query_rsRecruiterID2, $laura) or die(mysql_error());
    $row_rsRecruiterID2 = mysql_fetch_assoc($rsRecruiterID2);
    $totalRows_rsRecruiterID2 = mysql_num_rows($rsRecruiterID2);
    $colname_rsRecruiterID = "-1";
    if (isset($_SESSION['MM_Username'])) {
      $colname_rsRecruiterID = $_SESSION['MM_Username'];
    mysql_select_db($database_laura, $laura);
    $query_rsRecruiterID = sprintf("SELECT RecruiterID FROM recruiters WHERE email = %s", GetSQLValueString($colname_rsRecruiterID, "text"));
    $rsRecruiterID = mysql_query($query_rsRecruiterID, $laura) or die(mysql_error());
    $row_rsRecruiterID = mysql_fetch_assoc($rsRecruiterID);
    $totalRows_rsRecruiterID = mysql_num_rows($rsRecruiterID);
    $colname_Recordset1 = "-1";
    if (isset($_GET['RecruiterID'])) {
      $colname_Recordset1 = $_GET['RecruiterID'];
    mysql_select_db($database_laura, $laura);
    $query_Recordset1 = sprintf("SELECT Image FROM recruiters WHERE RecruiterID = %s", GetSQLValueString($colname_Recordset1, "int"));
    $Recordset1 = mysql_query($query_Recordset1, $laura) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    $query_rsJobs = "SELECT * FROM jobs";
    $rsJobs = mysql_query($query_rsJobs, $laura) or die(mysql_error());
    $row_rsJobs = mysql_fetch_assoc($rsJobs);
    $totalRows_rsJobs = mysql_num_rows($rsJobs);
    $colname_rsJobs = "-1";
    if (isset($_GET['Position'])) {
      $colname_rsJobs = $_GET['Position'];
    $varLocation_rsJobs = "-1";
    if (isset($_GET['Location'])) {
      $varLocation_rsJobs = $_GET['Location'];
    mysql_select_db($database_laura, $laura);
    $query_rsJobs = sprintf("SELECT `Position`, Nursery, Location, Salary, Email, ContactNo, JobDescription, JobID FROM jobs WHERE `Position` = %s AND jobs.Location = %s", GetSQLValueString($colname_rsJobs, "text"),GetSQLValueString($varLocation_rsJobs, "text"));
    $rsJobs = mysql_query($query_rsJobs, $laura) or die(mysql_error());
    $row_rsJobs = mysql_fetch_assoc($rsJobs);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Nursery and Childcare Jobs in the UK</title>
    <link href="../CSS/Global.css" rel="stylesheet" type="text/css" />
    <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="../SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    <!-- google adwards -->
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-6435415-4']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </script>
    </head>
    <body>
    <div class="container">
      <div class="header"><!-- end .header --><a href="../index.php"><img src="../Images/Logo.png" width="900" height="200" alt="the Nursery Job Site" /></a></div>
      <div class="navbar">  <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="thenurseryjobsite.php">About the Nursery Job Site</a>      </li>
          <li><a href="#" class="MenuBarItemSubmenu">Recruiters</a>
            <ul>
              <li><a href="Recruiterarea/recruiterbenefits.php">Benefits</a></li>
              <li><a href="Recruiterarea/recruiterfees.php">Fees</a></li>
              <li><a href="Recruiterarea/reclogin.php">Login</a></li>
              <li><a href="Recruiterarea/recreg.php">Register</a></li>
            </ul>
          </li>
          <li><a class="MenuBarItemSubmenu" href="#">Jobseekers</a>
            <ul>
              <li><a href="Jobseekerarea/jobseekerbenefits.php">Benefits</a>          </li>
              <li><a href="Jobseekerarea/jslogin.php">Login</a></li>
              <li><a href="Jobseekerarea/jobseekerreg1.php">Register</a></li>
            </ul>
          </li>
          <li><a href="contactus.php">Contact Us</a></li>
        </ul> </div> <!--end navbar div -->
      <div class="sidebar1">
        <p> </p>
        <div class="recruitsidebar">
          <ul id="MenuBar2" class="MenuBarVertical">
            <li><a href="postajob.php">Post a Job</a></li>
            <li><a href="recAccdetails.php?RecruiterID=<?php echo $row_rsRecruiterID['RecruiterID']; ?>">My Details </a></li>
            <li><a href="recruiterjobs1.php">My Jobs</a></li>
            <li><a href="Saferrecruitment.php">Safer Recruitment</a></li>
            <li><a href="Interview1.php" class="MenuBarItemSubmenu">Interviewing Staff</a>
              <ul>
                <li><a href="recInterviewquestions.php">Nursery Staff Interview Questions</a></li>
              </ul>
            </li>
            <li><a href="Nurseryjobsdescriptions.php">Nursery Job Descriptions</a></li>
            <li><a href="recruiterarea.php">Recruiter Home</a></li>
    <li><a href="<?php echo $logoutAction ?>">Log Out</a></li>
          </ul>
          <p> </p>
        </div>
    </div>
      <div class="content">
        <h1> </h1>
    <div class="detailheading" id="detailheading">
          <h1> </h1>
          <table width="564" border="0" align="center" cellpadding="3" cellspacing="3" id="headingtable">
            <tr>
              <td width="89" height="44" align="center" class="headertext"><h1>Nursery:</h1></td>
              <td width="283" class="headertext"><?php echo $row_rsDetails['Nursery']; ?></td>
              <td width="162" rowspan="2"><img src="<?php echo $row_Recordset1['Image']; ?>" alt="" name="nurserylogo" align="right" id="nurserylogo" /></td>
            </tr>
            <tr align="left" class="headertext">
              <td width="89" height="44" align="center"><h1 class="headertext">Job Title:</h1></td>
              <td align="left"><?php echo $row_rsDetails['jobtitle']; ?></td>
            </tr>
          </table>
          <p> </p>
        </div>
        <table width="568" border="0" align="center" cellpadding="3" cellspacing="3" class="detail" id="detailtable">
          <tr>
            <td width="162" scope="col">Job Title</td>
            <td width="381" scope="col"><?php echo $row_rsDetails['jobtitle']; ?></td>
          </tr>
          <tr>
            <td>Nursery</td>
            <td><?php echo $row_rsDetails['Nursery']; ?></td>
          </tr>
          <tr>
            <td>Branch Name/Location</td>
            <td><?php echo $row_rsDetails['branchlocation']; ?></td>
          </tr>
          <tr>
            <td>Location</td>
            <td><?php echo $row_rsDetails['Location']; ?>,<?php echo $row_rsDetails['town']; ?></td>
          </tr>
          <tr>
            <td valign="top">Job Description</td>
            <td><p> </p>
              <p><?php echo $row_rsDetails['JobDescription']; ?></p>
            <p> </p></td>
          </tr>
          <tr>
            <td>Qualifications Required</td>
            <td><?php echo $row_rsDetails['qualifications']; ?></td>
          </tr>
          <tr>
            <td>Employment Type</td>
            <td><?php echo $row_rsDetails['employmenttype']; ?></td>
          </tr>
          <tr>
            <td>Hours</td>
            <td><?php echo $row_rsDetails['Hours']; ?></td>
          </tr>
          <tr>
            <td>Salary</td>
            <td>£<?php echo $row_rsDetails['Salary']; ?></td>
          </tr>
          <tr>
            <td>Contact Number</td>
            <td><?php echo $row_rsDetails['ContactNo']; ?></td>
          </tr>
          <tr>
            <td>Email</td>
            <td><?php echo $row_rsDetails['Email']; ?></td>
          </tr>
          <tr>
            <td>Date Posted</td>
            <td><?php echo $row_rsDetails['dateposted']; ?></td>
          </tr>
          <tr>
            <td>Job ID</td>
            <td><?php echo $row_rsDetails['JobID']; ?></td>
          </tr>
        </table>
        <p><br />
        </p>
        <form id="recruiterjobsform" name="recruiterjobsform" method="post" action="recruiterjobs1.php">
          <input name="RecruiterIDjobs" type="hidden" id="RecruiterIDjobs" value="<?php echo $row_rsDetails['RecruiterID']; ?>" />
          <input type="submit" name="button" id="button" value="return to my jobs" />
        </form>
        <p> </p>
    <script type="text/javascript">
    var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
        </script><script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    <p> </p>
    </div>
      <div class="sidebar2">
        <h4> </h4>
        <!-- end .sidebar2 --></div>
      <div class="footer">
        <p><a href="../index.php">Home</a> | <a href="../contactus.php">Contact us</a> | <a href="../PrivacyPolicy.php">Privacy</a> | <a href="../termsandconditions.php">Terms of Business</a></p>
        <p>&copy; theNurseryJobSite.com 2011</p>
        <!-- end .footer --></div>
      <!-- end .container --></div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($rsDetails);
    mysql_free_result($rsRecruiterID2);
    mysql_free_result($rsRecruiterID);
    mysql_free_result($Recordset1);
    ?>

Maybe you are looking for

  • ADC 17" Studio LCD Dispaly.  2 inch vertical

    I just bought a used display model, just because of its looks. The new displays (aluminium) are like any other "john doe" displays. anyway long story short. As soon as I got this, hooked up the POWER MAC G4 733 Digital audio computer. After 2 minutes

  • Hand tool changes to article pointer

    I've read that when someone creates a pdf file with an article, this is what causes the Hand Tool to change in appearance and move/zoom the page when you click anywhere. This is one of the most annoying 'features' I've ever come across. I prefer to u

  • How do I get my image in "Now Playing" box?

    I've got a podcast called "Civil Air Patrol Today" and I'd like to get my show's logo in the "Now Playing" box in the lower-left corner of iTunes. Does anyone know how I do this? Is it something I set up in my xml file or somewhere else? Thanks, Chri

  • HP C3100 Series Printers - Fully functional drivers now available

    I just got the message below from HP. I am down loading version 9.7 as I type this message. It is supposed to be fully functional. *Everything works.* ============================= Software and Driver Update Dear valued HP customer, HP is committed t

  • Error download

    I receied an error message of A12E6 during a download of Photoshop.  I couldn't find that error message in any help forum.  Anyone know what this is or how to proceed?