Q&A

  • INSERT문좀 봐주세염... ㅠ.ㅜ
    with query5 do
    begin
    sql.clear;
    sql.add(' insert into T00_04M                                           ');
    sql.add(' (N_OWNER, YY_GWASE, A_BASE, D_ACCT_SETT,R_RATE,  AREA_BUD,    ');
    sql.add('   AREA_BIGWA, AREA_GWASE, DTL_NOTE, AREA_GWASE_ALL)           ');
    sql.add(' values (''' + MaskEdit9.TEXT      + ''',' );  
    SQL.Add(        ' ''' + COPY(MaskEdit2.TEXT, 1 ,4) + ''',' );  
    SQL.Add(        ' ''' + '0'                                    + ''',' );  
    SQL.Add(        ' ''' + ''                                     + ''',' );  
    SQL.Add(        ' ''' + '1'                                   + ''',' );  
    SQL.Add(        ' ''' + '1'                                   + ''',' );  
    SQL.Add(        ' ''' + '0'                                   + ''',' );  
    SQL.Add(        ' ''' + '0'                                 + ''',' );  
    SQL.Add(        ' ''' + Edit4.TEXT                     + ''',' );  
    SQL.Add(        ' ''' + '0'                                 + ''')' );  
    ExecSQL;
  END;
에러없이 잘넘어 가는데.. ㅜ.ㅠ 값은 하나도 안들어 가염...
우앙~ 머가 잘못되었나염.....
6  COMMENTS
  • Profile
    박정운 2002.10.10 22:58
        with query5 do
        begin
        sql.clear;
        sql.add(' insert into T00_04M                                           ');
        sql.add(' (N_OWNER, YY_GWASE, A_BASE, D_ACCT_SETT,R_RATE,  AREA_BUD,    ');
        sql.add('   AREA_BIGWA, AREA_GWASE, DTL_NOTE, AREA_GWASE_ALL)           ');
        sql.add(' values (:pOwner, :pYY_GWASE, :pA_BASE, ...');
        ParamByName('pOwner').AsString        := COPY(MaskEdit2.TEXT, 1 ,4) ;
        ParamByName('pYY_GWASE').AsString := 어쩌구;
        ParamByName('pA_BASE').AsInteger := 저쩌구;
       try
          ExecSQL;
          DataBase1.Commit;
       except
          DataBase1.RollBack;
       end;

  • Profile
    KDDG_ZZOM 2002.10.10 03:02
    혹 Commit 했나요?

  • Profile
    짱아 2002.10.10 03:13
    Database1.StartTransaction;

       with query5 do
        begin
        sql.clear;
       sql.add(' insert into T00_04M                                           ');
        sql.add(' (N_OWNER, YY_GWASE, A_BASE, D_ACCT_SETT,R_RATE,  AREA_BUD,    ');
        sql.add('   AREA_BIGWA, AREA_GWASE, DTL_NOTE, AREA_GWASE_ALL)           ');
        sql.add(' values (''' + MaskEdit9.TEXT      + ''',' );  
        SQL.Add(        ' ''' + COPY(MaskEdit2.TEXT, 1 ,4) + ''',' );  
        SQL.Add(        ' ''' + '0'                                    + ''',' );  
        SQL.Add(        ' ''' + ''                                     + ''',' );  
        SQL.Add(        ' ''' + '1'                                   + ''',' );  
        SQL.Add(        ' ''' + '1'                                   + ''',' );  
        SQL.Add(        ' ''' + '0'                                   + ''',' );  
        SQL.Add(        ' ''' + '0'                                 + ''',' );  
        SQL.Add(        ' ''' + Edit4.TEXT                     + ''',' );  
        SQL.Add(        ' ''' + '0'                                 + ''')' );  
       Try
          ExecSQL;
        Except
          Database1.RollBack;
          ShowMessage('INSERT 실패');
        End;
      END;
    이렇게 해줘도 그래염.. ㅠ.ㅜ 모가 잘못된건가염???

  • Profile
    KDDG_ZZOM 2002.10.10 03:55
    Try
        ExecSQL;
         Database1.Commit;
    Except
        Database1.RollBack;
        ShowMessage('INSERT 실패');
    End;

    이런식으로 해보세요...

    즐프하세요...

  • Profile
    짱아 2002.10.10 05:09
    저....죄송해염..
    아래와 같이 하니까...
    ExecSQL;     <-------- 이부분에서
    멈춰서 돌생각을 안해염...
    ㅡㅡ;

  • Profile
    신승철 2002.10.12 01:19
    먼저 Database1.StartTransaction을 하신후에 하시기바랍니다.

    Try
        Database1.StartTransaction;
        ExecSQL;
        Database1.Commit;
    Except
        Database1.RollBack;
        ShowMessage('INSERT 실패');
    End;