OleDbCommand cmd=new OleDbCommand ("Insert into jobbook (jobname,mane,sex,birthday,marry school,studydegree,specialty,gradyear,telephone,email,address,resumes,ability,time)values(@jobname,@mane,@sex,@birthday,@marry, @school,@studydegree,@specialty,@gradyear,@telephone,@email,@address,@resumes,@ability,@time)",con);到底是错在哪里呀

解决方案 »

  1.   

    (@jobname,@mane,@sex,@birthday,@marry, @school,@studydegree,@specialty,@gradyear,@telephone,@email,@address,@resumes,@ability,@time)
    这些参数你在哪里定义的?
      

  2.   

    (1)values前有一个空格,你没加。
    (2)那些参数要赋值才能执行。
      

  3.   

    OleDbConnection con=DB.CreateCon ();
    OleDbCommand cmd=new OleDbCommand ("Insert into jobbook (jobname,mane,sex,birthday,marry school,studydegree,specialty,gradyear,telephone,email,address,resumes,ability,time) values (@jobname,@mane,@sex,@birthday,@marry, @school,@studydegree,@specialty,@gradyear,@telephone,@email,@address,@resumes,@ability,@time)",con);
              con.Open ();  OleDbParameter Pjobname=new OleDbParameter ("@jobname",OleDbType .VarChar ,50);
    Pjobname.Value =this.jobname .Text;
    cmd.Parameters.Add(Pjobname); OleDbParameter Pmane=new OleDbParameter ("@mane",OleDbType .VarChar ,50);
    Pmane.Value =this.Name .Text;
    cmd.Parameters.Add(Pmane); OleDbParameter PSex=new OleDbParameter ("@jobname",OleDbType .VarChar ,50);
    if(this.btnMan.Checked )
    {
    PSex.Value=this.btnMan.Text;
                  cmd.Parameters.Add(PSex);
    }
    else
    {
    PSex .Value =this.btnWoman.Text ;
    cmd.Parameters.Add(PSex);
    }
                
    OleDbParameter Pbirthday=new OleDbParameter ("@birthday",OleDbType .VarChar ,50);
    Pbirthday.Value =this.Birthday.Text;
    cmd.Parameters.Add(Pbirthday); OleDbParameter Pmarry=new OleDbParameter ("@marry",OleDbType .VarChar ,50);
    if(this.btnMarry.Checked )
    {
    Pmarry.Value=this.btnMarry.Text;
    cmd.Parameters .Add(Pmarry );
    }
    else
    {
    Pmarry.Value =this.btnNoMarry .Text;
    cmd.Parameters.Add(Pmarry); } OleDbParameter Pshool=new OleDbParameter ("@Shool",OleDbType .VarChar ,50);
    Pshool.Value =this.graduate .Text;
    cmd.Parameters.Add(Pshool); OleDbParameter Pstudydegree=new OleDbParameter ("@studydegree",OleDbType .VarChar ,50);
    Pstudydegree .Value =this.xueli.Text;
    cmd.Parameters.Add(Pstudydegree ); OleDbParameter Pspecialty=new OleDbParameter ("@specialty",OleDbType .VarChar ,50);
    Pspecialty.Value =this.profession.Text;
    cmd.Parameters.Add(Pspecialty ); OleDbParameter Pgradyear=new OleDbParameter ("@gradyear",OleDbType .VarChar ,50);
    Pgradyear.Value =this.Time .Text;
    cmd.Parameters.Add(Pgradyear); OleDbParameter PPhone=new OleDbParameter ("@telephone",OleDbType .VarChar ,50);
    PPhone .Value =this.Phone .Text;
    cmd.Parameters.Add(PPhone); OleDbParameter Pemail=new OleDbParameter ("@email",OleDbType .VarChar ,50);
    Pemail.Value =this.Email .Text;
    cmd.Parameters.Add(Pemail ); OleDbParameter PAddress=new OleDbParameter ("@Address",OleDbType .VarChar ,50);
    PAddress .Value =this.Address .Text;
    cmd.Parameters.Add(PAddress ); OleDbParameter Pability=new OleDbParameter ("@ability",OleDbType.VarChar,2000);
    Pability .Value=this.ability.Text;
    cmd.Parameters.Add(Pability );
      

  4.   

    ....字符记得要把字符变量加'' 比如:'+@jobname+'
      

  5.   

    多谢大家参与讨论,,,问题已经找到了, 在marry这个字段后面少了一个逗号,,,