Tell me how to format a date retrieved from a MS SQL Server 2000 database?

Tell me how to format a date retrieved from an MS SQL Server 2000 database for various uses in my JSP page?

Or if you want to use JSTL instead of a scriptlet see:
http://forum.java.sun.com/thread.jspa?threadID=676754&tstart=0

Similar Messages

  • How do i get a backed up db on sql server 2000 be restored on sql server 2014 express

    Is there a way with this? I'm getting a message that it is not supported when i'm trying to restore it.
    Is there a way that I could at least get the data on backed up db on sql server 2000 be transfer to sql server 2014 express if restoring is really not supported?
    Any advice is highly appreciated.

    You can restore first on any SQL Server 2008 or SQL Server 2008 R2 instance. This will only be used to convert the database backups from the older SQL Server 2000
    format which can’t be restored to SQL Server 2014 to the newer SQL Server 2008 / R2 format which can be.
    http://sqlmag.com/sql-server-2014/sql-select-steps-migrate-sql-server-2000-sql-server-2014

  • Manipulate data of a SQL SERVER 2000 database

    Problem:
    I need to manipulate data of a SQL SERVER 2000 database that it’s installed in a Windows
    from an oracle 8.1.7 database that is installed in a red hat linux server.
    This access has to be made in a procedure created in this Oracle instance.
    The Solution’s Environment:
    - oracle 8.1.7 database - red hat linux server - ORCL INSTANCE
    - SQL SERVER 2000 version 5.0 database - Windows server - SQLSERV INSTANCE
    - Oracle 8.1.7 database - windows 2000 professional server - HSDB INSTANCE
    We did the following steps:
    1) We installed an oracle database 8.1.7 in the windows 2000 professional.
    The name of this instance is HSDB.
    2) We configured the HSODBC resource in this HSDB instance so as to access the SQLSERVER database.
    3) It was created a database link in the ORCL instance (LINUX) so as to access the oracle HSDB instance
    4) It was created a procedure in the ORCL instance that insert data into the SQLSERVER database using the database link.
    This procedure pass through the following instances:
    ORCL Instance (database link) => HSDB Instance (HS Resource) => SQLSERV Instance
    5) When I execute this simple procedure of the ORCL Instance, the process takes a long time. Although if I run this insert on a SQL Plus, the transaction ends fast. Why it’s happening?
    PROCEDURE PRC_TESTE(P_CD_CMC7 IN VARCHAR2) IS
    BEGIN
    BEGIN
    INSERT INTO VSolicitacaoRetirada@MSSQLDB
    ("CMC7")
    VALUES
    (P_CD_CMC7);
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR '||SQLERRM);
    END;
    COMMIT;
    END;
    Tranks

    I modified the PRC_TESTE procedure and worked fine when I made the following change.
    In spite of using the P_CD_CMC7 parameter on the INSERT command, I included a fixed value. Althoug I can´t use this fixed value. What it can be?
    Example:
    CREATE OR REPLACE PROCEDURE PRC_TESTE(P_CD_CMC7 IN VARCHAR2)
    IS
    BEGIN
    BEGIN
    INSERT INTO VSolicitacaoRetirada@MSSQLDB
    ("CMC7")
    VALUES
    ('123456');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERRO NO INSERT '||SQLERRM);
    END;
    COMMIT;
    END;
    ------------------------------------------------------------

  • How can i connect to a SQL Server 2000 database usgin JSP?

    I need (URGENT) to connect to SQL Server 2000 databse using JSP. I do not know how to program using JSP, so if anyone has any code snippet please let me see it. What i need is to give my site some login/password security.
    Anyone?
    Thx.

    just create an ODBC of your database from control pannel -> administrative tools -> data sources (ODBC) ,double click it .....
    go to the tab SYstem DSN , click on ADD button. select the driver for your connection. it will be the last one in the list "SQL Server".
    click Next then give ur DSN name there, description and Server Name , on next give your username and password of SQL server. when it will be connected to the server celect your database from there and hence there will be an ODBC bridge same as in case of MS Access.
    code for connecting to ODBC is
    // DSN-NAME same as in System DSN.
    // username and password are of your databse
    try
              url = "jdbc:odbc:DSN-NAME";
              Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
              connect = DriverManager.getConnection( url,"username","password" );
              catch ( ClassNotFoundException cnfex ) {
                        setErrorMsg( cnfex.getMessage() );
              catch ( SQLException sqlex ) {
                        setErrorMsg( sqlex.getMessage() );
              catch ( Exception ex ) {
                        setErrorMsg( ex.getMessage() );
    Now you are connected to the SQL Server ..... use connect object for further processing .........

  • Data transfer from sybase to sql server

    Hi ,
    we are pulling data from sybase to sql server using ssis pacakges.
    a column of type bit in sybase is transferred as int in sql server.
    but because of that the value of sybase column as 1  is transfered as -1 in sql server till now .
    suddenly the value is now coming as 1 in sql server.
    can anybody tell me what could be going wrong here ?
    please help
    thanks in advance

    If its a bit field in sybase the corresponding datatype should be bit itself in SQLServer. Bit is boolean based data having values as only 0 and 1 (and NULL also if columns in nullable). int datatype can hold any integer data so they both are not same.
    Also a bit value of -1 is invalid and makes no sense
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Can not read Chinese data when DB Connect to SQL server 2000

    Hi,
       Our BW server( BW3.5 not unicode ) is installed on MS SQL server 2000. We try to connect the BW SQL server with db connect function. We create some test views in the Northwind DB. We are be able to access data from source system in rsa1 by db connect. The problem is that all the Chinese characters are displayed as ?????. Is there any special setting for accessing multibyte characters in MS SQL server 2000? Please advise.
    Thank you,
    Jeff

    The field of VIEW in the sqlserver which code is chinese must be the nvarchar.
    You can try it.

  • How to find Collation setting for Analysis services in Sql server 2000

    Hi
    Can some please guide me how do I check  Collation setting for Analysis services in Sql server 2000
    i need it to install Analysis servcies on my machine

    Hi SMV123,
    We can find the collation settings for Analysis services in SQL Server Management Studio (SSMS). Connect to the SSAS instance from within SSMS->Right click on the instance and select Properties->An Analysis Server properties page will appear. And then
    on the left hand side is a Language /collation option.
    Besides, here is a link about how to install SQL Server Analysis Services 2000 for your reference.
    How to Install SQL Server 2000 Analysis Servicese
    Regards,
    Charlie Liao
    Charlie Liao
    TechNet Community Support

  • Tg4msql - Blob Data Type Support(Oracle 8i - sql server 2000)

    hi,
    We are trying to replicate the data from oracle 8i to sql server 2000 through tg4msql.if we want to replicate the data thet contains the blob field , we are getting invalid expression in the procedure marked with error line.
    the procedure i am using is as follows
    CREATE OR REPLACE PROCEDURE INSERT_SQL
    AS
    BEGIN
    FOR VAL_CURSOR IN
    --Get the Data from the table with status 0
    SELECT rs_report_rowid FROM BIJU.rs_report where rs_report_status = 0
    LOOP
    for new_cursor in
    --get the details of the record with the row id
    select id ,name,DOB from biju.sample where rowid = val_cursor.rs_report_rowid
    LOOP
    ---insert the data from oracle to sql where the oracle data type contains blob(here photo field data type is blob).
    Error Line: insert into [email protected](id,name,photo) values(new_cursor.id,new_cursor.NAME,new_cursor.DOB);
    END LOOP;
    END LOOP;
    COMMIT;
    END;
    i want to know that tg4msql won't support the blob data type on the oracle end?we configured blob eqivalent in sql server as binary.Any help or suggestion regarding this are welcome..
    regards
    Srini

    Srini,
    Support for LOB was added in v9.2. It is not supported in 8i.

  • How to establish a trusted connection with JDBC for SQL SERVER 2000

    Hi!I am using jdk 1.4 and eclipse 3.3.
    I create a servlet in eclipse with in-build tomcat.
    When I run it ,it was working perfectlly has it was suppose to work.
    In this servlet I connect to a sql 2000 database using jdbc-odbc bridge driver.
    But when I tried to deploy the servlet on tomcat 5.5 manully on the same machine ,it gave me error saying
    [Microsoft][SQLServer JDBC Driver][SQLServer]Login failed
    for user 'sa'
    I searched around some post and found that ok ,I need trusted connection
    But I have 2 Questions
    1). Why was in eclipse I was able to connect to the SQL server and why not in the servlet which I deployed manully on tomcat.
    2). How do I create a trusted connection with JDBC for SQL server 2000
    Thnaks for your help in advance.

    Hi! duffymo ,QussayNajjar ,dvohra09 .
    Thank for help.
    The ideas are really great.
    I am trying generate reports for my company.
    When I used eclipse the code worked perfectly.
    below is code which I used
    out.println("Calling For Class Name<br>");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    out.println("Calling For Class Name success Now calling database <br>");
    1). jdbcConnection = DriverManager.getConnection("jdbc:odbc:SQLJasper");
    2). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb");
    3). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb","UID=UserName","Password=Password");
    out.println("connecting to database success<br>");
    I had tried to connect the database using this three way.
    In 1st I tried using DSN name .
    Next 2 self explainer for expert like you.
    I used to 2nd variant to connect in eclipse and it worked fine.
    I not an expert in java ,I just doing some research on jasperReport.
    My best guest is that eclipse is using some library files of which I have no clue.
    Thank's for your help,I appretiate it.
    Once again thank a billion.
    Sorry for the messy righting.

  • RFID Tag data retrieval from BEA RFID edge server.

    Hello All,
    I am working on the rfid appln.
    When i try to get the tag data from the reader, by default the tag data comes in the following format,
    <rawHex>urn:epc:raw:96.x964002000000000000000001</rawHex>;
    which has urn:epc:raw:96. appended to it. but we are interested only in the EPC number i.e. 964002000000000000000001
    Can some one please tell me how do we achieve this.
    I am executing the ImmediateSample. java file.
    Any help would be highly appreciated.
    Thanks,

    I have the same issue .
    Its very urgent for me to resolve. It s urgent

  • Please ... tell me how to download and instale the setup for the SQL Server Express 2012

    My OS is 32-bit and i have already downloaded the SQL Server 2012 Express but i cant find the SQL Server Management studio  so please tell me how can i get it?

    Hello Muhammad,
    if you already install SQL server, to run the Managment Studio you can click Start and Run, and type "SSMS".
    Of course you can create a shortcut and look for the file (this is the installation location you selected during the installation process) using the Windows search (pressing F3 activates the search).
    Tzuri Ben Ezra | My Certifications:
    CompTIA A+ ,Microsoft MCP, MCTS, MCSA, MCITP |
    FaceBook: Tzuri FaceBook | vCard:
    Tzuri vCard | 
    Microsoft ID:
    Microsoft Transcript 
     |

  • How to send PLAIN text email from sp_send_dbmail using SQL Server 2008 R2?

    I have configured Database Mail in SQL Server 2008 R2 (64) and it sends emails just fine. However the destination is recieving the body of thes message as Base 64 encoding.
    Snippet:
    EXEC msdb..sp_send_dbmail @profile_name='Outmail', @recipients = @recpts, @subject = @subj, @body_format = 'TEXT', @body=@body2;
    As you can see I set @body_format to TEXT, but it still sends Base 64. I need to send plain ASCII text. How can I change this?

    I am having this exact issue too.  I have a trigger that sends an email using a stored procedure.  The dbmail is sending the email using the Exchange 2010 server SMTP.  It does not login so the email is relayed as user = "Anonymous". 
    The SQL dbmail email header is showing the following:
    Content-Type: text/plain; charset="utf-8"
    Content-Transfer-Encoding: base64
    MIME-Version: 1.0
    X-MS-Exchange-Organization-AuthSource: MX01.domain.local
    X-MS-Exchange-Organization-AuthAs: Anonymous
    Here is the header if I send via Outlook profile using the legacy program I am trying to automate using SQL Server 2008R2:
    Content-Type: application/ms-tnef; name="winmail.dat"
    Content-Transfer-Encoding: binary
    MIME-Version: 1.0
    X-MS-Has-Attach:
    X-MS-Exchange-Organization-SCL: -1
    X-MS-TNEF-Correlator: <[email protected]>
    MIME-Version: 1.0
    X-MS-Exchange-Organization-AuthSource: MX01.domain.local
    X-MS-Exchange-Organization-AuthAs: Internal
    X-MS-Exchange-Organization-AuthMechanism: 03
    X-Originating-IP: [192.168.13.66]
    Any help would be greatly appreciated!

  • Data MIgration from Oracle to SQL Server 2005

    HI Gurus,
    Kindly please advice me how to migrate Data from oracle to MS SQL Server or Vice Versa.
    I came to know about 2 methods:
    1) Using SQL Developer
    2) USing ODBC.
    KIndly let me know which method is better. I am in confusion about both option
    Kindly advice over the same
    Thanks

    Usually such questions asked and answered on forums of a target system. In this case on MS SQL forums.
    But I will answer.
    You should create a LINKED SERVER in MS SQL that connects to Oracle.
    Then issue couple of SELECT * INTO <TARGET_TABLE> FROM <ORACLE LINKED SERVER>..<SRC SCHEMA>.<SRC TABLE>.
    Install Oracle Client and OLE DB driver on SQL Server machine.
    Also, Oracle is case sensitive by default. MS SQL is case insensitive by default. If there are primary/unique keys that have mixed case values in Oracle, then in MS SQL you need to set case sensitive collation for them.
    PS. If you need not only migrate data one time, but also to have a real time replication during an application transition period, you can take a look on heterogeneous replication solutions like Golden Gates or DataCurrents.

  • Data loading from Oracle to SQL Server

    Hi,
    I am trying to Push the data from Oracle which is running in HP-UNIX to SQL Server. But don’t know the efficient way to connect the SQL server from oracle which is running on HP-UNIX.
    I have heard about oracle Heterogeneous Connectivity but don’t know exactly how to implement it in Unix environment. If you have some guide of step by step process it will be really helpful.
    Thanks in advance.
    Regards,
    Sajal

    Hello,
    please start reading here about the Oracle Database Gateways products:
    http://www.oracle.com/technetwork/database/gateways/index-100140.html
    HowTo articles are available on My Oracle Support:
    How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX) (Doc ID 561033.1)
    How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX) (Doc ID 562509.1)
    Please read also this note:
    Functional Differences Between DG4ODBC and Specific Database Gateways (Doc ID 252364.1)
    The license for DG4ODBC is included in your RDBMS license, but you need to purchase a Third-Party ODBC driver for MS SQL Server.
    The license for DG4MSQL is not included in your RDBMS license.
    There is also a forum for the gateways:
    Heterogeneous Connectivity
    Regards
    Wolfgang

  • How to recover from mdf file (SQL Server 2000)

    Hi,
    My database corrupted because when I was running an update query, there is a power failure. After the computer booted, I cannot open the database anymore, it just not responding. Then I stop the sql server service, and tried to rename the .mdf and .ldf. After that it worked normally, but I need the data from the corrupted mdf file, I tried to attach the database but it just hanged. I even tried to attach without the .ldf file but it didn't work either, so I concluded that the problem is with the mdf file.
    Is there any way to recover my data ??
    Thanks in advance
    Regards,
    Edwin

    Try this undocumented stuff provided by Kevin [MS].
    ==========
    1. Back up the .mdf/.ndf files at first!!!
    2. Change the database context to Master and allow updates to system tables:
    Use Master
    Go
    sp_configure 'allow updates', 1
    reconfigure with override
    Go
    3. Set the database in Emergency (bypass recovery) mode:
    select * from sysdatabases where name = '<db_name>'
    -- note the value of the status column for later use in # 6
    begin tran
    update sysdatabases set status = 32768 where name = '<db_name>'
    -- Verify one row is updated before committing
    commit tran
    4. Stop and restart SQL server.
    5. Call DBCC REBUILD_LOG command to rebuild a "blank" log file based on the
    suspected db.
    The syntax for DBCC REBUILD_LOG is as follows:
    DBCC rebuild_log('<db_name>','<log_filename>')
    where <db_name> is the name of the database and <log_filename> is
    the physical path to the new log file, not a logical file name. If you
    do not
    specify the full path, the new log is created in the Windows NT system
    root
    directory (by default, this is the Winnt\System32 directory).
    6. Set the database in single-user mode and run DBCC CHECKDB to validate
    physical consistency:
    sp_dboption '<db_name>', 'single user', 'true'
    DBCC checkdb('<db_name>')
    Go
    begin tran
    update sysdatabases set status = <prior value> where name = '<db_name>'
    -- verify one row is updated before committing
    commit tran
    Go
    7. Turn off the updates to system tables by using:
    sp_configure 'allow updates', 0
    reconfigure with override
    Go
    ============

Maybe you are looking for

  • Trouble with Snow Leopard

    I tried to update my macbook to Snow leopard and it keeps installing and then restarting and then immediatly installing again. Is there anything I can do or am I screwed?

  • Need help Getting outlook activex vi to workin Windows 7

    Hi Folks, I was looking at a LV8.6 example that searches Outlook Email and Retrieve an Email's Subject, Body, and Return Address.  I can't get this to work in outlook 2010 with Windows 7.  when I execute using highlight execution with a know seach st

  • EPM services restart schedule

    Hi We have a new implementation of Hyperion Planning and I was wondering if there's any recommendations on how often a services restart ought to be performed as part of general system health? Cheers

  • How to change the TCP session limit for Domain Controllers in TMG2010

    I've many errors in TMG2010, that relates with too many TCP sessions, that are generated from my two domain controllers. how can i change since settings? Regards! Lasandro Lopez

  • OS 2.1.0.1526 - what a joke

    Disastrous update - none of my URLs play audio - many won't even load. cbc.ca live365.com I bought this thing to connect to the internet - it barely does that. Solved! Go to Solution.