Skip to content

Error While Inserting A Data In Sql Table

Shraddha Ital

Asked May 19, 2018, 3:28 AM EDT4 answers
Share
LinkedInX
The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Table-valued parameter 7 ("@VoucherList"), row 0, column 0: Data type 0xF3 (user-defined table type) has a non-zero length database name specified. Database name is not allowed with a table-valued parameter, only schema name and type name are valid.
 
How Can I Solve This Error

4 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Rafnas T P
    0
    hi,
    what is the 7 th parameter you are passing(@VoucherList) 
    0
  • 0
    C#
      public DataTable InsertUpdateDispatchPaymentDetail(string DeliveryAddress, int DispatchByAM, int FinYearId, decimal Amount, string PaymentRmk, string FilePath, DataTable VoucherId)
        {
            DataTable dtDetail = new DataTable();
            SqlParameter[] arrParam = new SqlParameter[7];
            arrParam[0] = new SqlParameter("@DeliveryAddress", DeliveryAddress);
            arrParam[1] = new SqlParameter("@DispatchByAM", DispatchByAM);
            arrParam[2] = new SqlParameter("@FinYearId", FinYearId);
            arrParam[3] = new SqlParameter("@Amount", Amount);
            arrParam[4] = new SqlParameter("@PaymentRmk", PaymentRmk);
            arrParam[5] = new SqlParameter("@FilePath", FilePath);
            arrParam[6] = new SqlParameter("@VoucherList", VoucherId);
    
            ds = SqlHelper.ExecuteDataset(strConnStringRemote, "UspInsertUpdateDispatchPaymentDetail", arrParam);
            if (ds.Tables.Count > 0)
            {
                dtDetail = ds.Tables[0];
            }
            return dtDetail;
    
        }
    0
  • Rafnas T P
    0
    you wanted to pass data table in the place of VoucherID. 
    1. public DataTable InsertUpdateDispatchPaymentDetail(string DeliveryAddress, int DispatchByAM, int FinYearId, decimal Amount, string PaymentRmk, string FilePath, DataTable VoucherId)  
    2. {  
    3. DataTable dtDetail = new DataTable();  
    4. SqlParameter[] arrParam = new SqlParameter[7];  
    5. arrParam[0] = new SqlParameter("@DeliveryAddress", DeliveryAddress);  
    6. arrParam[1] = new SqlParameter("@DispatchByAM", DispatchByAM);  
    7. arrParam[2] = new SqlParameter("@FinYearId", FinYearId);  
    8. arrParam[3] = new SqlParameter("@Amount", Amount);  
    9. arrParam[4] = new SqlParameter("@PaymentRmk", PaymentRmk);  
    10. arrParam[5] = new SqlParameter("@FilePath", FilePath);  
    11. arrParam[6] = new SqlParameter("@VoucherList", VoucherId);  
    12. ds = SqlHelper.ExecuteDataset(strConnStringRemote, "UspInsertUpdateDispatchPaymentDetail", arrParam);  
    13. if (ds.Tables.Count > 0)  
    14. {  
    15. dtDetail = ds.Tables[0];  
    16. }  
    17. return dtDetail;  
    18. }  
     or you can pass just an id as an integer or string, why are you passing entair datatable.
    0
  • Rafnas T P
    0
    can you post your procedure UspInsertUpdateDispatchPaymentDetail. 
    0