Results 1 to 2 of 2

Thread: missing sqlparameter add method

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2007
    Posts
    617

    missing sqlparameter add method

    Hi guys, Im trying to follow this sample of inserting data through gridview rowcommand. But somehow Im missing the sqlparameter add method whilst the namespace was already added.


    Code:
     
    
    //sqlparameter declaration of list type
     private List<SqlParameter> insertParameters = new List<SqlParameter>();
    
    
    mygridview_rowcommand(...){
     SqlParameter _prm_guid = new SqlParameter("@pk_guid", SqlDbType.VarChar);
     _prm_guid.Direction = ParameterDirection.Input;
     _prm_guid.Value = thisguid;
               
      insertParameters.add(?); //error on add()
    
    }
    Some other part of the code which related to insertParameters variable it give an error
    Code:
    for statement cannot operate on variables of type List<System.Data.SqlClient.SqlParameter> because List<System.Data.SqlClient.SqlParameter> does not contain a public definition of GetEnumerator
    Am I missing a file reference? Appreciate an help.
    Last edited by jlbantang; Sep 29th, 2012 at 03:55 PM.
    Learn something new every .001 second.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width