none
System.Data.SqlServerCe.SqlCeException class;_HResult= -2147467259;NativeError = 25920 RRS feed

  • Diskusi Umum

  • teman2x yang budiman, saya mempunyai permasalahan seperti judul diatas ketika mengedit program yang sebelumnya baik-baik saya ^^" dibawah ini kodenya, dan struktur database yang diinsert ----TABLE-DB STRUCTURE---- public static void createFIX(SqlCeConnection connectionCE) { commandCE = new SqlCeCommand(); commandCE.Connection = connectionCE; commandCE.CommandText = @"CREATE TABLE FIXSKU(" + //@"fixLOC " + @"fixNo nvarchar(5) , "+// NOT NULL," + @"fixSku int , "+//NOT NULL," + @"fixScan nvarchar(3) , "+// NOT NULL," + @"fixQty float , "+//NOT NULL," + @"fixDate datetime , "+//NOT NULL, " + @"fixEtbb nvarchar(7) , "+//NOT NULL, " + @"fixSeq nvarchar(4) " + @")"; try { commandCE.ExecuteNonQuery(); } catch (Exception ex) { //kali aje tbl uda ada String s_=""; } commandCE.Dispose(); } ---FAILED PROCEDURE---- private void inSKU() { /* * this procedure intend to update a new line/item * ...the rest after are working fine */ string qry_ = ""; qry_ += " insert into FIXSKU "; qry_ += " (FIXNO,FIXDATE,FIXSCAN,FIXSKU,FIXETBB) "; qry_ += " VALUES("; qry_ += "'"+txtLOC.Text.ToString().Trim()+"' "; qry_ += ",'"+mm.ToString().Trim()+"/"+dd.ToString().Trim()+"/"+zz.ToString().Trim()+"' "; qry_ += ",'"+varID.ToString().Trim()+"' "; qry_ += ",@SKUNO"; qry_ += ",'"+txtETB.ToString().Trim()+"' "; qry_ += " ) "; SqlCeCommand comCE = new SqlCeCommand(); comCE.Connection = MySqlCe.connectionCE; comCE.Connection.Close(); comCE.Connection.Open(); comCE.CommandText = qry_; SqlCeParameter SKUNO = comCE.Parameters.Add("@SKUNO", SqlDbType.Int); //SKUNO.Value = Conversion.Val(txtItem.Text.ToString()); SKUNO.Value = txtItem.Text; /* then the code here began to error showing null array as a message for System.Data.SqlServerCe.SqlCeException class HResult= -2147467259 NativeError = 25920 HELP ME PLEASE */ try { comCE.ExecuteNonQuery(); fillSEQ(); seqMOD = seqNEW; } catch { throw; } finally { comCE.Dispose(); GC.Collect(); } } thx for any kind attention n HELP!!! :)
    • Jenis yang Diubah zentrepreneur Jumat, 01 Juli 2011 03.49 help help help
    Rabu, 22 Juni 2011 09.36

Semua Balasan

  • Selamat siang zentrepreneur,

     

    Selamat bergabung dalam MSDN forum dan terima kasih atas post anda.

     

    Kami mengalami kesulitan dalam membaca kode yang anda posting diatas, dimohon untuk menuliskan kode C# anda dan mempostingnya kembali pada forum ini. Untuk mempermudah, anda dapat menggunakan tombol " Insert Code Block" (button ini terletak disebelah simbol HTML pada thread menu) untuk memposting kode anda dengan berbagai pilihan bahasa pemograman yang diinginkan.

     


    Agnes Sannie [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
      
    Jumat, 24 Juni 2011 05.59
    Moderator
  • Teman2x yang budiman, saya mempunyai permasalahan seperti judul diatas
    ketika mengedit program yang sebelumnya baik-baik saya ^^"
    dibawah ini kodenya, dan struktur database yang diinsert 
    
    ----TABLE-DB STRUCTURE---- 
    
    public static void createFIX(SqlCeConnection
     connectionCE) 
    { 
     commandCE = new SqlCeCommand(); 
     commandCE.Connection = connectionCE; 
     commandCE.CommandText = @"CREATE TABLE FIXSKU(" +
                 @"fixNo nvarchar(5) , "+
                 @"fixSku int , "+
                 @"fixScan nvarchar(3) , "+
                 @"fixQty float , "+
                 @"fixDate datetime , "+
                 @"fixEtbb nvarchar(7) , "+
                 @"fixSeq nvarchar(4) " + 
                 @")"; 
     try 
      { 
       commandCE.ExecuteNonQuery(); 
      } 
     catch (Exception ex) 
      { //table exist already??
       String s_=""; 
      } 
     commandCE.Dispose();
     
    } 
    
    ---FAILED PROCEDURE---- 
    private void inSKU() 
    { 
     /* 
     * this procedure intend to update a new line/item 
     * ...the rest after are working fine 
     */ 
     string qry_ = ""; 
     qry_ += " insert into FIXSKU "; 
     qry_ += " (FIXNO,FIXDATE,FIXSCAN,FIXSKU,FIXETBB) "; 
     qry_ += " VALUES(";
     qry_ += "'"+txtLOC.Text.ToString().Trim()+"' "; 
     qry_ += ",'"+mm.ToString().Trim()+"/"+dd.ToString().Trim()+"/"+zz.ToString().Trim()+"' "; 
     qry_ += ",'"+varID.ToString().Trim()+"' "; 
     qry_ += ",@SKUNO"; 
     qry_ += ",'"+txtETB.ToString().Trim()+"' "; 
     qry_ += " ) "; 
    
     SqlCeCommand comCE = new SqlCeCommand(); 
     comCE.Connection = MySqlCe.connectionCE; 
     comCE.Connection.Close(); 
     comCE.Connection.Open(); 
     comCE.CommandText = qry_; 
     
     SqlCeParameter SKUNO = comCE.Parameters.Add("@SKUNO", SqlDbType.Int); 
     //SKUNO.Value = Conversion.Val(txtItem.Text.ToString());
     SKUNO.Value = txtItem.Text; 
    
     /* then the code here began to error showing null array as a message for System.Data.SqlServerCe.SqlCeException class HResult= -2147467259 NativeError = 25920 HELP ME PLEASE */ 
     try 
     { 
     comCE.ExecuteNonQuery(); 
     fillSEQ(); 
     seqMOD =
     seqNEW; 
     } 
     catch 
     { 
     throw; 
     } 
     finally 
     { 
     comCE.Dispose(); 
     GC.Collect(); 
     } 
    
    } 
    
    thx for any kind attention n HELP!!! :)

    Jumat, 01 Juli 2011 04.19
  • mmm....hmmm... i got difficulty when trying to log or write in this thread/post... think that i am new-by :) thx for the fast response , i hope the code are readable now. still got stuck with it n try diffrent technique yet :|
    Jumat, 01 Juli 2011 06.27