Caching data read from database

I have a big performace problem in our J2EE application. We use jsp and servlets to process a request. Servlet gets the results from database which are stored in a vector of dataobjects and vector is stored in session. We display only 20 rows in jsp and provide page navigation to view more data by Next and Prev links. The problem is we want to store results in request object instead of session variable but then that data is not availabe for Next and Prev links. We don't want to do another search to view more data. Is there a way to cache the data so that while view more data by page navigation we don't need to hit database since request object would be cleared at that time. I am clueless. I hope I explained the problem properly. Any help on this would be highly appreciated

You're not clueless, you said it yourself.
To make info available over multiple requests, you need to use a session variable rather than the request.

Similar Messages

  • Data read from undo

    hi,
    how to find the data read from undo tablespace.
    how to find the data read from datafile.
    any select statement read from redo log or not. i think no,is it correct
    thanks
    with regards

    user3266490 wrote:
    hi,
    thanks for reply.
    What does it mean by "how to find data read" ?
    that means how  to find the a select statement  whether read from data buffer cache or data file*
    even if it is read from data file.first kept in buffer then return to userYes , data is always going to be read from teh buffer cache only , even if its going to be a physical read too.
    In case you want to see that there was a PIO involved or logical IO( from teh cache), you can check so by seeing the stats for the query like below
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 21 11:59:39 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.
    Total System Global Area  167772160 bytes
    Fixed Size                  1247900 bytes
    Variable Size              75498852 bytes
    Database Buffers           88080384 bytes
    Redo Buffers                2945024 bytes
    Database mounted.
    Database opened.
    SQL> conn aman/aman
    Connected.
    SQL> set autot trace stat
    SQL> select * from scott.emp;
    14 rows selected.
    Statistics
            455  recursive calls
              0  db block gets
             83  consistent gets
             10  physical reads                      <----------------------- This went to disk first to read the data
              0  redo size
           1415  bytes sent via SQL*Net to client
            381  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              6  sorts (memory)
              0  sorts (disk)
             14  rows processed
    SQL> select * from scott.emp;
    14 rows selected.
    Statistics
              0  recursive calls
              0  db block gets
              8  consistent gets
              0  physical reads                    <---------------No PIO, which means it was accessed truly from the cache and didn't involve disk IO at all.
              0  redo size
           1415  bytes sent via SQL*Net to client
            381  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
             14  rows processed
    SQL>HTH
    Aman....
    Edited by: Aman.... on May 21, 2009 11:58 AM

  • ImageIcons read from database don't appear

    Hi,
    I create a JavaBean to show images from filesystem and database (oracle9i) in a JTable.
    The ImageIcons loaded from filesystem appear fine whith my defined DefaultTabelModel.
    The ImageIcons read from database (jdbc2) with the same DefaultTabelModel appear in the correct count, but the fields or placeholders of the Images, saved as blob, are blank.
    The partcode of my resultset is
    BLOB myblob = null;
    int bufsize = 0;
    while(result.next())
    myblob = ((OracleResultSet)result).getBLOB("image_container");
    bufsize = myblob.getChunkSize();
    byte[] buffer = new byte[bufsize];
    ImageIcon icon = new ImageIcon(buffer);
    Object [] row = {icon};
    model1.addRow(row);
    model1.fireTableDataChanged();
    I don't get any errors.
    Thanks
    Klaus

    Hi,
    I changed the datatype from BLOB to 'LONG RAW' for the image in the database.
    while(result.next())
    byte[] bytes = result.getBytes(1);
    String jd = String.valueOf(bytes);
    System.out.println(jd);
    //get:[B@153 [B@154
        //or [B@155 [B@156 for the 2.result
        String name = result.getString(2);
        System.out.println(name);
        //get the correct result
        FileOutputStream file = null;
        file = new FileOutputStream ("c:\\"+name+".jpg");
        file.write(bytes);
        //it works fine !!!
        ImageIcon icon = new ImageIcon(bytes);   //it is correct ?
        String ls = String.valueOf(icon.getImageLoadStatus());
        String h = String.valueOf(icon.getIconHeight());
        String w = String.valueOf(icon.getIconWidth());
        System.out.println(h+" : "+w);
        //get: -1 : -1
        System.out.println(ls);
        //get: 4
        Object [] row = {icon,name};
    //icon is blank, name appears correct in jtable
    //but when I need:
    //ImageIcon icon = new ImageIcon(AW_Frame.class.getResource("images/emac.jpg"));
    //icon and name appears correct in jtable
    model1.addRow(row);
    model1.fireTableDataChanged();
    any ideas ?
    Thanks in advance !

  • Weblogic 11G error = BEA-000449  Closing socket as no data read from it

    In My Weblogic 11G, i am getting Warning msg in my log file saying Closing socket as no data read from it
    ####<Nov 2, 2010 12:10:53 AM IST> <Warning> <Socket> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <1288636853607> <BEA-000449> <Closing socket as no data read from it on 95.66.7.15:58,089 during the configured idle timeout of 25 secs>
    ####<Nov 2, 2010 12:10:53 AM IST> <Warning> <Socket> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <1288636853607> <BEA-000449> <Closing socket as no data read from it on 95.66.7.15:58,088 during the configured idle timeout of 25 secs>
    ####<Nov 2, 2010 12:21:37 AM IST> <Info> <JDBC> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '23' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <1288637497701> <BEA-001128> <Connection for pool "IB_JDBC_Data_Source" closed.>
    I have follow the following step
    If you want to follow this solution. Go to Admin console -> Click on Domain->Configuration->Log Filters->create new Log filter.
    I added this line in expression "(MESSAGE !='Closing socket as no data read from it during the configured idle timeout of 5 secs')"
    Go to your server-(for each server you have to set it individually)->Logging->Advanced->Select this log filter for Standard Out or log file.
    My Filter is "(MESSAGE !=Closing socket as no data read from it ')"
    this is not working in weblogic 11G, any one have the solution to stop this msg.
    Edited by: Amar_Shaw on Nov 3, 2010 1:40 PM

    Hi Amar,
    I think you have given the wrong string in the filter, you are getting "*Closing socket as no data read from it on 95.66.7.15:58,089 during the configured idle timeout of 25 secs*" and you have given in the filter "*Closing socket as no data read from it during the configured idle timeout of 5 secs*".
    You can change it and see if that works for you.
    Also the above option is just to suppress the issue which are getting which in this case is fine as its just a warning message, however you can even try to tune few of the follwoing parameters that too would help you to remove this warning message.
    1. Set the parameter -Dweblogic.client.socket.ConnectTimeout=XXX, in the start-up script of the server which you are seeing this issue under JAVA_OPTIONS
    Note: Where "XXX" is the value in ms.
    Example:
    -Dweblogic.client.socket.ConnectTimeout=500
    2. Try tuning the duration time to a higher value from the below Console path
    Server -> Protocols (tab) -> HTTP (sub-tab) -> Duration
    Regards,
    Ravish Mody
    http://middlewaremagic.com/weblogic/
    Middleware Magic | Come, Join Us and Experience The Magic…

  • BEA-000449  Closing socket as no data read from it

    This error message is filling up the server log files. It looks like some network problem. How can I find the cause ? This does not create a functional problem, but I am sure there will be a performance problem. Also, since this message is filling up the logs rapidly, I cannot see my regular application debug statements.
    <Warning> <Socket> <myserver.mydomain.net> <my_managedserver_01> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1218554019557> <BEA-000449> <Closing socket as no data read from it during the configured idle timeout of 30 secs>
    The timeout of 30 seconds is the value set in Login Timeout in server tuning tab.
    Environment:
    WebLogic Portal 10.0 MP1 (The domain is a server domain, not portal domain)
    Red Hat linux 4
    Intel Xeon
    Message was edited by:
    prakashp

    In My Weblogic 11G, i am getting Warning msg in my log file saying Closing socket as no data read from it
    ####<Nov 2, 2010 12:10:53 AM IST> <Warning> <Socket> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1288636853607> <BEA-000449> <Closing socket as no data read from it on 95.66.7.15:58,089 during the configured idle timeout of 25 secs>
    ####<Nov 2, 2010 12:10:53 AM IST> <Warning> <Socket> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1288636853607> <BEA-000449> <Closing socket as no data read from it on 95.66.7.15:58,088 during the configured idle timeout of 25 secs>
    ####<Nov 2, 2010 12:21:37 AM IST> <Info> <JDBC> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '23' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1288637497701> <BEA-001128> <Connection for pool "IB_JDBC_Data_Source" closed.>
    I have follow the following step
    If you want to follow this solution. Go to Admin console -> Click on Domain->Configuration->Log Filters->create new Log filter.
    I added this line in expression "(MESSAGE !='Closing socket as no data read from it during the configured idle timeout of 5 secs')"
    Go to your server-(for each server you have to set it individually)->Logging->Advanced->Select this log filter for Standard Out or log file.
    this is not working in weblogic 11G, any one have the solution to stop this msg.

  • Having problem with adding and reading dates to/from database !!!

    Hi
    I am new in J2ME
    I am trying to code a simple software.
    My problem is with dates.
    I have a datefield on my menu and the user will choose the date from here. By default, datefield shows todays date. But when I try to write that date to database using rms, date value transforms to java.util.Date@acfdb0fe.
    As I read from tutorials this is common problem of date class, so I tried to use calendar class.
    But with Calendar class I cannot let user to choose date from screen like DateField. datefield dowsn't work with calendar.
    later, I will use that date for sorting records
    Summary : I need a sample code that read date from screen (preferably with datefield), write it to recordstore. and then read it from recordstore asnd write to screen.
    I searching internet for a sample code through days.
    Please help me
    Thanks

    Hi,
    The best i would suggest is instead of storing the date as 19 Jan 2004 or something like this better store the date in milliseconds.
    DateField df = new DateField();
    Date d = df.getDate();
    long ms = d.getTime();
    store the value of ms in RMS. This is the commonly used way to store date in RMS for j2me.
    You can get back date using
    Date d = new Date(ms);
    DateField df = new DateField();
    df.setDate(d);
    Prabhu.

  • Reading Data Clusters from Database ??

    Hi at all,
    how can I read Data from a ClusterTable´`?
    In the Database "STXL" is a field "CLUSTR" and "CLUSTD" and i want see the input. But before i can see it, i must read this Data Cluster.
    How does it work``?
    IMPORT tab = itab
    FROM DATABASE stxl(tx)
    ID   wa_TDOBJECT
    TO wa_stxl.

    well, normally you got FM´s which enable you to do selects or whatever with cluster tables.
    in your case it would be FM READ_TEXT or related FM´s. I do ABAP programming for quite a while now, and i never came to the situation where i manually had needed to read a cluster table.

  • Ignoring cache - selecting directly from database

    I have a scenario where several tables will be mapped using Toplink for the data access benefits, but will be updated ouside of the Toplink process. Obviously this behavior negates the beneift of caching in toplink and I need a reliable way to bypass the cache when selecting from these tables.
    The only method I've found in my testing to overcome this problem is to select "Always Refresh" and "Disable Cache Hits" on the related entities in the Toplink Mapping Workbench. All other configurations, including setting the identity map size to 0 will return stale instances of these objects.
    I've also tried invoking dontCheckCache() and setCacheUsage() on my query with the understanding, based on the API documentation, that the cache would be ignored for the query. In both cases the returned object was retrieved from the cache and not the database.
    While the workbench solution will suffice for my purposes, I would like to know if there are other methods of ignoring the cache. Also, I'm curious about why the query methods I've mentioned don't seem to have any affect on the source of the resulting objects.
    I am using Toplink v9.0.3

    Using "Always Refresh" and "Disable Cache Hits" is probably the best method to ensure that no cached data is every returned from queries. If you are using optimistic locking you may also use "onlyRefreshCacheIfNewerVersion" in conjunction with these.
    For the full/weak identity maps the size is only the default map size, it will grow as objects are added, so setting this to 0 will have no effect on what is cached, you could set the cache type to NoIdentityMap ("None") to achieve this, but usage of alwaysRefreshCache is a better way as is still preserves object identity.
    The query options dontCheckCache() and setCacheUsage() are in-memory querying options, they effect how cache hits are obtained, but do not effect how the objects are cached or refreshed. To refresh objects at the query level use refreshIdentityMapResult() ("Refresh"). Using refresh at the query level should also meet your needs, and may be better than setting the alwaysRefreshCache option on the descriptor as then you can control which queries refresh and which can obtain cache hits. (for example you may want to query for employees to refresh, but allow the query for the 1-1 backreference for phone numbers to obtain a cache hit). For refresh queries you can also set the refresh cascade depth.

  • Excel data read from users and upload in to Oracle DB using custom webpart

    Hi Team,
    I need to get the excel date from user using file upload control and read the data from the excel using custom webpart and validate the each rows whether having the values or not and need to upload the data to the oracle database.
    Can you please let me know the best approach to read the data from excel using sharepoint custom webpart.
    Thanks,
    Mylsamy

    Hi,
    According to your post, my understanding is that you want to read excel data from the uploaded file and insert the data into Oracle Database.
    The following way for your reference:
    1.Create a Visual Web Part using Visual Studio.
    2. Add an asp.net upload control into the .ascx file.
    <div>
    <asp:FileUpload ID="fileupload" runat="server" />
    <asp:Button ID="btnUpload" runat="server" onclick="btnUpload_Click" Text="Upload" />
    </div>
    3. Add some logic methods into .ascx.cs file.
    protected void btnUpload_Click(object sender, EventArgs e)
    //read data and insert the data into Oracle database.
    4.We can create a web service for adding data to Oracle database, then consume this web service in the visual web part.
    More information:
    http://msdn.microsoft.com/en-us/library/ff597539(v=office.14).aspx
    http://manish4dotnet.blogspot.in/2013/02/upload-ans-read-excel-file-using-c.html
    http://msmvps.com/blogs/windsor/archive/2011/11/04/walkthrough-creating-a-custom-asp-net-asmx-web-service-in-sharepoint-2010.aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • CRVS2010 beta - Date field from database does not display in report

    Hi there - can someone please help?!
    I am getting a problem where a date field from the database does not display in the report viewer (It displays on my dev machine, but not on the client machines...details given below)
    I upgraded to VS 2010
    I am using the CRVS2010 Beta
    My development machine is Windows 7 - and so is my fellow developer's
    We are using Microsoft SQL Server 2000
    We run the queries within VS and then we send the data table to VS using .SetDataSource
    We have a few reports which display the date on our dev machines (whether we run the EXE or from within Visual Studio)
    When we roll out to the client machines (running Windows XP SP3) then everything works, except that the date does not display (on quite a few reports)
    This is the only real issue I have had - a show stopper for me
    The rest works well - any input will be greatly appreciated
    Regards,
    Ridwan

    Hi Ridwan,
    After much testing I have it all working now using CRDB_adoplus.dll as a data source ( XML )
    Alter your Config file to look like this:
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
    </startup>
    Then using the code below, and CR requires the Schema to be able to read the date format.
    private void SetToXML_Click(object sender, EventArgs e)
    CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
    ISCDReportClientDocument rcd;
    rcd = rptClientDoc;
    string connString = "Provider=SQLOLEDB;Data Source=dwcb12003;Database=xtreme;User ID=sb;Password=password";
    string sqlString = "Select * From Orders";
    OleDbConnection oleConn = new OleDbConnection(connString);
    OleDbDataAdapter oleAdapter = new OleDbDataAdapter(sqlString, oleConn);
    //OleDbDataAdapter oleAdapter2 = new OleDbDataAdapter(sqlString2, oleConn);
    DataTable dt1 = new DataTable("Orders");
    oleAdapter.Fill(dt1);
    System.Data.DataSet ds = new System.Data.DataSet();
    // We need the schema to get the data formats
    ds.WriteXml("c:
    sc.xml", XmlWriteMode.WriteSchema);
    //Create a new Database Table to replace the reports current table.
    CrystalDecisions.ReportAppServer.DataDefModel.Table boTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();
    //boMainPropertyBag: These hold the attributes of the tables ConnectionInfo object
    PropertyBag boMainPropertyBag = new PropertyBag();
    //boInnerPropertyBag: These hold the attributes for the QE_LogonProperties
    //In the main property bag (boMainPropertyBag)
    PropertyBag boInnerPropertyBag = new PropertyBag();
    //Set the attributes for the boInnerPropertyBag
    boInnerPropertyBag.Add("File Path ", @"C:\sc.xml");
    boInnerPropertyBag.Add("Internal Connection ID", "{680eee31-a16e-4f48-8efa-8765193dccdd}");
    //Set the attributes for the boMainPropertyBag
    boMainPropertyBag.Add("Database DLL", "crdb_adoplus.dll");
    boMainPropertyBag.Add("QE_DatabaseName", "");
    boMainPropertyBag.Add("QE_DatabaseType", "");
    //Add the QE_LogonProperties we set in the boInnerPropertyBag Object
    boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);
    boMainPropertyBag.Add("QE_ServerDescription", "NewDataSet");
    boMainPropertyBag.Add("QE_SQLDB", "False");
    boMainPropertyBag.Add("SSO Enabled", "False");
    //Create a new ConnectionInfo object
    CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo boConnectionInfo =
    new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
    //Pass the database properties to a connection info object
    boConnectionInfo.Attributes = boMainPropertyBag;
    //Set the connection kind
    boConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
    //*EDIT* Set the User Name and Password if required.
    boConnectionInfo.UserName = "";
    boConnectionInfo.Password = "";
    //Pass the connection information to the table
    boTable.ConnectionInfo = boConnectionInfo;
    //Get the Database Tables Collection for your report
    CrystalDecisions.ReportAppServer.DataDefModel.Tables boTables;
    boTables = rptClientDoc.DatabaseController.Database.Tables;
    //For each table in the report:
    // - Set the Table Name properties.
    // - Set the table location in the report to use the new modified table
    boTable.Name = "Orders";
    boTable.QualifiedName = "Orders";
    boTable.Alias = "Orders";
    rptClientDoc.DatabaseController.SetTableLocation(boTables[0], boTable);
    //Verify the database after adding substituting the new table.
    //To ensure that the table updates properly when adding Command tables or Stored Procedures.
    rptClientDoc.VerifyDatabase();
    MessageBox.Show("Data Source Set", "RAS", MessageBoxButtons.OK, MessageBoxIcon.Information);
    Thanks again
    Don

  • Cannot read from database correctly

    Hi all,
    I'm new to Berkeley DB. I'm trying to write a simple program to create
    a very simple database and then read the data from it.
    I built the Berkeley DB binary correctly and I don't have any syntax
    or linking errors.
    This is the code that I wrote (almost all of it from the "Getting
    Started with Data Storage" Guide).
    #include <sys/types.h>
    #include <iostream>
    #include <iomanip>
    #include <errno.h>
    #include <stdlib.h>
    #include <string.h>
    #include <stdio.h>
    #include <db_cxx.h>
    using std::cin;
    using std::cout;
    using std::cerr;
    void main()
    Db db(NULL, 0); // Instantiate the Db object
    u_int32_t oFlags = DB_CREATE; // Open flags;
    try {
    db.open(NULL,"my_db.db",NULL, DB_HASH, oFlags, 0); // Open the
    database
    } catch(DbException &e) {
    std::cerr << "Error opening database: " << "my_db.db" << "\n";
    std::cerr << e.what() << std::endl;
    } catch(std::exception &e) {
    std::cerr << "Error opening database: " << "my_db.db" << "\n";
    std::cerr << e.what() << std::endl;
    char *description = "Grocery bill.";
    float money = 122.45;
    Dbt key(&money, sizeof(float));
    Dbt data(description, strlen(description) + 1);
    int ret = db.put(NULL, &key, &data, DB_NOOVERWRITE);
    if (ret == DB_KEYEXIST) {
    db.err(ret, "Put failed because key %f already exists", money);
    try {
    // Close the database
    db.close(0);
    // DbException is not subclassed from std::exception, so
    // need to catch both of these.
    } catch(DbException &e) {
    // Error handling code goes here
    } catch(std::exception &e) {
    // Error handling code goes here
    Db db_1(NULL, 0); // Instantiate the Db object
    u_int32_t cFlags = DB_RDONLY;
    try {
    db_1.open(NULL,"my_db.db",NULL, DB_HASH, cFlags, 0); // Open the
    database
    } catch(DbException &e) {
    std::cerr << "Error opening database: " << "my_db.db" << "\n";
    std::cerr << e.what() << std::endl;
    } catch(std::exception &e) {
    std::cerr << "Error opening database: " << "my_db.db" << "\n";
    std::cerr << e.what() << std::endl;
    char *description_1[13 + 1];
    Dbt key_1, data_1;
    key_1.set_data(&money);
    key_1.set_ulen(sizeof(float));
    data_1.set_data(&description_1);
    data_1.set_ulen(13 + 1);
    data_1.set_flags(DB_DBT_USERMEM);
    db_1.get(NULL, &key_1, &data_1, 0);
    cout << (char *)data_1.get_data() << "\n";
    cout << key_1.get_data() << "\n";
    Basically, I open the database and write a single record then try to
    read that record again from the database.
    What is happening to me is:
    Once I write the record, and read it; it does not print the data
    correctly even the key is not printed correctly. All what I see is
    garbage.
    Can someone points out what is wrong here
    Any help is appreciated.

    Hello,
    Your program requires two changes to print properly.
    1. Db::get retrieves key/data pairs from the database.
    The address and length of the data associated with
    the specified key are returned in the structure to
    which data refers. Hence you'll need:
    key_1.set_data(&money);
    key_1.set_size(sizeof(float));
    data_1.set_data(&description_1);
    data_1.set_ulen(13 + 1);
    data_1.set_flags(DB_DBT_USERMEM);
    db_1.get(NULL, &key_1, &data_1, 0);
    instead of:
    key_1.set_data(&money);
    key_1.set_ulen(sizeof(float));
    data_1.set_data(&description_1);
    data_1.set_ulen(13 + 1);
    data_1.set_flags(DB_DBT_USERMEM);
    db_1.get(NULL, &key_1, &data_1, 0);
    2. To print the float, you'll need:
    cout << *((float*)key_1.get_data()) << "\n";
    instead of:
    cout << key_1.get_data() << "\n";
    With those changes, I get:
    ./ftest9
    Grocery bill.
    122.45
    Which is what I think you want.
    Thanks,
    Sandra

  • SQL Data Access from database

     Hi Friends,
     I want to access data from database, User will enter Start Date and end date , based on that , data will be get retried.
    Is it possible to write a SQL Query, Where A SQL Query will take care user start and end date. Start date and end date is not fixed, it will be vary based on user.
    Thanks for co-operation.
    Regards,
    Pritam A.

    Pritama,
    Yes, your query looks fine. It should work perfectly. You could alternatively, get input from user into variables and use them in your query as shown below:
    declare @user_startdate datetime
    set @user_startdate='10/Oct/2013 1:00:04'
    declare @user_enddate datetime
    set @user_enddate='14/Oct/2013 1:00:04'
    SELECT * FROM GT1
    WHERE datetime1 BETWEEN @user_startdate AND @user_enddate
    Is there anything else you are facing a problem with? Your query is correct and gives no problems..
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Dynamic reading from database table

    Hi Experts,
    While reading from a database table the below statement for deletion works:
    DELETE (p_table) FROM <fs_wadbtab>.
    p_table: name of database table which is entered as a selection screen parameter
    <fs_wadbtab> : workarea of line type P_table
    However, the below statement does not work:
    READ (p_table) FROM <fs_wadbtab>.
    My requirement is to read a record from p_table with contents in a dynamic structure.
    Kindly suggest.
    Thanks.

    Just misunderstood you.
    Edited by: Karri Kemppi on Jun 23, 2010 10:00 AM

  • CTRL-M (^M) characters in data read from sockets

    Hi,
    We have developed a software applications which opens upto 300 TCP connections and 4000 UDP sockets. The data from the TCP application is multiplexed to UDP sockets and viceversa.
    We connect to the application using a TCP socket and send certain data to the application which in turns sends this data to all the 4000 UDP sockets. The data received from 4000 UDP sockets is in turn sent back to the TCP socket as responses.
    We used telnet to connecct to thespecific TCP port on our application, sent a request to be sent to all 4000 UDP sockets and noticed ctrl-M characters in the data received from TCP socket. However we are sure we are not appending or adding this ctrl-m character while sending the data on TCP socket.
    telnet host port >/tmp/abc
    send a request
    send next request
    (after 10 mins, close connection)
    cat -vet /tmp/abc >/tmp/xyz
    There are ctrl-m characters in /tmp/xyz.
    ^M is observed only at the end of few lines and not on all lines. Successive repeatition of this test generates ^M in different lines but at the end of the line always.
    Can anybody help me to know why these ^M characters are getting generated?
    Note: We are completely working on Solaris and do not move contents across Windows and Unix. Our application is completely written on C++
    Thanks.
    Message was edited by:
    shekhnam

    I think I've misunderstood something here. The problem you're having is with the response being filtered by Telnet or your client, not what telnet is sending to the server?
    In that case I think the explanation is clear. Telnet is trying to display what comes back on a screen, and it is deleting and inserting newlines every now and then according to its internal whim so as to make the data wrap. I don't know if you can control that, but I also don't know if it matters as long as you have your own client application. You just have to stop treating Telnet as a viable test client.

  • Putting data read from a StreamTokenizer into an array.

    I need to put the data that I have read from a file using a streamtokenizer into an array, so that I can use it later on in my program.
    If anyone can help I would be grateful!!

    Here's a link that should help. It even includes an example:
    http://java.sun.com/docs/books/jls/first_edition/html/javaio.doc14.html

Maybe you are looking for

  • App Store problem, appear an application update that does not exist applications

    I have an iMac 2.5 Ghz Intel Core I5 and operating system Mac OS X Version 10.7.3 The problem is an application (Angry Birds) in my app store's update section that doesn't exist my installed applications. It has been seen update section for two month

  • Help Needed in Input Value Help of Custom Set attribute

    Hi All, We have maintained value table for custom set type attribute. We generated UI configuration for this set type and brought it into the web UI. But, we did not get the value help on the UI. We are trying to get the value help by implementing th

  • RSS Feed XML iView Suffix

    Hi, we created a XML iView for a RSS Input. Out problem is, if the rss - feed ends upon .xml everything work fine. Unfortunatly our RSS - feed URL does not end with .xml and so the iView produces only an error message. Does anyone know how to configu

  • Wats wrong with ActioListener and ........ in this code

    i m declaring a method with syntax ..... public void addWidgets() { but the error comes .. illegal start of expression ..... ??? also i m using actionlistener interface in class definition ... but the error comes .. no actionperformmed method defined

  • Use USB and Ethernet Printers with AP Extreme

    I currently have an HP 1210 connected to the USB port of my AP Extreme BS. I want to add an HP 1320n to the network so I can print to either printer. (My BS is connected to a cable modem.) Can I just connect the HP to the LAN port of the BS, or... sh