Problem displaying text in console after creating socket

Hi guys,
I'm trying to combine 2 invididual parts of a project I'm working on, but I am having problems intregating it all together.
I am using sockets to connect to 1 computer so it's using client server architecture. Whilst I am able to create and connect using the socket, my program is failing to print on the console. I would like to find out what I have done wrong, and get it working.
Server code:
import java.io.*;
import java.net.*;
import javax.swing.JOptionPane;
class Server
     public static void main (String []args) throws IOException
          try
               Server();     
          catch (IOException ex)
     public static void Server () throws IOException
          ServerSocket serverSocket=null;
          int portNo=4500;
          System.out.println("Starting");
          try
               serverSocket=new ServerSocket(portNo);     
          catch (IOException ex)
               System.err.println("Could not create socket on port" +portNo);
               System.exit(1);
          System.out.println("Socket listening");
          Socket clientSocket=null;
          try
               clientSocket=serverSocket.accept();
          catch (IOException ex)
               System.out.println("Accept failed");
               System.exit(1);
          PrintWriter out= new PrintWriter(clientSocket.getOutputStream(), true);
          BufferedReader in=new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
          Board board1=new Board();
          Protocol game=new Protocol();     
          boolean gameStart=true;
          while (gameStart)
               String originMove=JOptionPane.showInputDialog(null,"Origin Move","Enter in origin of piece",JOptionPane.QUESTION_MESSAGE);
               byte [] originMoveByte=new byte[originMove.length()];
               originMoveByte=originMove.getBytes();
               System.out.println(originMoveByte);
          out.close();
          in.close();     
          clientSocket.close();
          serverSocket.close();          
