How to save and retrieve an image in JSP/Java and MS SQL/server 2000?

Hi All,
I am uploading an image from the JSP page and want to store it in MS SQL server. I have made a column by the name "COMPANY_LOGO" with data type as image MS SQL/server 2000. How do I save the full image in the table and how do I display the thumb nail image on the JSP page???
Regards,
Raj

BEFORE YOU POST A TOPIC HERE: Please be sure your topic is related to features or functionality of this site. This forum is not for general technology questions. Not sure which forum to use? Try searching for your topic in the "Search Forums" element on the left panel.
Post your question in
http://forum.java.sun.com/forum.jspa?forumID=45
or
http://forum.java.sun.com/forum.jspa?forumID=48
Do not reply here

Similar Messages

  • Java and MS SQL Server 2000 problem, please help

    please help me. I am using java and MS SQL Server 2000, and I'm trying to access and verify the login. I'm getting the following error message: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
    Can any please help in this regard.
    String userNumber = (String)userNumField.getValue();
    char[] userPasswordArray = userPasswordField.getPassword();
    String userPassword = new String(userPasswordArray);
         try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Dikolobe_Data");
                java.sql.PreparedStatement statement = connection.prepareStatement(
                        "SELECT USER_NUMBER, USER_PASSWORD, USER_CLASS, USER_STATUS " +
                        "FROM SYS_USER " +
                        "WHERE (USER_NUMBER = ? AND USER_PASSWORD = ?);");
                statement.setString(1, userNumber);
                statement.setString(2, userPassword);
                java.sql.ResultSet result = statement.executeQuery();
                if(result.next()) {
                    String userStatus = result.getString(4);
                    if(userStatus.equals("logged on")) {
                        String loginErrorMessage = "User with number: " + userNumber + " is already logged on.";
                        javax.swing.JOptionPane loginErrorPane = getNarrowOptionPane(72);
                        loginErrorPane.setMessage(loginErrorMessage);
                        loginErrorPane.setMessageType(javax.swing.JOptionPane.ERROR_MESSAGE);
                        javax.swing.JDialog loginErrorDialog = loginErrorPane.createDialog(null, "Login Error");
                        loginErrorDialog.setVisible(true);
                    else {
                        String userClassification = result.getString(3);
                        if(userClassification.equals("Administrator")) {
                            AdminHomePage newAdminHomePage = new AdminHomePage();
                            newAdminHomePage.setVisible(true);
                        else if(userClassification.equals("Educator")) {
                            EduHomePage newEduHomePage = new EduHomePage();
                            newEduHomePage.setVisible(true);
                        statement = connection.prepareStatement(
                                "UPDATE SYS_USER SET USER_STATUS = ? " +
                                "WHERE USER_NUMBER = ?");
                        statement.setString(1, "logged on");
                        statement.setString(2, userNumber);
                        statement.executeUpdate();
                        dispose();
                }

    Doesn't the following link give you enough information?
    http://www.google.com/search?q=invalid+descriptor+index
    Anyway .. This error means that the given ResultSet column index which you're trying to retrieve the value from is out of the range.

  • Differnce Between Oracle 9i And MS SQL Server 2000

    Hi,
    What are the difference between Oracle 9i And MS SQL Server 2000.
    Thnaks

    Some links
    http://www.google.lv/search?hl=lv&q=oracle+sql+server+difference&meta=
    http://asktom.oracle.com/pls/asktom/f?p=100:1:487512552646613::NO:RP::
    http://www.mssqlcity.com/Articles/Compare/sql_server_vs_oracle.htm
    http://www.wisdomforce.com/dweb/resources/docs/MSSQL2005_ORACLE10g_compare.pdf
    But you have to remember one big thing - I've not seen yet one compare that was completely indifferent to any of the included DB's. So you can be sure that every doc that you get on MS website will say that SQL server is better, every doc on Oracle website will say that Oracle is better. Every doc on other websites will say that better DB either is:
    1) DB that has payed for the reserach paper
    2) DB that was mostly used by the researchers
    So of course you should be very cautious about each paper you get.
    Gints Plivna
    http://www.gplivna.eu

  • How to install and use sql server express 2014 with tools

    I am a student and have an assignment that requires I use either mysql or sql server, so I chose to download and install sql server express 2014 with tools, but after installation was complete all I can see is sql server 2014 import and export data (64-bit)
    and I have no clue what to do wiith it...I had used sql server 2008 a couple  of  years ago and it was easy, but this is very complicated, I have been trying to get this done for 2 days now, so someone please help me and tell me what I am doing wrong.

    Hi,
    It seems you did not installed complete software. Make sure you have downloaded below from
    SQL Server Express Download link
    Express with Advanced Services (SQLEXPRADV) when you click on Get started button on page displayed by clicking on above link. This download includes Sql Server Management Studio as well.
    Before moving I would Like you to first read
    Hardware and Software requirements
    Please refer 
    how to install SQL server 2014 express
    Above Link is for Enterprise edition  but you can use it for express as well. When you reach page feature selection please select all features to install.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • How to connect Java and Microsoft SQL Server 2000

    hi,
    could anyone please teach me how to connect Java and SQL Sever 2000?? if possible could you guys provide me with an example??? i could hardly find any relevant resources about it...
    Thanks ~!

    thanks for the information...
    by the way hv any working module on it?? i'm new to
    both Java and Microsoft SQL Server... Thanks againFirst things first... you should read this:
    http://java.sun.com/docs/books/tutorial/jdbc/
    This is microsofts official JDBC Driver: http://www.microsoft.com/sql/downloads/jdbcregister.asp
    Install it and the documentation has some usage examples

  • Move datafiles and logfiles (Portal 6.0 and Microsoft SQL Server 2000)

    Hello,
    I have installed EP 6.0 with KMC and TREX. The database is MS SQL Server 2000.
    The datafiles and the logfiles of the portal are respectively located in the directory "C:\Program Files\Microsoft SQL Server\MSSQL\Data" and in "C:\Program Files\Microsoft SQL Server\MSSQL\LOG".
    I want to move these files in the disk D.
    How can I do it ?
    Is the procedure described in the site http://support.microsoft.com/kb/224071 correct ?
    I thank you for your help.
    Regards,
    Anne-Marie

    Francesc,
    Microsoft Exchange Server Integration in EP6.0
    The Microsoft Exchange server (subsequently called the Exchange server) is integrated using the Microsoft Exchange server transport. This transport integrates the scheduling capabilities of Exchange Server with SAP Enterprise Portal 6.0. The following versions of Microsoft Exchange server can be integrated with the Enterprise Portal.
    · Exchange Server 5.5 SP4
    · Exchange Server 2000
    · Exchange Server 2003
    The transport uses Microsoft Collaborative Data Objects 1.2.1 (subsequently called CDO) to access data from the Exchange server.
    You can check for more details on;
    http://help.sap.com/saphelp_nw04s/helpdata/en/7a/ec015c8446d447a83776d40f31c84f/frameset.htm
    Regards,
    James

  • XA and MS SQL Server 2000

    I am currently working on a project that proposes to use XA transactions with MS
    SQL Server 2000. I have been searching for information on this subject and have
    found information that worries me with regard to MS SQL Server 6.5 and XA transactions.
    The information I have gathered argues against using MS SQL Server 6.5 with XA
    transactions, mainly because it allows only 1 active transaction at a time.
    Does anyone have any information as to whether MS SQL Server 2000 has the same
    problem? I am thinking of suggesting a different XA RM as I have found no information
    stating the contrary.
    Many Thanks,
    Mick.

    Mick;
    I have already tried SQL Server with Tuxedo, and believe: it´s works, but I still
    try it using Tuxedo with a big load.
    The file attached has two source files with a short comments explain how to do,
    and what to do.
    If you prefer, I can send you the MSVC++6 Project
    My regards,
    Andre David
    Systems Engineer
    "Anthony Fryer" <[email protected]> wrote:
    >
    If it still uses the 'dbenlistxatrans' function, then I think it's a
    safe bet to
    say that it still is a poor mans XA. Avoid SQL Server and XA is a good
    rule of
    thumb.
    "Mick Fisher" <[email protected]> wrote:
    I am currently working on a project that proposes to use XA transactions
    with MS
    SQL Server 2000. I have been searching for information on this subject
    and have
    found information that worries me with regard to MS SQL Server 6.5 and
    XA transactions.
    The information I have gathered argues against using MS SQL Server 6.5
    with XA
    transactions, mainly because it allows only 1 active transaction ata
    time.
    Does anyone have any information as to whether MS SQL Server 2000 has
    the same
    problem? I am thinking of suggesting a different XA RM as I have found
    no information
    stating the contrary.
    Many Thanks,
    Mick.
    [source_example_using_sqlserver.zip]

  • Problem of Teststand3.1 database and microsoft SQL Server 2000 personal edition

    I have a problem when using teststand database function with Microsoft sql server 2000. the error(seen in attached screenshot3.jpg) is:
    "An error occurred calling 'LogResults' in 'ITSDBLog' of 'DBLog 1.0 Type Library'
    An error occurred executing a statement.
    Schema: Generic Recordset (NI).
    Statement: UUT_RESULT.
    [Microsoft][ODBC SQL Server Driver][SQL Server]unable to insert NULL value to column "ID", table "test.dbo.UUT_RESULT";This column is not alowed to be blank. INSERT Failed. Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    [Microsoft][ODBC SQL Server Driver][SQL Server]terminated.
    Source: TSDBLog"
     Here I listed my proceess.
    1, Configure in SQL Sever, please see attached screenshot0.jpg
       a, Open SQL
       b, build a new database with the name of test
       c, import the data from "C:\Program Files\National Instruments\TestStand 3.1\Components\NI\Models\TestStandModels\Database\TestStand Results.mdb"
    2, Configure Microsoft SQL sever: please see attached screenshot1.jpg
       a, Open windows Control Panel and select "Data Sources (ODBC). Under system DSN tab, add a SQL server data source
    3, Configure teststand database option, see attached screenshot2.jpg
       a, configure logging option, enable
       b, configure datalink
       c, select schemas of "Generic recordset (NI)
       d, No change on the tabs of "statements" and "Columns/Parameters"
    4, run an seqence file with the proess model of SequentialModel.Seq.
    Attachments:
    Screenshot.zip ‏425 KB

    Thanks Scott,
      The database function is OK now after I changed imported tables in SQL Sever.
      Actually, I once tried anothor method that you refered by using the scripts
    located at: <TestStand>\Components\NI\Models\TestStandModels\Database\SQL Server Create Generic Recordset Result Tables.sql. Attached is the error screenshots, please help me on this.
    Thanks
    Jacky
    Attachments:
    Error.jpg ‏59 KB

  • WebLogic Server 7.0 and MS SQL Server 2000

    Hi,
    I'm trying to create a connection pool in WebLogic Server 7.0 for MS SQL Server
    2000, but I always get the following error message:
    <Error> <JDBC> <001060> <Cannot startup connection pool "mcp-ConnectionPool
    " weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2823)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:44)
    When I try to connect to the database with dbping, I get the following error:
    Error encountered:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    I'm able to connect to the same database with WebLogic Server 6.0 (SP2) using
    the exact same settings. Does anyone have an idea of what is wrong here? Do I
    need an updated driver?
    Here is an extract from my config file:
    <JDBCConnectionPool CapacityIncrement="5" DriverName="weblogic.jdbc.mssqlserver4.Driver"
    LoginDelaySeconds="5" MaxCapacity="20" Name="mcp-ConnectionPool" Password="{3DES}A4GocdgagGc="
    Properties="user=JavaUser" Targets="myserver"
    Any help would be greatly appreciated,
    Koen

    Hi. This is very odd. Would you please try a simple standalone program,
    such as below? Tell me what it does in both environments.
    Joe
    import java.sql.*;
    import java.util.*;
    public class foo
    public Connection connection;
    public static void main(String args[])
    throws Exception
    Connection c = null;
    try
    Properties properties = new Properties();
    properties.put("user", "sa"); // change for your properties...
    properties.put("password", "");
    properties.put("server", "QA75");
    Class.forName("weblogic.jdbc.mssqlserver4.Driver").newInstance();
    c = DriverManager.getConnection("jdbc:weblogic:mssqlserver4", properties);
    System.out.println("got a connection.");
    catch(Exception exception1)
    exception1.printStackTrace();
    finally
    if (c != null)
    try { c.close(); } catch(Exception ex) {}
    Koen Van hamme wrote:
    Hi,
    I'm trying to create a connection pool in WebLogic Server 7.0 for MS SQL Server
    2000, but I always get the following error message:
    <Error> <JDBC> <001060> <Cannot startup connection pool "mcp-ConnectionPool
    " weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2823)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:44)
    When I try to connect to the database with dbping, I get the following error:
    Error encountered:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    I'm able to connect to the same database with WebLogic Server 6.0 (SP2) using
    the exact same settings. Does anyone have an idea of what is wrong here? Do I
    need an updated driver?
    Here is an extract from my config file:
    <JDBCConnectionPool CapacityIncrement="5" DriverName="weblogic.jdbc.mssqlserver4.Driver"
    LoginDelaySeconds="5" MaxCapacity="20" Name="mcp-ConnectionPool" Password="{3DES}A4GocdgagGc="
    Properties="user=JavaUser" Targets="myserver"
    Any help would be greatly appreciated,
    Koen

  • Siebel 8.1 and MS SQL Server 2000

    I am upgrading our Siebel 7.8 instance running on MS SQL Server 2000 to Siebel 8.1 and MS SQL Server 2008. My original intent was to upgrade the database first (so that we would be runing Siebel 7.8 on MS SQL Server 2008), and then upgrade the application to 8.1.
    I have been running into resource issues with regard to the SQL Server upgrade. My question is:
    Can Siebel 8.1.1 run on MS SQL Server 2000?
    Thanks.
    -- Ken

    Hi
    You can migrate your 7.8 to MSSQL 2008 as this is a supported platform.
    Usually in an upgrade you will upgrade your development db platform as a source of your 8.1 upgrade process.
    For information, a reference document is the Siebel System Requirements and Supported Platforms aka SRSP
    [SRSP 7.8|http://download.oracle.com/docs/cd/E11886_01/V7/CORE/SRSP_78/SRSP78.pdf]
    [SRSP 8.1| http://download.oracle.com/docs/cd/E11886_01/V8/CORE/SRSP_81/SRSP_81.pdf]
    Please refer to the online version as this document is frequently updated.
    Enjoy
    Evtloglvl

  • Query Engine report error with Crystal Report 9 And MS SQL SErver 2000

    Hi,
    Currently I m doing a report with Crystal Report 9 and MS SQL as back End.I used a stored procedure to fetch data from DB.The Stored procedure works properly with query analyzer . But when I take report through application
    "Table Not Found" Error is coming.Later I Found that In stored procedure for certain conditions only this error comes.But I cant resolve it.
    Can any One check any pblm with this query
    ELSE IF ISNULL(@intSourceID,0) = 10 Or ISNULL(@intSourceID,0) = 11 Or ISNULL(@intSourceID,0) = 12 Or ISNULL(@intSourceID,0) = 13 Or ISNULL(@intSourceID,0) = 14  
    BEGIN
    IF ISNULL(@intSchemeID,0) <> 0  
    BEGIN
    Select* From table
    END 
    ELSE IF ISNULL(@intSchemeID,0) = 0  
    BEGIN
    Select 
    END 
    END
    When I comment the above codes , report works fine....
    Can any one help me....plz....I m in such a critical situation...

    Hi,
    Currently I m doing a report with Crystal Report 9 and MS SQL as back End.I used a stored procedure to fetch data from DB.The Stored procedure works properly with query analyzer . But when I take report through application
    "Table Not Found" Error is coming.Later I Found that In stored procedure for certain conditions only this error comes.But I cant resolve it.
    Can any One check any pblm with this query
    ELSE IF ISNULL(@intSourceID,0) = 10 Or ISNULL(@intSourceID,0) = 11 Or ISNULL(@intSourceID,0) = 12 Or ISNULL(@intSourceID,0) = 13 Or ISNULL(@intSourceID,0) = 14  
    BEGIN
    IF ISNULL(@intSchemeID,0) <> 0  
    BEGIN
    Select* From table
    END 
    ELSE IF ISNULL(@intSchemeID,0) = 0  
    BEGIN
    Select 
    END 
    END
    When I comment the above codes , report works fine....
    Can any one help me....plz....I m in such a critical situation...
    Refer the above statement highlighted in BOLD. That statement is WRONG. Select what ???? Try any one of the below statement,
    select ''
    --or
    select 0
    --or
    select null
    Regards, RSingh

  • Oracle 8i and Ms SQL Server 2000

    Hi
    I have the problem that we need to install a Oracle 8i Application Server on a Microsoft
    Windows 2000 Server Sp4 whit have an Microsoft SQL Server 2000 Sp3 on it
    The installation runs well, but the Net8 Configuration don´t finish.
    Know anybody a solution for this?

    MSs Jdbc Driver still requires Jdbc-Odbc bridge.
    Just go thru the URL,
    http://www.weblogic.com/docs/techsupport/faq/jdbckona_m
    sqlserver.html#bridge
    Hope this helps.
    SudhaThanks for the URL, but I think this page does not refer to the beta-JDBC driver which MS has made available recently. For instance it says that Microsoft's driver is a type 2 driver, while in reality it is type 4.
    Misja

  • How to connect to Ms SQL Server 2000 with forms9i......

    hi,
    how do i connect my forms9i to the database in the Ms SQL Server 2000 on the same machine ?
    please give a code example also
    thanks
    regards
    monty

    See
    http://www.oracle.com/technology/products/forms/pdf/275201.pdf
    Also search the forum and you will find discussions on this topic.

  • JDBC and MS SQL Server support

    Hi everyone,
    I'm using JDBC to access a MS SQL Server DB. To be more precise, I tried both the MS JDBC SQL Server driver as well as jTDS. Here's the question:
    I'm using scrolling and committable cursors. My application could definetely make good use of full detection of inserted, updated and deleted rows - that is, I would like to use
    ResultSet.rowInserted()
    ResultSet.rowUpdated()
    ResultSet.rowDeleted()
    to automatically detect each row's status. The problem is the following:
    DatabaseMetaData.insertsAreDetected() returns false
    DatabaseMetaData.updatesAreDetected() returns false
    DatabaseMetaData.deletesAreDetected() returns true
    i.e. I can only detect deletes using either of the two above mentioned drivers.
    Of course, I could construct an enhanced ResultSet class mimicking the behaviour I want, but I'd rather not.
    The question is: Does anyone know a JDBC MS SQL Server driver supporting automatic insert, update AND delete detection?
    If so, please give me a pointer.
    TIA,
    Carsten

    I am in serious problem.
    Jdbc doesnot support database connections without DSN.
    Oracle and MS SQL Server 2000 both provides ADO for
    connecting with their databases without DSN. But Java
    doesnot support ADO.
    Can anyone help me out?
    I never use a DSN when connecting to Oracle. Nor is ADO used.
    But then I do use the drivers that Oracle supplies.
    And there are a number of MS SQL Server drivers, and they don't use DSN nor do they use ADO.

  • Eclipse jtDS and Sql Server 2000

    Hi everyone,
    i use eclipse 2.1 as ide and ms sql server 2000 as database server. But i couldnt connect mssql server with jtds.
    where shall i put the .jar with jtds comes? Which settings shall i do?
    Thanks a lot...

    There should be WEB-INF directory under each web application( project in eclipse).
    expand the project and expand WEB-INF directory, you will see lib directory.
    If lib directory does not exist,create one lib directory as it wll be automatically included in CLASSPATH on starting the ap server.
    then keep teh jtds jar file in the lib directory.
    Cheers
    Varma Dandu.

Maybe you are looking for

  • Oracle 8.0.5.1 EE DBMS_JOB Problem

    I am running Oracle 8.0.5.1 EE on Redhat Linux version 6.1 with the glibcpatch applied. I have come across a problem with regular execution of submitted jobs. I submit a job(any job) and when execution time comes, it fails. I have dbms_job setup corr

  • How do i transfer my data from my old ipad to my new mac

    how do i

  • Can't import mbox file into Mail anymore

    Hi all, I am getting nowhere with this issue...I have archived my Apple Mail inbox and then turned around and imported it into Apple Mail (so as to have it on the local computer, not the network) many times in the past. It no longer works. I got to F

  • Exchange ActiveSync doesn't have sufficient permissions

    In one of our cas servers getting the following error. Anybody have any idea why this error kindly share. Exchange ActiveSync doesn't have sufficient permissions to create the "CN=a,OU=b-Administrators,DC=comany,DC=domain,DC=domain " container under

  • WDS available for new Airport Extreme

    Apple has posted the setup guides for the new Airport Extreme and according to those manual, WDS (Wireless Distrubtion System) is available for those systems. In fact, it specifically says it can WDS with the Airport Express and older Airport Extreme