Help get data from socket

hi all
i am trying to get data from socket www.yahoo.com site and try to write in file with following code
NOTE:here netClient is the soccket object accepted by server
File f=new File(finalpath);
BufferedReader fromClient = new BufferedReader(new InputStreamReader(netClient.getInputStream()));
OutputStream fo=new FileOutputStream(f);
String str;
try{
while((str=fromClient.readLine())!=null){
byte buf[]=str.getBytes();
fo.write(buf);
}catch(Exception e){}
finally{fo.close();}
But i am not getiing data from socket
please help
regards krunal

GeneralYerevan is absolutely right. Use URLConnection and you will get what you want. It seems to me that you do not know deeply how http works. The fact that you opened a connection to www.google.com doesn't mean that you will get data. The web server, after it accepts the socket object, waits for your request. In you case it is something like "GET / HTTP1.1", which you have to write to the stream. URLConnection does all this for you and all you have is to read the InputStream.

Similar Messages

  • NIO Socket implementation - delay between select and get data from socket

    Hi all,
    I have implemented a internal CallAPI for RPC over a socket connection. It works fine but if there are more than five clients and some load I have the phenomena that the READ selector returns a SelectorKey but I did not get any data from the socket.
    My implementation is based on NIO has following components:
    + Accept-Thread
    Thread handles new clients.
    + Read-Thread
    Thread handles the data from the socket for the registered client. Each request is handled in an own Process-Thread. A Thread-Pool implementation is used for processing.
    + Process-Thread
    The Process-Thread reads the data from the socket and starts the processing of the logical request.
    In my tests I get the notification of data at the socket. The Process-Thread want to read the data for the socket, but no data are available. In some situations if have to read about 20 times and more to get the data. Between each read attempt I have inserted a sleep in the Process-Thread if no data was available. This have improved the problem, but it already exists. I tested the problem with several systems and jvm's but it seams that it is independent from the system.
    What can I to do improve the situation?
    I already include the read implementation from the grizzly-Framework. But it doesn't improve the situation.
    Socket - Init
         protected void openSocket( String host, int port ) throws IOException
              serverChannel = ServerSocketChannel.open();
              serverChannel.configureBlocking( false );
              serverSocket = serverChannel.socket();
              serverSocket.setReuseAddress( true );
              this.serverhost = host;
              this.serverport = port;
              this.srvAcceptSelector = Selector.open();
              this.srvReadSelector = Selector.open();
              InetSocketAddress isa = null;
              if ( serverhost != null )
                   isa = new InetSocketAddress( this.serverhost, this.serverport );
              else
                   isa = new InetSocketAddress( this.serverport );
              serverSocket.bind( isa, 50 );
              serverChannel.register( this.srvAcceptSelector, SelectionKey.OP_ACCEPT );
         }New Client � Init
         // New Client
         if ( key.isAcceptable())
              keyCountConnect++;
              ServerSocketChannel actChannel =
                   (ServerSocketChannel) key.channel();
              // Socket akteptieren
              SocketChannel actSocket = actChannel.accept();
              if ( actSocket != null )
                   actSocket.finishConnect();
                   actSocket.configureBlocking( false );
                   actSocket.socket().setTcpNoDelay( true );
                   this.registerSocketList.add( actSocket );
                   this.srvReadSelector.wakeup();
         }Read Data from Socket
        protected int readDatafromSocket( ByteArrayOutputStream socketdata )
             throws IOException
             int readedChars = 0;
            int count = -1;
            Selector readSelector = null;
            SelectionKey tmpKey = null;
            if ( sc.isOpen())
                  ByteBuffer inputbuffer = null;
                 try
                      inputbuffer = bufferpool.getBuffer();
                      while (( count = sc.read( inputbuffer )) > 0 )
                           readedChars += count;
                          inputbuffer.flip();
                           byte[] tmparray=new byte[inputbuffer.remaining()];
                           inputbuffer.get( tmparray );
                           socketdata.write( tmparray );
                          inputbuffer.clear();
                      if ( count < 0 )
                           this.closeSocket();
                           if( readedChars == 0 )
                                readedChars = -1;
                           if ( log.isDebug())
                                  log.debug( "Socket is closed! " );
                      else if ( readedChars == 0 )
                           if ( log.isDebug())
                                  log.debug( "Reread with TmpSelector" );
                           // Glassfish/Grizzly-Implementation
                         readSelector = SelectorFactory.getSelector();
                         if ( readSelector == null )
                              return 0;
                          count = 1;
                          tmpKey = this.sc.register( readSelector, SelectionKey.OP_READ );
                         tmpKey.interestOps(
                              tmpKey.interestOps() | SelectionKey.OP_READ );
                         int code = readSelector.select( 500 );
                         tmpKey.interestOps(
                             tmpKey.interestOps() & ( ~SelectionKey.OP_READ ));
                         if ( code == 0 )
                             return 0;
                             // Return on the main Selector and try again.
                           while (( count = sc.read( inputbuffer )) > 0 )
                                readedChars += count;
                               inputbuffer.flip();
                                byte[] tmparray=new byte[inputbuffer.remaining()];
                                inputbuffer.get( tmparray );
                                socketdata.write( tmparray );
                               inputbuffer.clear();
                           if ( count < 0 )
                                this.closeSocket();
                                if( readedChars == 0 )
                                     readedChars =-1;
                           else if ( count == 0 )
                                  // No data
                 finally
                      if ( inputbuffer != null )
                           bufferpool.releaseBuffer( inputbuffer );
                           inputbuffer = null;
                      // Glassfish-Implementierung
                    if ( tmpKey != null )
                        tmpKey.cancel();
                    if ( readSelector != null)
                        // Bug 6403933
                         try
                            readSelector.selectNow();
                         catch (IOException ex)
                        SelectorFactory.returnSelector( readSelector );
            return readedChars;
        }Thanks for your time.

    I've commented on that blog before. It is rubbish:
    - what does 'overloading the main Selector' actually mean? if anything?
    - 'Although this not clearly stated inside the NIO API documentation': The API documentation doesn't say anything about which Selector you should register channels with. Why would it? Register it with any Selector you like ...
    - 'the cost of maintaining multiple Selectors can reduce scalability instead of improving it' Exactly. So what is the point again?
    - 'wrapping a ByteBuffer inside a ByteBufferInputStream:' Code is rubbish and redundant. java.nio.channels.Channels has methods for this.
    There is no a priori advantage to using multiple Selectors and threads unless you have multiple CPUs. And even then not much, as non-blocking reads and writes don't consume significant amounts of CPU. It's the processing of the data once you've got it that takes the CPU, and that should be done in a separate thread.
    So I would re-evaluate your strategy. I suspect you're getting the channel registered with more than one Selector at a time. Implement it the simple way first then see if you really have a problem with 'overloading the main Selector' ...

  • Help: getting data from a web page

    i have a jsp page which generates some strings. i pass these strings in to a login page on some server. the web page displays my login status. is it possible to read or get data from the web page?
    i have captured the header of a web page and modifying the header based on my generated strings.
    or jus say is it possible to read whats in a web page into a jsp page?
    thanks in advance for any help , assistance or redirection to a source where i can find help.

    hi,
    sorry for a poorly framed question.
    this is what i m trying to do.
    i call google with a header generated.
    now i want to read back the content in the google search result page onto my jsp page.
    possible?
    first.jsp calls google. i m using redirect (url)
    the url is modified based on user input
    now i want the links in the google page to be put up in my page itself. so i want to read the links there...
    Message was edited by:
    on_track

  • Help getting data from iTunes onto my New iPad from iPhone backup

    Hi for 2 days now I have been trying to sync my New iPad2 with my iPhone 3GS, I have followed lots of threads & advice which has been helpful but its not quite happening for me!
    I set up iCloud and iTunes as advised, my iPhone & iPad share the same Apple ID. I backed up my iPhone to iTunes successfully, and restored the iPad via iTunes using the iPhone backup, it went thru the motions OK so I assume completed but I can't see any change.
    Under "Purchases" in my iTunes account it has two tabs one for the iPhone and the other iPad listing all my Apps so clearly it recognises my Apps but the Apps only feature on my iPhone I can't get them onto my iPad. I even deleted some apps and reloaded them since the sync & backups but it still doesn't work. Strangely under my "Account" in iTunes it says only 1 Device is recognosed by iTunes and thats my New iPad, yet it still shows a Tab under Purchases for my iPhone so I don't understand why this is not listed as a recognised Device under the Accounts tab.
    My contacts, calendars etc are in sync between the two devices wihtout any trouble at all.
    I did think it was because some of the apps were downloaded before the sync / backup but some threads lead me to beleive you can sync the content no matter when it was purchased. Under the "Purchases" tab for my iPad I can view my "Apps" which has a "Download all" option so Ibeing at a loss what to do next I proceeded to Download All and it was clearly doing this for some time but still nothing on my iPad.
    I was advised to turn iCloud off whilst I do the backup and restore on iTunes, and then turn it back on after. I have turned my iPad off/on after these updates but still the apps do not transfer across.
    I feel like I am so close now but for some reason something is still not working! Please Help - thankyou.
    (Just to add both devices are using the latest software update & iTunes working with Vista Windows on PC.)

    Connect and select iPhone in computer iTunes sidebar, in Music tab,
    select
         Sync Music,
         Selected Playlists, artists, albums....
         Select the music you want on iPhone.
         Click Sync button (bottom right)
    Here's the iPhone user manual
    iPhone User Guide (For iOS 6.1 Software)
    Message was edited by: ckuan

  • Help getting data from a DataTable

    Hi:
    How can I get the information of a DataTable that I Get from
    a WebService?
    The response from the WebService is:
    &lt;OBTENERUSUARIOResponse xmlns=&quot;
    http://(IP)/(WebService)/&quot;
    xmlns:xsd=&quot;
    http://www.w3.org/2001/XMLSchema&quot;
    xmlns:xsi=&quot;
    http://www.w3.org/2001/XMLSchema-instance&quot;
    xmlns:soap=&quot;
    http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
    &lt;OBTENERUSUARIOResult&gt;
    &lt;xsd:schema id=&quot;NewDataSet&quot;
    xmlns:msdata=&quot;urn:schemas-microsoft-com:xml-msdata&quot;
    xmlns:xs=&quot;
    http://www.w3.org/2001/XMLSchema&quot;&gt;
    &lt;xsd:element name=&quot;NewDataSet&quot;
    msdata:MainDataTable=&quot;tblTemporal&quot;
    msdata:UseCurrentLocale=&quot;true&quot;
    msdata:IsDataSet=&quot;true&quot;&gt;
    &lt;xsd:complexType&gt;
    &lt;xsd:choice maxOccurs=&quot;unbounded&quot;
    minOccurs=&quot;0&quot;&gt;
    &lt;xsd:element
    name=&quot;tblTemporal&quot;&gt;
    &lt;xsd:complexType&gt;
    &lt;xsd:sequence&gt;
    &lt;xsd:element name=&quot;CodigoUsuario&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:long&quot;/&gt;
    &lt;xsd:element name=&quot;Condicion&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:string&quot;/&gt;
    &lt;xsd:element name=&quot;Nivel&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:unsignedByte&quot;/&gt;
    &lt;xsd:element name=&quot;Nombre&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:string&quot;/&gt;
    &lt;xsd:element name=&quot;Usuario&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:string&quot;/&gt;
    &lt;xsd:element name=&quot;Clave&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:string&quot;/&gt;
    &lt;xsd:element name=&quot;CodigoServicio&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:long&quot;/&gt;
    &lt;xsd:element name=&quot;NroDocumento&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:int&quot;/&gt;
    &lt;/xsd:sequence&gt;
    &lt;/xsd:complexType&gt;
    &lt;/xsd:element&gt;
    &lt;/xsd:choice&gt;
    &lt;/xsd:complexType&gt;
    &lt;/xsd:element&gt;
    &lt;/xsd:schema&gt;
    &lt;diffgr:diffgram
    xmlns:msdata=&quot;urn:schemas-microsoft-com:xml-msdata&quot;
    xmlns:diffgr=&quot;urn:schemas-microsoft-com:xml-diffgram-v1&quot;&gt;
    &lt;NewDataSet&gt;
    &lt;tblTemporal
    diffgr:id=&quot;tblTemporal1&quot;
    msdata:rowOrder=&quot;0&quot;&gt;
    &lt;CodigoUsuario&gt;1&lt;/CodigoUsuario&gt;
    &lt;Condicion&gt;Sr.&lt;/Condicion&gt;
    &lt;Nivel&gt;1&lt;/Nivel&gt;
    &lt;Nombre&gt;NN001&lt;/Nombre&gt;
    &lt;Usuario&gt;***&lt;/Usuario&gt;
    &lt;Clave&gt;***&lt;/Clave&gt;
    &lt;CodigoServicio&gt;1&lt;/CodigoServicio&gt;
    &lt;NroDocumento&gt;***&lt;/NroDocumento&gt;
    &lt;/tblTemporal&gt;
    &lt;tblTemporal
    diffgr:id=&quot;tblTemporal2&quot;
    msdata:rowOrder=&quot;1&quot;&gt;
    &lt;CodigoUsuario&gt;2&lt;/CodigoUsuario&gt;
    &lt;Condicion&gt;Dr.&lt;/Condicion&gt;
    &lt;Nivel&gt;1&lt;/Nivel&gt;
    &lt;Nombre&gt;NN002&lt;/Nombre&gt;
    &lt;Usuario&gt;***&lt;/Usuario&gt;
    &lt;Clave&gt;****&lt;/Clave&gt;
    &lt;CodigoServicio&gt;1&lt;/CodigoServicio&gt;
    &lt;NroDocumento&gt;***&lt;/NroDocumento&gt;
    &lt;/tblTemporal&gt;
    &lt;tblTemporal
    diffgr:id=&quot;tblTemporal3&quot;
    msdata:rowOrder=&quot;2&quot;&gt;
    &lt;CodigoUsuario&gt;3&lt;/CodigoUsuario&gt;
    &lt;Condicion&gt;Pac.&lt;/Condicion&gt;
    &lt;Nivel&gt;3&lt;/Nivel&gt;
    &lt;Nombre&gt;NN003&lt;/Nombre&gt;
    &lt;Usuario&gt;***&lt;/Usuario&gt;
    &lt;Clave&gt;***&lt;/Clave&gt;
    &lt;CodigoServicio&gt;1&lt;/CodigoServicio&gt;
    &lt;NroDocumento&gt;***&lt;/NroDocumento&gt;
    &lt;/tblTemporal&gt;
    &lt;tblTemporal
    diffgr:id=&quot;tblTemporal4&quot;
    msdata:rowOrder=&quot;3&quot;&gt;
    &lt;CodigoUsuario&gt;4&lt;/CodigoUsuario&gt;
    &lt;Condicion&gt;Pac.&lt;/Condicion&gt;
    &lt;Nivel&gt;3&lt;/Nivel&gt;
    &lt;Nombre&gt;NN004&lt;/Nombre&gt;
    &lt;Usuario&gt;***&lt;/Usuario&gt;
    &lt;Clave&gt;***&lt;/Clave&gt;
    &lt;CodigoServicio&gt;1&lt;/CodigoServicio&gt;
    &lt;NroDocumento&gt;***&lt;/NroDocumento&gt;
    &lt;/tblTemporal&gt;
    &lt;tblTemporal
    diffgr:id=&quot;tblTemporal5&quot;
    msdata:rowOrder=&quot;4&quot;&gt;
    &lt;CodigoUsuario&gt;8&lt;/CodigoUsuario&gt;
    &lt;Condicion&gt;Pac.&lt;/Condicion&gt;
    &lt;Nivel&gt;3&lt;/Nivel&gt;
    &lt;Nombre&gt;NN005&lt;/Nombre&gt;
    &lt;Usuario&gt;***&lt;/Usuario&gt;
    &lt;Clave&gt;***&lt;/Clave&gt;
    &lt;CodigoServicio&gt;1&lt;/CodigoServicio&gt;
    &lt;NroDocumento&gt;***&lt;/NroDocumento&gt;
    &lt;/tblTemporal&gt;
    &lt;/NewDataSet&gt;
    &lt;/diffgr:diffgram&gt;
    &lt;/OBTENERUSUARIOResult&gt;
    &lt;/OBTENERUSUARIOResponse&gt;
    FLEX 2 Code:
    public function resultHandler(event:ResultEvent):void {
    if (event.result.diffgram == &quot;&quot;)
    ////nothing
    else
    lblNombre.text =
    event.result.diffgram.NewDataset.tblTemporal[1].Nombre;
    If I use lblNombre.text =
    event.result.diffgram.NewDataset.tblTemporal.Nombre; returns an
    empty string and if I use lblNombre.text =
    event.result.diffgram.NewDataset.tblTemporal[1].Nombre; the code
    stops there and nothing happens.
    Can you tell me if this code is correct?
    I made the WebService with Visual Basic 2005 and returns a
    DataTable Variable not a DataSet.

    hi,
    sorry for a poorly framed question.
    this is what i m trying to do.
    i call google with a header generated.
    now i want to read back the content in the google search result page onto my jsp page.
    possible?
    first.jsp calls google. i m using redirect (url)
    the url is modified based on user input
    now i want the links in the google page to be put up in my page itself. so i want to read the links there...
    Message was edited by:
    on_track

  • Need to Get Data From Siebel On Demand ( I am new to Siebel Please Help)

    Hi All,
    I have a project in which i need to get data from Siebel On Demand and Automate this process.
    I have downloaded the Custom WSDL file and the Schema file from Oracle Siebel On Demand. I am using IDE WSAD and when i import these files into WSAD i am getting an error stating the schema definitions are wrong. Can anyone help me.....
    I need to complete it asap....
    Edited by: user491578 on Nov 11, 2008 6:50 PM

    You should probably ask Advantech. This question really has nothing to do with LabVIEW SE or NI-ELVIS. You could try posting to the LabVIEW board but there have only ever been two posts regarding 'advantech 4716'.

  • Need help about RRD4J, get data from rrdb

    i need more help about roundrobin database, especially using RRD4J library.
    i want to know, if i have one file database data1.rrd and i specific want to get data from startTime to endTime.
    how i can get that data from that database, and move them to another database file data2.rrd.
    can i do this?

    thx jschell
    javadoc from rrd4j not clearly enough for me to understanding about prosesing add, update and get data in there, so i ask in this forum may be anyone can give me solution.
    i think it's simple problem but i don't know how to implement with this API.
    with rrd4j we can create roundrobin database (rrd), the output in example: data1.rrd
    i just want to get data that i had put in data1.rrd to move them to another rrd, example: data2.rrd.
    data1.rrd and data2.rrd, they have same lastupdate time.

  • Help needed with variable - trying to get data from Oracle using linked svr

    Sorry if I posted this in the wrong forum - I just didn't know where to post it.
    I'm trying to write a simple stored procedure to get data from an oracle database via a linked server in SQL Enterprise manager. I have no idea how to pass a variable to oracle.
    Here's how I would get the variable in SQL:
    declare @maxkey INTEGER
    select @maxkey= MAX(keyfield) from [server].Data_Warehouse.dbo.mytable
    select * from [server].Data_Warehouse.dbo.mydetailtable where keyfield=@maxkey
    the select statement I need to do in oracle would use that variable like this:
    select * from OPENQUERY(OracleLinkedServer,'select
    * from ORACLEDB.TABLE where keyfield > @maxkey')
    and I get this message: OLE DB provider "OraOLEDB.Oracle" for linked server "OracleLinkedServer" returned message "ORA-00936: missing expression".
    I realize that I can't pass the @maxkey variable to oracle - so how do I accomplish this?

    Please refer the example in this link which deals with Oracle date format.
    You can finnd a command DECODE which is used for date formats. If you have a look at whole theory then you will get an idea.
    Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]

  • Any helpful materials or sample on how to get data from lotus in SAP?

    I have some experience on get data from Biztalk (Microsoft Middleware). In that case, i could using "call FMxxxx DESTINATION rfc". the destination with type TCP/IP is created via SM59.
          and how about lotus ?
       ths

    I have some experience on get data from Biztalk (Microsoft Middleware). In that case, i could using "call FMxxxx DESTINATION rfc". the destination with type TCP/IP is created via SM59.
          and how about lotus ?
       ths

  • Getting data from mysql!!  please could someone help me?

    Hello people!!
    I can't get data from a Mysql database through a jsp page, there's a error message of conversion,
    here's my classes:
    package teste;
    public class GetDB {
        String str;
        Connection con;
        ObjectPage ob;
        public GetDB()throws Exception {       
            try {
                Class.forName("org.gjt.mm.mysql.Driver");
                con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/Loja?user=root&password=131283");            
            } catch (Exception ex) {
                throw new Exception("Banco de dados n�o encontrado" +
                    ex.getMessage());
        public ObjectPage getOb(){
            try {
                String selectStatement = "select * from teste";
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                ResultSet rs = prepStmt.executeQuery();
                while (rs.next()) {
                   str = rs.getString(1)+" "+rs.getInt(2);
                prepStmt.close();
                ob = new ObjectPage(str);
            }catch (SQLException ex) {           
            return ob;
        public void setOb(ObjectPage ob){
            this.ob = ob;
    }    and this:
    package teste;
    public class ObjectPage {
       String name;
       public ObjectPage(String nome) {
           name = nome;
       public String getName(){
           return name;
    }and this is myjsp page:
    <jsp:useBean id="dado" class="teste.GetDB" scope="page" >
      <jsp:setProperty name="dado" property="ob" value="{$name}"/>
    </jsp:useBean>
    <%--<jsp:getProperty name="dado" property="propName"/> --%>
    <p><b><h1><font color="orange">${dado.ob.name}</font></h1></b></p>so what's wrong? could you give me some tips? what should i do ?
    Thanks a lot!!!

    If there's an error message of conversion, are you sure that the 1st and 2nd columns returned in the result set are of type string & integer respectively (try getObject, then see what it's an instanceof)? Just guessing, maybe the actual database fields don't match the types you're expecting.
    And why don't you try ex.printStackTrace() to see what the actual error is in the getOb method?

  • Error when reading data from socket

    Hi,
    I am getting the error 'NiRawReadError: An error occured when reading data from socket.' when using the ABAP API  'mo_core_service->invoke_matching'.
    And I get this error only when I pass ABAP_TRUE to the paramter 'iv_wait_for_invocation' .
    Can anybody help me in correcting this?

    Hi Narasa,
    The following error is already in discussion in the below forum.Plz consult the forum link you will find the error solution.
    Problem in ABAP API - NiRawReadError: error when reading data from socket
    Rgds
    Ankit

  • JMF getting data from tcp port

    Hi there is any way that i can get data from tcp port uisng datasourece
    mean i create a server port which accept the connection after established the connection then the client send audio data to the server, the server only will get that data in a buffer and using jmf datasource i should read that data and might send it to another machine using avtransmitter but i dont know how to wrape that data in rtp
    private void Streamforward()
    ServerSocket echoServer = null;
    byte[] buffer=new byte[8192];
    DataInputStream is;
    PrintStream os;
    Socket clientSocket = null;
    // Try to open a server socket on port 4444
    // Note that we can't choose a port less than 1023 if we are not
    // privileged users (root)
    try {
    echoServer = new ServerSocket(4444);
    catch (IOException e) {
    System.out.println(e);
    // Create a socket object from the ServerSocket to listen and accept
    // connections.
    // Open input and output streams
    try {
    clientSocket = echoServer.accept();
    Convert con=new Convert();
    is = new DataInputStream(clientSocket.getInputStream());
    os = new PrintStream(clientSocket.getOutputStream());
    int start=0;
    while (true)
    int length=clientSocket.getReceiveBufferSize();
    System.out.println(length);
    //line=in.readLine();
    is.read(buffer,0,length);
    //here we should put that data into datasourece
    catch (IOException e) {
    System.out.println(e);
    it would be too help full i have to submitt my project soon and i dont know what to do:( with this data ....i am integratting skype with jmf

    I've been looking around for the same solution for my client (who using Mettler Toledo's (MT) products). Anyone did this please kindly share your experience, thanks.
    My initial approach was to write a Java middle-ware to read from the real-time system and upload into JDE from there.
    I wonder if MT stored the weighing data somewhere in some database ...
    Any other hardware vendor out there to make our life easier?
    Additional:
    Just got a way that might work, use Java or JNI to read from Serial port (RS-232) or USB, then proceed from there (provided your hardware with that communication protocol).
    Cheers,
    Avatar Ng
    Edited by: user2367131 on Aug 18, 2009 6:34 AM

  • How to get data from hard drive in dead iMac?

    I have an old slot-loading iMac (350Mhz G3 blueberry) that just died, probably a dead power supply or something. Won't turn on at all. I don't care about restoring it, I just want to take the hard drive out and grab data from it. I've found instructions for removing the HD ... but any tips on the best/cheapest way to hook it up to get data from it? It's EIDE I believe from what I've read so far. Thanks for any help.

    Hey Richard.....Thanks for the reply to my question about my wife's dead iMac.....
    Her iMac had been acting up lately, mostly to do with her Outlook Express freezing up in OS9. I dunno if OS9 was freezing or if the application was failing. Regardless, I would have to quit OS9, restart Outlook which at the same time restarted OS9. All would be fine for a while, a day or two and then the scene would repeat itself. But I think that issue is separate from the iMac being "dead". Often we have power outages in the area, more than we should. I had the iMac plugged into a battery backup, some APS product I think it is. I believe it is only good for less than an hour as we have other devices drawing on it too. Most of our power outages are of short duration, just enough to be aggravating, sometimes having to reset clocks, etc...And a couple times, I would have to reset the time and date on the iMac so this told me that the PRAM battery was below minimum voltage. But the iMac would ALWAYS restart, even with the low battery. But the most recent outage, about one hour duration, did in the iMac, somehow or other. I do believe the battery backup basically fully discharged. So I removed the battery, could not find a new battery locally so I drove to the big city and paid the local Apple service dealer a visit. I got ripped big time price wise, embarrassed to say. So I get home, put the battery in the holder, depressed the CMU reset, the powerbutton illuminated as did a green LED by the memory modules for less than three seconds and then quit. I also heard the HD trying to spin up and a high voltage THUMP which I assume is the CRT trying to ignite. If I unplugged the iMac, removed the battery, plug in the power again and hit the power button, the iMac would repeat the same short on period and then quit. So it did not seem to make any difference if there was a battery in place. I read somewhere to pull the battery, pull the AC cord, hold down the power button to dump any current (?) and let the unit sit for 24hrs. After that length of time, I was supposed to replace the battery, depress the CMU reset, wait ten seconds and then feed it AC. Well, when I pressed the power button, I heard life for maybe five seconds, maybe a second longer, then a beep and then it shut down. I pulled the AC cord, pulled the battery, re-inserted the battery, depressed the CMU reset, waited a few seconds, plugged in the AC cord, depressed the power button and I am back at the under three seconds of "power-up" and then nothing, dead, no beep, nothing. I think maybe it is a waste of time trying to mess with this unit, looking for a newer iMac on eBay, the snowball series with the 17" LCD, might be time better spent. Hate throwing stuff away, that's why I am up to my ears in junk, maybe u know that scenario. The wife likes my 19" ACER LCD screen, hooked up to this old dual 800mhz, though she dislikes the noise and the tower. But we both agree the large LCD screen is much easier on our aging eyes than the old iMac CRT. Anyway, I appreciate your help, always GREAT to correspond with an Apple fan.....John Bauer

  • Powerpivot Error on Refresh -- "We couldn't get data from the data model..."

    I'm using Excel 2013 and Windows 8.1.  I have a spreadsheet I've been using for over a year, and I've just started getting this error message when I try to refresh the data.
    "We couldn't get data from the Data Model.  Here's the error message we got:
    The 'attributeRelationship' with 'AttributeID' - 'PuttDistCat9' doesn't exist in the collection"
    Any idea how I can fix this problem?  I haven't changed anything related to that particular attribute.  All the data is contained in separate sheets in the workbook, so there are no external sources of data.
    Thanks.
    Jean

    Thanks for all the suggestions.
    I found a slightly older version of the spreadsheet that still refreshes properly, so I don't think I have any issues with the version of Excel or Power Query.  (I've had this same error before, and I believe I applied the hotfix at that time.)
    I think this problem started after I updated a number of the date filters in the pivot tables.  I haven't made any changes to the data model, and the only updates I've made were to add data (which I do all the time), and to change the date filters on
    the pivot tables.
    As suggested, I added a new pivot table querying one table (the table with the attribute that shows up in the error message), and it worked fine.  I can also refresh this pivot table.
    Then I tried adding a pivot table which went against several tables in the data model (including the table in question).  The pivot table seemed to return that data properly.  However, when I tried to refresh it, I got the same error message ("we
    couldn't get data from the data model..."). 
    Dany also suggested running the queries one at a time to see which one is in error.  Without checking all the pivot tables, it appears that any which use the table "HolePlayedStrokes" generate the error (this is the table with the attribute
    mentioned in the error message).  Pivot Tables without that particular table seem to refresh OK.  Unfortunately, that is the main table in my data model, so most of the pivot tables use it.
    Any other suggestions?  I'd be happy to send a copy of the spreadsheet.
    Thanks for all the help.
    Jean

  • How to get data from subsites list of SharePoint 2010 in ssrs

    Hi,
    Can someone help me on this issue.
    I want to create a report using ssrs, I have some of the data in SQL and some of the data in sharepoint list.
    First I need to go to SQL and get the data from the table which contains URL for the subsite in sharepoint.
    after that I need to go to all the subsites and go to perticulat list in the subsites and get data from that list.
    for example, their is a top level site "abc"
    it contains sub site "123", "456","567", etc.. All this sub sites contain a list by name "Sample List", Now I need to go to that sub site list(Sample List) and get list-item column say "created By" which
    is created on particular date. 
    in my report, I need to print the sub site "url/Title" which comes from SQL database and list-item column  "Created By" of that sub site list "Sample List".
    I tried using subreport inside a report by using "Microsoft SharePoint List" as a datasource, but when it comes to real time we don't know how many subsites will be created, so we can't create a datasource for each subsite site.
    I guess we need to be using XML as a datasource, but how can we go to particular subsite in query while using XML, since all subsites have list with the same name ?
    I appreciate your help.
    Thank you,
    Kishore 

    Hi Kishore,
    SQL Server Reporting Services(SSRS) supports expression-based connection strings. This will help us to achieve the goal you mentioned in this case:
    Create a new report
    Create a Data Source in the report with the connection string like this:
    http://server/_vti_bin/lists.asmx (We use static connection string instead of expression-based connection string now, as it is not supported to get fields based on expression-based connection string in design time. We will change it to be expression-based
    connection string later)
    Create the data set(as you have done using XML query language). Please use list name instead of GUID in the listName parameter.
    Design the report(e.g. Add controls to the report)
    Now, let's change the connection string to be expression-based. First, please add a parameter to the report, move this parameter to top. This parameter is used to store the sub site name.
    Open the Data Source editor, set the connection string to be: ="http://server/" & Parameters!parameterCreatedInStep5.value & "_vti_bin/lists.asmx"
    In the main report, pass the sub site name to the report we created above via the parameter created in step5
    That is all.
    Anyway, this is actually a SQL Server Reporting Service(SSRS) question. You can get better support on this question from:
    http://social.technet.microsoft.com/Forums/en/sqlreportingservices/threads
    For more information about Expression-Based connection string, please see:
    http://msdn.microsoft.com/en-us/library/ms156450.aspx#Expressions
    If there is anything unclear, please feel free to ask.
    Thanks,
    Jinchun Chen
    Jin Chen - MSFT

Maybe you are looking for