class Board
     boolean gameStart=true;
     public static String [] [] Board()
          String coordinates[] [] = new String [8] [8];
          for (byte i=0;i<8;i++)
               for (byte j=0;j<8;j++)
                    if ((i%2!=0)&&(j%2!=0))
                         coordinates[i] [j]="#";
                    else if ((i%2!=0)&&(j%2==0))
                         coordinates[i] [j]=" ";
                    else if ((i%2==0)&&(j%2!=0))
                         coordinates[i] [j]=" ";
                    else
                         coordinates[i] [j]="#";
          coordinates[0][0]="R";
          coordinates[0][1]="N";
          coordinates[0][2]="B";
          coordinates[0][3]="Q";
          coordinates[0][4]="K";
          coordinates[0][5]="B";
          coordinates[0][6]="N";
          coordinates[0][7]="R";
          for (int i=0;i<8;i++)
               coordinates[1]="P";
          coordinates[7][0]="r";
          coordinates[7][1]="n";
          coordinates[7][2]="b";
          coordinates[7][3]="q";
          coordinates[7][4]="k";
          coordinates[7][5]="b";
          coordinates[7][6]="n";
          coordinates[7][7]="r";
          for (int i=0;i<8;i++)
               coordinates[6][i]="p";
          printBoard(coordinates);
          return coordinates;
     public static void update (String coordinates [] [])
          printBoard(coordinates);
     public static void printBoard(String coordinates[] [])
          for (int i=0;i<8;i++)
               for (int j=0;j<8;j++)
                    System.out.print(coordinates[i][j]);
               System.out.println();
}Cheers,
Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Sorry guys, I got a follow up problem :(
U:\Server\Server.java:126: incompatible types
found   : java.lang.String[][]
required: java.io.PrintWriter
               out=game.Protocol(coordinates,originMove,destinationMove);
                                ^
1 error
Process completed.What needs changing? Btw, coordinates is the 2D String array
Cheers,
Ben

Similar Messages

  • Problem entering values in table after creating it in Word using OLE2

    Hi,
    I want to create a Word document from a Oracle Forms 6i application. The document will have standard text followed by a table. The cells of this table are to be populated from fields in the Forms application.
    I have created a sample code below. When executed from within the Forms application, it creates a document fine. It writes the text "Hello World". It then creates a table as expected. But when I try to enter a value "Cell Value" in the table, the value does not get written to the cell of the table. Instead it writes the value outside the table.
    Can someone please tell me what I am doing wrong here and what I need to do so that after writing the text on the document I can write values into the table also.
    Any help will be much appreciated.
    Here is the code(it works but then it doesn't ):
    PROCEDURE TEST_PROC IS
    hApplication OLE2.OBJ_TYPE;
    hDocuments OLE2.OBJ_TYPE;
    hDocument OLE2.OBJ_TYPE;
    hSelection OLE2.OBJ_TYPE;
    hParagraphFormat OLE2.OBJ_TYPE;
    hRange OLE2.OBJ_TYPE;
    hFont OLE2.OBJ_TYPE;
    hTables OLE2.OBJ_TYPE;
    hTable OLE2.OBJ_TYPE;
    args OLE2.LIST_TYPE;
    wdAlignParagraphLeft CONSTANT number(3) := 0; --Default
    wdword9tablebehavior CONSTANT NUMBER (5) := 1;
    wdautofitfixed CONSTANT NUMBER (5) := 0;
    ---- wdUnits Class members
    wdcharacter CONSTANT NUMBER (5) := 1;
    wdmove CONSTANT NUMBER (5) := 0; --Default
    --wdBorderType Class members
    wdborderleft CONSTANT NUMBER := -2;
    wdborderright CONSTANT NUMBER := -4;
    wdbordertop CONSTANT NUMBER := -1;
    wdborderbottom CONSTANT NUMBER := -3;
    --WdLineStyle Class member
    wdlinestylenone CONSTANT NUMBER := 0;
    BEGIN
    hApplication:=OLE2.CREATE_OBJ('Word.Application');
    OLE2.SET_PROPERTY(hApplication, 'Visible', 1);
    hDocuments := OLE2.GET_OBJ_PROPERTY(hApplication, 'Documents');
    hDocument := OLE2.INVOKE_OBJ(hDocuments, 'Add');
    hSelection := OLE2.GET_OBJ_PROPERTY(hApplication, 'Selection');
    hFont := OLE2.GET_OBJ_PROPERTY(hSelection, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Name', 'Calibri');
    OLE2.SET_PROPERTY(hFont, 'Size', 11);
    OLE2.SET_PROPERTY(hFont, 'Bold', FALSE );
    OLE2.INVOKE(hSelection, 'TypeParagraph');
    hParagraphFormat := OLE2.GET_OBJ_PROPERTY(hSelection, 'ParagraphFormat');
    OLE2.SET_PROPERTY(hParagraphFormat, 'Alignment', wdAlignParagraphLeft);
    OLE2.RELEASE_OBJ(hParagraphFormat);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'Hello World');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.INVOKE(hSelection, 'TypeParagraph');
    htables := ole2.get_obj_property (hdocument, 'Tables');
    hrange := ole2.get_obj_property (hselection, 'Range');
    args := ole2.create_arglist;
    ole2.add_arg_obj (args, hrange); --Range
    ole2.add_arg (args, 1); --NumRows
    ole2.add_arg (args, 6); --NumColumns
    ole2.add_arg (args, wdword9tablebehavior); --DefaultTableBehavior
    ole2.add_arg (args, wdautofitfixed); --FitBehavior
    htable := ole2.invoke_obj (htables
    ,'Add'
    ,args
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcharacter);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveLeft'
    ,args
    ole2.destroy_arglist (args);
    args := ole2.create_arglist;
    ole2.add_arg (args, 'CellValue');
    ole2.invoke (hselection
    ,'TypeText'
    ,args
    ole2.destroy_arglist (args);
    ole2.RELEASE_OBJ (happlication);
    ole2.RELEASE_OBJ (hdocuments);
    ole2.RELEASE_OBJ (hdocument);
    ole2.RELEASE_OBJ (hfont);
    ole2.RELEASE_OBJ (hparagraphformat);
    ole2.RELEASE_OBJ (htables);
    ole2.RELEASE_OBJ (hrange);
    END;

    Once again thanks for the help John. Unfortunately I cannot use only bookmarks, because the text to be entered from the application is of undetermined length and therefore since the possibility of wrapping exists, it would not be able to give me the same formatting abilty as using a table.
    However, the good news is that I have been able to find the solution. I am posting my code here so that it is available to anyone else who might have the same issue. Thanks again.
    Here is my code and my comments in it explain what it does.
    PROCEDURE extract_to_word
    IS
    /* First of all I would like to acknowledge the help I have got from experts who have posted a lot of this code on the web which I have used here. Special thanks go to someone by the name of sfvb
    found here http://www.tek-tips.com/userinfo.cfm?member=sfvbsfvb
    This procedure does the following:
    1. Opens a word document.
    2. Creates a header and pastes a picture in the header e.g your company logo with address. Please note that the image should have both the address and the logo in it. It can be created using paint where you can write your address at one end and paste a bmp or jpg picture of your logo at the other end.
    3. Writes text with specified font and size. It calls a separate procedure PRINT_LINE to do this.
    4. Creates a table on the document with specified number of columns with fixed width.
    5. Populates the cells of the table-
    first with headers written by calls to WRITE_HEADINGS procedure.
    next with data from a block of the Forms application by calls to WRITE_DATA procedure
    6. Comes out of the table and continues to write text.
    The three procedures that are repeatedly called are described after the end of this procedure.
    Note: While I have made every attempt to ensure that the code does not generate error on account of my writing the explanatory notes, I cannot be sure of having made some typos. If the code does not compile, it is most probably be on account of something I have missed in entering the comments and explanation.
    Disclaimer:
    I am not the sole author of this code. I have taken help from other open sources and copyright infringement if any is entirely unintentional.
    happlication ole2.obj_type;
    hwindow ole2.obj_type;
    hpane ole2.obj_type;
    hview ole2.obj_type;
    hdocuments ole2.obj_type;
    hdocument ole2.obj_type;
    hselection ole2.obj_type;
    hparagraphformat ole2.obj_type;
    hrange ole2.obj_type;
    hfields ole2.obj_type;
    hfont ole2.obj_type;
    hinlineshapes ole2.obj_type;
    hpars ole2.obj_type;
    hpar ole2.obj_type;
    htabstops ole2.obj_type;
    hactivedocument ole2.obj_type;
    htables ole2.obj_type;
    htable ole2.obj_type;
    hcolumns ole2.obj_type;
    hcells ole2.obj_type;
    hrows ole2.obj_type;
    hshading ole2.obj_type;
    hinsertrow ole2.obj_type;
    hborders ole2.obj_type;
    hshading ole2.obj_type;
    args ole2.list_type;
    wdalignparagraphleft CONSTANT NUMBER (3) := 0;
    wdalignparagraphcenter CONSTANT NUMBER (3) := 1;
    wdalignparagraphright CONSTANT NUMBER (3) := 2;
    wdseekcurrentpageheader CONSTANT NUMBER (3) := 9;
    wdseekcurrentpagefooter CONSTANT NUMBER (3) := 10;
    wdseekmaindocument CONSTANT NUMBER (3) := 0;
    wdfieldpage CONSTANT NUMBER (3) := 33;
    wdfieldnumpages CONSTANT NUMBER (3) := 26;
    wdpagebreak CONSTANT NUMBER (3) := 7;
    wdstory CONSTANT NUMBER (3) := 6;
    wdword CONSTANT NUMBER (5) := 2;
    wdsentence CONSTANT NUMBER (5) := 3;
    wdword8tablebehavior CONSTANT NUMBER (5) := 0;
    wdword9tablebehavior CONSTANT NUMBER (5) := 1;
    wdautofitcontent CONSTANT NUMBER (5) := 1;
    wdautofitfixed CONSTANT NUMBER (5) := 0;
    wdautofitwindow CONSTANT NUMBER (5) := 2;
    wdunderlinesingle CONSTANT NUMBER (5) := 1;
    ---- wdUnits Class members
    wdcell CONSTANT NUMBER (5) := 12;
    wdcharacter CONSTANT NUMBER (5) := 1;
    wdword CONSTANT NUMBER (5) := 2;
    wdsentence CONSTANT NUMBER (5) := 3;
    wdline CONSTANT NUMBER (5) := 5;
    ---- wdMovementType Class members
    wdextend CONSTANT NUMBER (5) := 1;
    wdmove CONSTANT NUMBER (5) := 0;
    --wdBorderType Class members
    wdborderleft CONSTANT NUMBER := -2;
    wdborderright CONSTANT NUMBER := -4;
    wdbordertop CONSTANT NUMBER := -1;
    wdborderbottom CONSTANT NUMBER := -3;
    --WdLineStyle Class member
    wdlinestylenone CONSTANT NUMBER := 0;
    mytab CONSTANT VARCHAR2 (1) := CHR (9);
    myblue CONSTANT NUMBER (8) := 16711680; --FF0000
    mygreen CONSTANT NUMBER (8) := 65280; --00FF00
    myred CONSTANT NUMBER (8) := 255; --0000FF
    mydkgreen CONSTANT NUMBER (8) := 32768; --008000
    myblack CONSTANT NUMBER (8) := 0; --000000
    mytext VARCHAR2 (2000);
    BEGIN
    happlication := ole2.create_obj ('Word.Application');
    ole2.set_property (happlication
    ,'Visible'
    ,1
    hdocuments :=
    ole2.get_obj_property (happlication, 'Documents');
    hdocument := ole2.invoke_obj (hdocuments, 'Add');
    -------- Create Header and Footer --------
    hwindow :=
    ole2.get_obj_property (happlication, 'ActiveWindow');
    hpane := ole2.get_obj_property (hwindow, 'ActivePane');
    hview := ole2.get_obj_property (hpane, 'View');
    ---- Header Section ---
    ole2.set_property (hview
    ,'SeekView'
    ,wdseekcurrentpageheader
    hselection :=
    ole2.get_obj_property (happlication, 'Selection');
    hfont := ole2.get_obj_property (hselection, 'Font');
    ole2.set_property (hfont
    ,'Name'
    ,'Calibri'
    ole2.set_property (hfont
    ,'Size'
    ,10
    ole2.set_property (hfont
    ,'Bold'
    ,FALSE
    ole2.set_property (hfont
    ,'Color'
    ,myblack
    ole2.RELEASE_OBJ (hfont);
    args := ole2.create_arglist;
    --Below is the location of your jpg file that contains the logo and address
    ole2.add_arg (args, 'C:\temp\AMHeader2.jpg');
    hinlineshapes :=
    ole2.get_obj_property (hselection, 'InlineShapes');
    ole2.invoke (hinlineshapes
    ,'AddPicture'
    ,args
    ole2.destroy_arglist (args);
    ole2.RELEASE_OBJ (hinlineshapes);
    ole2.set_property (hview
    ,'SeekView'
    ,wdseekmaindocument
    ole2.RELEASE_OBJ (hview);
    ole2.RELEASE_OBJ (hpane);
    ole2.RELEASE_OBJ (hwindow);
    -------- Insert Text --------
    hfont := ole2.get_obj_property (hselection, 'Font');
    ole2.set_property (hfont
    ,'Name'
    ,'Calibri'
    ole2.set_property (hfont
    ,'Size'
    ,9
    ole2.set_property (hfont
    ,'Bold'
    ,FALSE
    ole2.set_property (hfont
    ,'Color'
    ,myblack
    ole2.invoke (hselection, 'TypeParagraph');
    hparagraphformat :=
    ole2.get_obj_property (hselection, 'ParagraphFormat');
    ole2.set_property (hparagraphformat
    ,'Alignment'
    ,wdalignparagraphleft
    ole2.RELEASE_OBJ (hparagraphformat);
    print_line (hselection
    , 'Date ' || TO_CHAR (TRUNC (SYSDATE), 'MM/DD/YYYY')
    ,NULL
    print_line (hselection
    ,NULL
    --The following prints the address of the recipient of the letter.
    print_line (hselection
    ,addr_line1
    ,NULL
    print_line (hselection
    ,addr_line2
    ,NULL
    print_line (hselection
    ,addr_line3
    ,NULL
    print_line (hselection
    ,addr_line4
    ,NULL
    print_line (hselection
    ,addr_line5
    ,NULL
    --Call like the one below are to insert blank lines
    hselection :=
    ole2.get_obj_property (happlication, 'Selection');
    print_line (hselection
    ,NULL
    ,NULL
    print_line (hselection
    ,'Your salutation'
    ,NULL
    print_line (hselection
    ,NULL
    ,'NULL
    print_line (hselection
    ,'Ref: '
    ,NULL
    print_line (hselection
    ,NULL
    ,NULL
    print_line
    (hselection
    ,'Whatever text you want to appear on this line.'
    ,NULL
    print_line (hselection
    ,NULL
    ,NULL
    -------- Create Table --------
    htables := ole2.get_obj_property (hdocument, 'Tables');
    hrange := ole2.get_obj_property (hselection, 'Range');
    args := ole2.create_arglist;
    ole2.add_arg_obj (args, hrange); --Range 
    ole2.add_arg (args, 1); --NumRows    The rest of the rows are created later as and when required
    ole2.add_arg (args, 6); --NumColumns This creates a table of 6 columns.
    ole2.add_arg (args, wdword9tablebehavior); --DefaultTableBehavior
    ole2.add_arg (args, wdautofitfixed); --FitBehavior
    htable := ole2.invoke_obj (htables
    ,'Add'
    ,args
    ole2.destroy_arglist (args);
    -- [Borders removal start]The following piece of code removes all the borders. Use of this is optional.
    hborders := ole2.get_obj_property (htable, 'Borders');          
    ole2.set_property (hborders                                        
    ,'OutsideLineStyle'
    ,wdlinestylenone
    ole2.set_property (hborders
    ,'InsideLineStyle'
    ,wdlinestylenone
    ole2.RELEASE_OBJ (hborders);
    --[Borders removal end]
    --The following code makes the cursor enter the table. I took quite some time
    --figuring this out.
    hselection := ole2.get_obj_property (hdocument, 'Tables');
    hselection := ole2.get_obj_property (happlication, 'Selection');
    --WRITE_HEADINGS is the procedure called each time only to write headings.
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 1'
    ,8
    --The following moves the cursor to the next cell on the right.
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 2'
    ,7
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 3'
    ,7
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 4'
    ,8
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 5'
    ,5
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 6'
    ,8
    --The following moves the cursor back to the first cell on row 1 column 1
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 6);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveLeft'
    ,args
    ole2.destroy_arglist (args);
    --Now we need to write data sourced from a multi record block in Oracle Forms
    GO_BLOCK ('your_block');
    FIRST_RECORD;
    record_cnt := 0;
    LOOP
    record_cnt := record_cnt + 1;
    ---In my application I gave the choice to the user to put a check mark on those records that he would want to print ------on the document and so the following.
    IF :your_block.cb_print = 'Y'          
    THEN               
    --This creates a new row below the first row that contains the column headers.
    args := ole2.create_arglist; ole2.add_arg (args, 1);
    ole2.invoke (hselection
    ,'InsertRowsBelow'
    ,args
    ole2.destroy_arglist (args);
    --WRITE_DATA is called each time to write the data in the cells.
    write_data (hselection
    , :your_block.item);
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_data (hselection
                   , :your_block.item);
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_data (hselection
                   ,:your_block.item);
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_data (hselection
         ,:your_block.item);
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_data (hselection
         ,:your_block.item);
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_data (hselection
    ,:your_block.item);
    END IF;
    EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
    NEXT_RECORD;
    END LOOP;
    --The following makes the cursor exit the table and back on document for any further
    --writing of text.
    args := ole2.create_arglist;
    ole2.add_arg (args, wdline);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveDown'
    ,args
    print_line (hselection           --As mentioned earlier, this enters a blank line.
    ,NULL
    ,NULL
    print_line (hselection
    ,'Boilerplate text: '
    ,your_variable
    print_line (hselection
    ,'Boilerplate text: '
    ,your_variable
    --You can print as many lines as required by making call to the PRINT_LINE procedure.
    ole2.RELEASE_OBJ (htables);
    ole2.RELEASE_OBJ (hfont);
    ole2.RELEASE_OBJ (hselection);
    ole2.RELEASE_OBJ (hdocument);
    ole2.RELEASE_OBJ (hdocuments);
    ole2.RELEASE_OBJ (happlication);
    END;
    PROCEDURE PRINT_LINE
    ( v_sel OLE2.OBJ_TYPE
    , v_text VARCHAR2
    , v_field varchar2)
    IS
    /* This procedure takes in three arguments.
    The first v_sel is the VB selection object.
    v_text is the static or boilerplate text that needs to be printed on the document.
    v_field is the value of the item or variable from the program.
    v_args      OLE2.LIST_TYPE;
    hTab     CONSTANT varchar2(1) := chr(9); --This is the vb constant for tabstop
    BEGIN
    v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, v_text);
    OLE2.INVOKE(v_sel, 'TypeText', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    --The following replicates tabbing. This was used so that the field values are aligned at a tabstop.
    --When printing a blank line NULL is passed in as the argument
    v_args := OLE2.CREATE_ARGLIST;
         OLE2.ADD_ARG(v_args, hTab);
         OLE2.INVOKE(v_sel, 'TypeText', v_args);
         OLE2.DESTROY_ARGLIST(v_args);
    --The following writes the value of the variable at the tabstop.      
         v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, v_field);
    OLE2.INVOKE(v_sel, 'TypeText', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    OLE2.INVOKE(v_sel, 'TypeParagraph');
    END;
    PROCEDURE WRITE_HEADINGS (SELIN OLE2.OBJ_TYPE, TEXTIN VARCHAR2, COUNTIN NUMBER)
    IS
    /* This procedure is used to write headings in the first row of the table.
    SELIN is the Selection object
    TEXTIN is the boilerplate text to be written as the header of a column.
    COUNTIN is the number of characters in the header text. This is required
    to replicate the action bolding the font of the header.
    hFont          OLE2.OBJ_TYPE;
    v_args OLE2.LIST_TYPE;
    wdCharacter CONSTANT number(5) := 1; --Default
    --wdUnderline Class members
    wdUnderlineSingle                     CONSTANT NUMBER(5) := 1;
    ---- wdMovementType Class members
    wdExtend CONSTANT number(5) := 1;
    wdMove CONSTANT number(5) := 0; --Default
    ---- WdParagraphAlignment Class members
    wdAlignParagraphCenter CONSTANT number(5) := 1;
    wdAlignParagraphLeft CONSTANT number(5) := 0;
    wdAlignParagraphRight CONSTANT number(5) := 2;
    ---- HexColor = BBGGRR
    myLightBlue CONSTANT number(8) := 16755370; --FFAAAA
    BEGIN
    hFont := OLE2.GET_OBJ_PROPERTY(selin, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Name', 'Calibri');
    OLE2.SET_PROPERTY(hFont, 'Size', 10);
    OLE2.SET_PROPERTY(hFont, 'Bold', True);
    OLE2.RELEASE_OBJ(hFont);
    v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, textin);
    OLE2.INVOKE(selin, 'TypeText', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, wdCharacter);
    OLE2.ADD_ARG(v_args, countin);
    OLE2.ADD_ARG(v_args, wdMove);
    OLE2.INVOKE(selin, 'MoveLeft', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, wdCharacter); --Unit
    OLE2.ADD_ARG(v_args, countin); --Count
    OLE2.ADD_ARG(v_args, wdExtend); --Extend
    OLE2.INVOKE(selin, 'MoveRight', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    hFont := OLE2.GET_OBJ_PROPERTY(selin, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Underline', wdUnderlineSingle);
    OLE2.RELEASE_OBJ(hFont);
    END;
    PROCEDURE WRITE_DATA (SELIN OLE2.OBJ_TYPE, TEXTIN VARCHAR2)
    IS
    /*This procedure writes data in the cells of the table
    hFont     OLE2.OBJ_TYPE;
    v_args OLE2.LIST_TYPE;
    wdCharacter CONSTANT number(5) := 1; --Default
    --wdUnderline Class members
    wdUnderlineSingle                     CONSTANT NUMBER(5) := 0;
    ---- wdMovementType Class members
    wdExtend CONSTANT number(5) := 1;
    wdMove CONSTANT number(5) := 0; --Default
    ---- WdParagraphAlignment Class members
    wdAlignParagraphCenter CONSTANT number(5) := 1;
    wdAlignParagraphLeft CONSTANT number(5) := 0;
    wdAlignParagraphRight CONSTANT number(5) := 2;
    ---- HexColor = BBGGRR
    myLightBlue CONSTANT number(8) := 16755370; --FFAAAA
    BEGIN
    hFont := OLE2.GET_OBJ_PROPERTY(selin, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Name', 'Calibri');
    OLE2.SET_PROPERTY(hFont, 'Size', 10);
    OLE2.SET_PROPERTY(hFont, 'Bold', False);
    OLE2.SET_PROPERTY(hFont, 'Underline', wdUnderlineSingle);
    OLE2.RELEASE_OBJ(hFont);
    v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, textin);
    OLE2.INVOKE(selin, 'TypeText', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    END;
    Edited by: smilingbandit on 31-Mar-2010 7:05 PM
    Edited by: smilingbandit on 31-Mar-2010 8:23 PM
    Edited by: smilingbandit on Apr 1, 2010 6:14 AM: Reason - Fixed formatting of comments.

  • Firefox doesn't display text properly on pages created with email marketing tool (Constant Contact).

    Pages that are built with Constant Contact email marketing application don't display correctly. Different sections of text, usually a paragraph or list group, are readable but "shaded out." This is happening on Mac and Windows platforms.
    The pages are built using standard HTML tags and the problem doesn't appear with other browsers.

    Can you post a link to one or more of such pages?
    * "Clear the Cache": Firefox > Preferences > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Firefox > Preferences > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • PDF forms have problems displaying text and only appears when the field is selected

    Hello,
    I created some pdf forms to distribute to the company clients. But we are having some people complaining about the text visibility. When they have work in team, the pdf that they receive from a third person often appears unfill or without text, the text is only visible when the field is selected. I need to find a solution for this because our company products are base on this forms.
    If there is any addition information that I should add to understand what is happening and how to fix it, I'll be happy to write it.
    In the company, we all have mac and the forms where created innitially in Adobe acrobat 9 pro, but we have now Adobe acropabt XI pro.
    The users have both Mac and Windows systems.
    Thank you,

    This is usually caused by the form being filled-in and saved by a Mac user who is using the Preview application to view the PDF. More information is here: http://kb2.adobe.com/community/publishing/885/cpsid_88564.html
    It is a good idea to inform your users that Adobe Reader (or Acrobat) should be used to work with the forms.

  • Browsers having problem displaying text

    All text is displaying as the letter A in boxes. I'm typing this blind because it's happening. PLEASE HELP!!!!

    Use a grid of square labels. Set the text for the starting labels. Alternatively, but I haven't tried this, you could use square text areas and make the starting ones uneditable.

  • Problem with fetching a row after creating a standard form

    ORA-02291: integrity constraint (TICKET_DEV.MAILALERTTEXT_MAILALERTTY_FK1) violated - parent key not found
    Unable to process row of table MAILALERTTEXT.
    I have created a form on the table mailalerttext with the intention of beeing able to put in new mailalert texts. I have taken all the fields of that table:
    MAILALERTTEXTID,MAILSUBJECT,MAILCONTENT,APPLICATIECD,MAILALERTTYPEID
    and linked it to the mailalerttype table:
    MAILALERTTYPEID,OMSCHRIJVING,CODE
    I've deleted the field applicatiecd. I've made the mailalerttypeid field a select list using a lov_mailalerttypes, with the following query:
    select maty.omschrijving display_value, maty.mailalerttypeid return_value
    from mailalerttype maty
    order by 1
    All the processes are just standard, nothing has been changed to them.
    Any ideas what could cause this ? Meanwhile I'll keep trying.
    Floris

    I have created a different form on a similar table with the same comments. dropped the mailalerttype column, and added a mailalerttypecode column.
    Inserting now works, with one quirky fact, is that it did one insert, and then it always overwrites the last record. Even if I chose different types, it just changes the last record. So I know now that at least it inserts data, it just doesn't seem to think or make the action, add one count to the sequence and take the next number, which should be 65, which in a way is good if i want to make a difference between the default texts and new ones. So I'm still doing something wrong, or I forgot to do something. Has anyone an idea what ?
    Its just that if I can get this to work, then maybe I can find out, how to get it to work on the mailalerttext table and just keep the maillalerttextbis table as backup.

  • Problem rotating rectangle (selecting corners) after creating with rectangle tool in illustrator

    I'm using the latest CC version of Illustrator. When I draw a rectangle using the rectangle tool, I no longer seem to be able to select the corners to resize the rectangle nor does the cursor turn to a rotate icon when I put the mouse just outside the corner. I know that Ai CC treats rectangles differently now, with the live rectangles and the rounded corner options, and the transform box opening automatically. What I'm wondering, and hoping isn't the case, is whether this is this at the expense of being able to go right in and resize using the just the mouse? I know that there is the  "Object > Shape > Expand" option, but having to do that for every time I draw a rectangle is time-consuming and adds and extra step that was unnecessary before. I saw a tutorial on Lynda where the instructor drew a live rectangle in CC AND was still able to resize it by grabbing the corner "handle". Anyone know if this is just a setting I need to turn on or something similarly easy, or is it a case of Adobe inadvertently making the workflow longer when trying to make it easier? And yes, I have "show bounding box" selected under VIEW.

    MOD indi-go girl,
    I am afraid you have come across the Live Rectangle bug which is limited to the MAC versions starting with 10.7 and 10.8, but not 10.9 (Mavericks) or 10.10 (Yosemite). Hopefully, the bug will be fixed soon.
    So a switch to Mavericks or Yosemite with a reinstallation might be the way to solve it here and now.
    To get round it in each case, it is possible to Expand the Live Rectangles to get normal old fashioned rectangles, or to Pathfinder>Unite, or to use the Scale Tool or the Free Transform Tool.
    A more permanent way round that is to create normal old fashioned rectangles, after running the free script created by Pawel, see this thread with download link:
    https://forums.adobe.com/thread/1587587

  • Problem while selecting a table after creating the dblink

    Hi,
    We have created the dblink for oracle to sql server and it created successfully,
    But while selecting the table from oracle we are getting the below issue,
    select * from "sysdiagrams"@omniyat;
    ERROR at line 1:
    ORA-00942: table or view does not exist
    [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
    'sysdiagrams'. {42S02,NativeErr = 208}[Microsoft][ODBC SQL Server Driver][SQL
    Server]Statement(s) could not be prepared. {42000,NativeErr = 8180}
    ORA-02063: preceding 2 lines from OMNIYAT
    Kindly provide us the solution to resolve this issue.
    Regards
    Sham

    Please see:
    Odbc Connection From Oracle To SQL*Server Fails With Errors Ora-28546 and Ora-2063 When Using Connection via Database Link. (Doc ID 1389492.1)
    To BottomTo Bottom
    Error 08001,NativeErr = 11 Instance Invalid or Not Running Connecting to SQL*Server Using Dg4MSQL (Doc ID 1349023.1)
    How to Resolve Common Errors Encountered while using Database Gateways (DG4IFMX, Dg4MSQL, DG4SYBS), DG4ODBC or Generic Connectivity (Doc ID 234517.1)
    Thanks,
    Hussein

  • Problem in displaying text inside the item label - JFREECHART

    Hi All,
    I dont know whether this is the right place or not to post the queries related to jfreechart here .
    I am facing a problem in displaying the text inside the item label in jfreeChart. I am trying to print the text in 2 lines one below the other at the top of each bar in waterfall chart.
    Please find the code below in next post. The problem i am facing is it is neglecting the new line character . If any one knows how to display the text one below the other please help me out .
    Thanks in advance .
    Regards,
    Diw

    i am facing the problem in pasting the complete code as its exceeds the message text limitiation, please find the link below for the code .
    http://www.java-forums.org/java-2d/12087-problem-displaying-text-inside-item-label-jfreechart.html#post36648
    Early response will be appreciated . Thanks in advance
    Regards,
    Diw
    Edited by: Diw on Sep 30, 2008 11:15 AM
    Edited by: Diw on Sep 30, 2008 11:16 AM

  • Error when try to power on virtual machine after creating

    I created the virtual machines from the virtual machine templates in the OVM server Manager console.After creating,status of the virtual machine turned to be power off. Then I tried to power on it. But it prompt error as "     failed:<Exception: no server selected to run vm('/OVS/running_pool/18_Test01') mem_size=1024>".Then I check the /var/log/xend/xend.log. I can found messages of "VmError: HVM guest support is unavailable: is VT/AMD-V supported by your CPU and enabled in your BIOS?".
    How should I deal with this error?
    Thanks a lot,
    Mary

    Please check whether your box support fully virtualized guest or not beforehand.There are two main requirements for the hardware virtualization is to be enabled in a system:
    1. BIOS should be setup for virtualization
    go to "BIOS Setup" to enable "Virutalization Technology"
    2. The CPU should support virtualization
    check the keywords( "vmx" for Intel cpu "svm" for AMD cpu) from /proc/cpuinfo

  • Help using right-click to display text in the console/call a pop-up menu

    Hi folks,
    I hope someone can help me with this problem because, to be honest, I cannot see where I'm going wrong!
    Basically, I'm trying to create a routine to display a bit of text in the console (and, if I can get this to work, call a pop-up menu) if a user clicks on an image panel (which I've already created and works fine). My code for this is as follows:
    // --- Rest of program here
    this.addMouseListener(new MouseAdapter()
    public void mouseClicked(MouseEvent e)
    // This bit works fine
    if (e.getClickCount()>=2)
    // Display a dialog box if the user double clicks on the panel
    else if (e.isPopupTrigger())
    System.out.println("Right mouse button clicked")
    // Rest of program in hereThe problem is that, despite my best efforts, "Right mouse button clicked" does not display in the console if the right mouse button is clicked, and I cannot figure out why. I can, however, get it to work PARTIALLY if I use e.isControlDown(), but this only works (I guess) if the user is working on a Mac but isn't using an external mouse. Not ideal.
    I'm developing on a Mac (10.4.8) using Eclipse (rather than a PC), but this surely cannot be the problem?

    Do you start this application in a console window?
    If yes then isPopupTrigger() is never true - presumably mouseClicked gets called.
    If no then please note that java does not 'pop' a console window when System.out is called. System.out represents an existing output connection. If you want to pop some sort of console then you need to add code to do that.

  • Can anyone help me solve the problem of text displaying very rough on my new ASUS PA279Q display monitor running off my MacBook Pro?

    This is regarding a brand new ASUS PA 279Q, 2560 x 1440 IPS monitor. I'm connected via mini display port (into thunderbolt port on MacBook Pro) to display port on ASUS monitor; using cable ASUS included with the monitor. Mid 2012 MacBook Pro…full specs at bottom of this post.
    I have resolution set at 2560 x 1440 which is the native resolution according to the ASUS spec. I tried the other resolutions available in my System Preferences and text displayed rough with those settings too. I've tried adjusting contrast, brightness and sharpness via the ASUS control panel and didn't solve the problem. Also tried calibrating via Mac's system preferences/display and that did not improve text display either. All the text on this monitor (no matter what software I launch, Finder, InDesign, Illustrator, MS Word, Excel, VMWare Windows XP, Windows versions of Word, Excel, Acrobat, etc, all are consistently rendering text the same way ---  ROUGH and with "HALOS" around each letter.
    All point sizes of text and at various scales, display very rough on the screen. (My comparison is the retina display of my MBP and a Thunderbolt…so those two displays are my expectations.) I'm using the same MBP for both a Thunderbolt display (at work) and this ASUS at my home office.
    On the ASUS it's not as noticeable when the text is on white backgrounds, but I'm a graphic designer and compose images with text all day everyday. Not to mention the specs on this ASUS PA279Q indicate it's built for the professional so I would expect better text rendering. I haven't even addressed color calibration and balance yet, because that won't matter to me if the text won't display any better than it is now.
    I was so hopeful after researching all the specs on this monitor it would be a viable alternative to the glossy display of the Thunderbolt display. (Which, I do love the Thunderbolt display for it's clarity and how it displays crisp, clean text at all sizes. (This ASUS actually displays text decently if I increase the text so each letter is about 4" high. Which is pointless for practical purposes -- that'd be like doing page layout through a microscope!)
    I kept holding off on getting a monitor for the home office thinking the Thunderbolt would be updated soon. I'd be sick if I dropped a grand on piece of 2011 technology only to learn a few days later an updated Thunderbolt display hit the market! Not to mention, I'm praying Apple comes out with a less reflective Thunderbolt display. The glare and reflection is the main reason I looked elsewhere for a large monitor; hence my asking for help. Hoping the ASUS text display issue can be worked out. My expectation is for it to display like the MBP retina and Thunderbolt display text. That possible?
    Alternatively, I guess I could do the Apple Refurb Thunderbolt at $799. And see if there's a decent aftermarket anti-glare I could stick on it?
    Thanks for reading my post. Hope someone can help; offer any suggestions? Words or wisdom?
    Has anyone else had similar issues and figured out a resolution? Help!
    MacBook Pro
    Retina, Mid 2012, 2.3 Ghz Intel i7
    8GB 1600 MHz DDR3
    OS X 10.8.5
    NVIDIA GeForce GT 650M 1024 MB
    ASUS PA279Q

    I uninstalled those two items. It still runs slow on start-up and when opening safari, firefox, iphoto, itunes, etc. It's not snappy like it used to be. Any other ideas? Thanks.

  • Problem displaying CLOB in text file

    Hello All,
    I have a problem displaying the content from the database in notepad. When I click on a link on my jsf screen, I retrieve the data and display it in notepad.
    I have my text content stored in the database with CLOB datatype. When I look in the database the data looks in the following format:
    ---------STARTS FROM NEXT LINE-------------
    The firm, known for its keen oversight of products, has been the subject of complaints from firms who have had apps blocked from the store. Some developers have complained that the company's rules seem inconsistent.
    Some have found apps blocked after seemingly minor updates, or for having content deemed inappropriate by them. In light of this, and after careful consideration, I believe it is unnecessary to sign this measure at this time.
    Sincerely,
    ABC
    ----------ENDS IN THE PREVIOUS LINE------------
    Now when I display this content onto the notepad, all the spaces and new line characters are lost, and the entire display looks awkward. This is how it looks:
    The firm, known for its keen oversight of products, has been the subject of complaints from firms who have had apps blocked from the store. Some developers have complained that the company's rules seem inconsistent.[]Some have found apps blocked after seemingly minor updates, or for having content deemed inappropriate by them. In light of this, and after careful consideration, I believe it is unnecessary to sign this measure at this time.[]Sincerely,[]ABC
    All the new line characters are lost and it just puts some junk character in place of a new line.
    When I copy the same text onto textpad, everything is alright and it displays exactly the way it is present in the database. I am also open to display the content in html, but in HTML it doesn't even display me the junk character in place of new line. It is just one single string without any line separators.
    I am using the following code to put the content into the text.
    public String writeMessage(){
       OutputStream outStream = null;
       HttpServletResponse response = getServletResponseFromFacesContext();
       Reader data = null;
       Writer writer = null;
       try{
          response.reset();
          response.setContentType("text/plain; charset=UTF-8");
          response.setHeader("Content-Disposition","attachment; filename="+id+"_Message.txt");
          outStream = response.getOutputStream();
          QueryRemote remote = serviceLocator.getQueriessEJB();
          data = remote.retrieveGovernorsVetoMessage(billId);
          writer = new BufferedWriter(new OutputStreamWriter( outStream, "UTF-8" ) );
          int charsRead;
          char[] cbuf = new char[1024];
          while ((charsRead = data.read(cbuf)) != -1) {
             System.out.println(charsRead);
          writer.write(cbuf, 0, charsRead);
          writer.flush();
       }catch(Exception ex){
          ex.printStackTrace();
       }finally{
          //Close outStream, data, writer
          facesContext.responseComplete();
       return null;
    }Any help or hints on resolving this issue would be highly appreciated.
    Thanks.

    The data is imported from a third party application to my database. It doesn't display any newline characters when I view the data.
    But when I do a regular expression search on text pad, I could see that my clob contains \n as the new line character. Is there a way to replace \n with \n\r while writing the data.
    Thanks.

  • Facing problem in creating socket in a method from an already deployed application exe while same method is working from another exe from same environment from same location.

    Dll Created In: - MFC VC
    6.0
    Application Exe Developed In:
    - VC 6.0, C# and VB.net (Applications which are using dll)
    OS: - Windows XP sp2 32bit
    / Windows Server 2008 64 bit
    Problem: - Facing problem in creating socket
    in a method from an already deployed application exe while same method is working from another exe from same environment from same location.
    Description: - We have product component which
    has an exe component and from exe we invoke a method, which is defining in dll, and that dll is developed in MFC VC6.0. In the dll we have a method which downloads images from another system after making socket connection. But every time we are getting Error
    code 7, it is not giving desire result while same method is working from another exe from same environment from same location. And also me dll is deployed on many systems and giving proper output from same application.
    Already Attempt: - Because error is coming on
    client side so what we did, we created a driver in C# which invokes same method from same environment(on client machine) using same dll and we are astonished because it worked fine there.
    Kindly Suggest: -
    We are not able to figure out root cause because nothing is coming in windows event logs but what I did, for finding the problem line, I wrote logs on each line and found the exact line in application exe which is not working,
    actually  it is not executing Create () method,
    I will give snippet of the code for understanding the problem because we are not finding any kind solution for it.
    Kindly assist us in understanding and fixing this problem.
    Code Snippet: -
    Int Initialize (LPTSTR SiteAddress, short PortId)
    try
    CClientTSSocket *m_pJtsSockto;
    m_pJtsSockto = new CClientTSSocket;
    LONG lErr = m_pJtsSockto->ConnectTS(csIPAddress,PortId);
    ErrorLog (0, 0, "--------ConnectTS has been called ------------","" );
    catch(...)
    DWORD errorCode = GetLastError();
    CString errorMessage ;
    errorMessage.Format("%lu",errorCode);
    ErrorLog (0, 0, "Image System", (LPTSTR)(LPCTSTR)errorMessage);
    return  IS_ERR_WINDOWS;
    Note: -
    CClientTSSocket extends CAsyncSocket
     IS_ERR_WINDOWS is a macro error code which value I found 7.
    LONG ConnectTS(CString strIP, UINT n_Port)
    ErrorLog(0,0,"ConnectTS is calling Create [is going to call]","");
    if(!Create())
    ErrorLog(0,0,"ConnectTS is calling [Create not called successfully] ","");
     n_Err = GetLastError();
     ErrorLog(n_Err,0,"ConnectTS is calling1111111111111111Erorrrrrrrrrrrrr","");
    return NET_INIT;
    ErrorLog(0,0,"ConnectTS is calling2222222222222222222","");
    if(!AsyncSelect(0))
    n_Err = GetLastError();
    return NET_INIT;
    if(!Connect(strIP,n_Port))
    n_Err = GetLastError();
    ErrorLog(n_Err,0,"ConnectTS","");
    return SERVER_NOT_CONNECTED;
    Code description: -
    From
    int GETImage_MT() method we call Initialize() method and pass client machine IP and Port and there we call
    ConnectTS() method, In this method we Create() method and finally it returns the error code as mention in macro 7.
    Logs after running the program: -
    --------ConnectTS has been called ------------
    ConnectTS is calling Create [is going to call]
    Image System 
    0
    Note: - According to logs, problem is coming in Create method().
    Here 0 is errorMessage received in catch block. And from catch block it returns macro value 7. And when we run same method individually from same machine, same environment through same dll
    from different exe, it is working fine and we are facing any kind of problem. While same problem application was working properly earlier but now continuously it showing problem.
     Kindly assist us to resolve the issue.

    Pointer variable was already initialized; I have mention in code; kindly assist us.
    Dll Created In: - MFC VC 6.0
    Application Exe Developed In: - VC 6.0, C# and VB.net (Applications which are using dll)
    OS: - Windows XP sp2 32bit / Windows Server 2008 64 bit
    Problem: - Facing problem in creating socket
    in a method from an already deployed application exe while same method is working from another exe from same environment from same location.
    Description: - We have product component
    which has an exe component and from exe we invoke a method, which is defining in dll, and that dll is developed in MFC VC6.0. In the dll we have a method which downloads images from another system after making socket connection. But every time we are getting
    Error code 7, it is not giving desire result while same method is working from another exe from same environment from same location. And also me dll is deployed on many systems and giving proper output from same application.
    Already Attempt: - Because error is coming
    on client side so what we did, we created a driver in C# which invokes same method from same environment (on client machine) using same dll and we are astonished because it worked fine there.
    Kindly Suggest:
    - We are not able to figure out root cause because nothing is coming in windows event logs but what I did, for finding the problem line, I wrote logs on each line and found the exact line in application exe which is not
    working, actually it is not executing Create () method, I will give snippet of the code for understanding
    the problem because we are not finding any kind solution for it. Kindly assist us in understanding and fixing this problem.
    Code Snippet: -
    Int Initialize (LPTSTR SiteAddress, short PortId)
    try
    CClientTSSocket *m_pJtsSockto;
    m_pJtsSockto = new CClientTSSocket;
    LONG lErr = m_pJtsSockto->ConnectTS(csIPAddress,PortId);
    ErrorLog (0, 0, "--------ConnectTS has been called ------------","" );
    catch(...)
                       DWORD errorCode = GetLastError();
                       CString errorMessage ;
                       errorMessage.Format("%lu",errorCode);
                       ErrorLog (0, 0, "Image System", (LPTSTR)(LPCTSTR)errorMessage);
                       return  IS_ERR_WINDOWS;
    Note: - CClientTSSocket extends CAsyncSocket
     IS_ERR_WINDOWS is a macro error code which value I found 7.
    LONG ConnectTS(CString strIP, UINT n_Port)
              ErrorLog(0,0,"ConnectTS is calling Create [is going to call]","");
              if(!Create())
                       ErrorLog(0,0,"ConnectTS is calling [Create not called successfully] ","");
              n_Err = GetLastError();
              ErrorLog(n_Err,0,"ConnectTS is calling1111111111111111Erorrrrrrrrrrrrr","");
                      return NET_INIT;
              ErrorLog(0,0,"ConnectTS is calling2222222222222222222","");
              if(!AsyncSelect(0))
                       n_Err = GetLastError();
                       return NET_INIT;
              if(!Connect(strIP,n_Port))
                       n_Err = GetLastError();
                       ErrorLog(n_Err,0,"ConnectTS","");
                       return SERVER_NOT_CONNECTED;
    Code description: - From int GETImage_MT() method
    we call Initialize() method and pass client machine IP and Port and there we call ConnectTS() method, In
    this method we Create() method and finally it returns the error code as mention in macro 7.
    Logs after running the program: -
    --------ConnectTS has been called ------------
    ConnectTS is calling Create [is going to call]
    Image System  0
    Note: - According to logs, problem is coming in Create method(). Here
    0 is errorMessage received in catch block. And from catch block it returns macro value 7. And when we run same method individually from same machine, same environment through same dll from different exe, it is working fine and we are facing any kind of problem.
    While same problem application was working properly earlier but now continuously it showing problem.
     Kindly assist us to resolve the issue.

  • Problem in Displaying text Variable

    Hi All,
    I have problem in Displaying text Variable in the column header.
    My requirement is as follows.
    Column Level:
    0Calmonth/Year
    Key figures
    Keyfigure1 - Current Month  - Text Variable1
    Keyfigure2 - Previous Month - Text Variable2
    Keyfigure3 - Previous Month - Same as Text Variable2 - Display same month
    So based on each 0Calmonth/year these three keygirues should display in Header section like.
    Selection screen
    0Calmonth/Year - 03.2005 - 06.2005
    Result should be for each month.
    0Calmonth/Year
    03.2005                                04.2005                              05.2005
    03.2005 | 02.2005 | 02.20005  04.2005 | 03.2005 | 03.2005 05.2005 | 04.2005 | 04.2005.
    I have created two text variable with Customer exit.But not able to show exact months in the header section.
    For first three columns months are coming exactly, but from fourth columns it should display next month, but it is not coming.
    I have tried to code, but not successfull.
    Please help me how to go about this.
    Will assign full points.
    Regards,
    Vijay

    hi
    Check here........
    Re: Customer Exist for "From Current Date To Month End"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Cal month
    it might helpful for you
    assign points if helpful

Maybe you are looking for

  • Getting SOAException while calling SOA web service via pl/sql procedure

    Hi All, I created a 'Helloworld' BPEL process and successfuly deployed it. I tested it in the WLS and it is working. Now I wrote a pl/sql procedure which calls this 'HelloWorld' bpel process. When ran this procedure it throw me an error GetPayload: r

  • Trouble importing photos to iPhoto '11

    I import a group of photos - in my albums it shows the album there with 13 photos. I can sweep across the album and see the photos in there. But when I double-click on the album it shows no photos. I sign off, sign back on - the imported album is gon

  • KALC - Cost Centre field empty in FI Doc

    Hi All, When I post FI doc thru KALC, FI doc created by system automatically does not show the cost center to which such amount is allocated. Please advice how I can remove this error. Is there any note issued by SAP. Thanx in Advance

  • Adapting Crystal Reports to a New System

    Hi guys I'm implementing Best Practices for BI (based on BO Edge XI 3.1) ver. 1.31. My backend system is ECC 6.0 EhP3. Now I'm trying to import some reports from Crystal Reports to the ECC system, but it says the user I'm specifying in the "Set Datas

  • Menu - line wrap in a menu label

    Hi, In a Muse automatically generated menu, If I have a menu label (or in Muse a 'page name', which is used by Muse to generate the menu item label for that page) which is longer than the other menu labels (such as 'item1', 'item2', 'item3', 'this is