java basic help......

chathuranga8887

Active member
  • Nov 9, 2009
    583
    72
    28
    mawanella
    int R=10;
    nam aka kohomada
    sql statement akka liyanna
    St.executeUpadate
    ("INSERT INTO dk VALUES('mahes011',44444444,<WANT TO SEND R>)");


    HOW CAN I USE THAT PLSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
     

    ozone_buzzer

    Well-known member
  • Aug 6, 2007
    2,898
    80
    48
    Colombo
    ("INSERT INTO dk VALUES('mahes011',44444444,<Single quatation><double quatation><plus><THE VERIABLE><plus><double quatation><Single quatation>)")

    ("INSERT INTO dk VALUES('mahes011',44444444,' "+R +" ')")
     
    Last edited:

    Himoz

    Member
    Aug 7, 2010
    209
    11
    0
    ("INSERT INTO dk VALUES('mahes011',44444444," + Integer.toString(R) + ")");

    Meka hariyanta one ;)
    this is correct if data type regarding to the field is varchar/string.
    But if u need to store a pure numeric value don't use this method.
    bcz future manipulations may need to convert stored values again to Integer.:)