exec proc_name '2002-10-10',1

解决方案 »

  1.   

    exec proc_name '2002-10-10',1
      

  2.   

    create procedure FB_PrcInsertStudentProfile
    @RS_ID INTEGER,
    @RS_learningCenter integer,
    @RS_batch integer,
    @RS_signUpMethod nchar(20),
    @RS_signUpSchool1 nchar(80),
    @RS_signUpSchool1Major1 integer,
    @RS_signUpSchool1Major2 integer,
    @RS_signUpSchool2 nchar(80),
    @RS_signUpSchool2Major1 integer,
    @RS_signUpSchool2Major2 integer,
    @RS_signUpSchool3 nchar(80),
    @RS_signUpSchool3Major1 integer,
    @RS_signUpSchool3Major2 integer,
    @RS_signUpRe nchar(400),
    @RS_addType integer,
    @RS_preparatory bit,
    @RS_preparatoryTime datetime,
    @RS_additionTest bit,
    @RS_photo nchar(50),
    @RS_name nchar(20),
    @RS_gender bit,
    @RS_folk nchar(10),
    @RS_political nchar(14),
    @RS_birthday datetime,
    @RS_level nchar(8),
    @RS_cardType char(10),
    @RS_cardID nchar(30),
    @RS_huKou nchar(16),
    @RS_provience integer,
    @RS_city nchar(20),
    @RS_address nchar(80),
    @RS_zip char(6),
    @RS_nativePlace nchar(40),
    @RS_email nchar(30),
    @RS_tel nchar(20),
    @RS_mobile integer,
    @RS_job nchar(20),
    @RS_company nchar(30),
    @RS_foreignLanguage nchar(16),
    @RS_postSchool nchar(80),
    @RS_postMajor nchar(20),
    @RS_certificateID nchar(20),
    @RS_eduRe nchar(200)as
        insert into  FB_OrecruitStudents
     
    values 
    (    @RS_ID,
    @RS_learningCenter,
    @RS_batch,
    @RS_signUpMethod,
    @RS_signUpSchool1,
    @RS_signUpSchool1Major1,
    @RS_signUpSchool1Major2,
    @RS_signUpSchool2,
    @RS_signUpSchool2Major1,
    @RS_signUpSchool2Major2,
    @RS_signUpSchool3,
    @RS_signUpSchool3Major1,
    @RS_signUpSchool3Major2,
    @RS_signUpRe,
    @RS_addType,
    @RS_preparatory,
    @RS_preparatoryTime,
    @RS_additionTest,
    @RS_photo,
    @RS_name,
    @RS_gender,
    @RS_folk,
    @RS_political,
    @RS_birthday,
    @RS_level,
    @RS_cardType,
    @RS_cardID,
    @RS_huKou,
    @RS_provience,
    @RS_city,
    @RS_address,
    @RS_zip,
    @RS_nativePlace,
    @RS_email,
    @RS_tel,
    @RS_mobile,
    @RS_job,
    @RS_company,
    @RS_foreignLanguage,
    @RS_postSchool,
    @RS_postMajor,
    @RS_certificateID,
    @RS_eduRe
    );
      

  3.   

    exec proc_name '2002-10-10',1
      

  4.   

    测试时我用:
    exec FB_PrcInsertStudentProfile  1,2,'3','4',5,6,'7',8,9,'10',11,12,'13',14,1,'2002-10-10',1,'1818','19',1,'20','21','22','1999-01-01','24','25','26',27,'28','29','30','31','32','33',34,'35','36','37','38','39','40','41'
    总是抱错:
    服务器: 消息 8114,级别 16,状态 4,过程 FB_PrcInsertStudentProfile,行 0
    将数据类型 varchar 转换为 datetime 时出错。
      

  5.   

    exec proc_name '2002-10-10',1
    这样就可以了,出现什么问题了?
      

  6.   

    贴错了存储过程应该是:
    create procedure FB_PrcInsertStudentProfile
    @RS_learningCenter integer,
    @RS_batch integer,
    @RS_signUpMethod nchar(20),
    @RS_signUpSchool1 nchar(80),
    @RS_signUpSchool1Major1 integer,
    @RS_signUpSchool1Major2 integer,
    @RS_signUpSchool2 nchar(80),
    @RS_signUpSchool2Major1 integer,
    @RS_signUpSchool2Major2 integer,
    @RS_signUpSchool3 nchar(80),
    @RS_signUpSchool3Major1 integer,
    @RS_signUpSchool3Major2 integer,
    @RS_signUpRe nchar(400),
    @RS_addType integer,
    @RS_preparatory bit,
    @RS_preparatoryTime datetime,
    @RS_additionTest bit,
    @RS_photo nchar(50),
    @RS_name nchar(20),
    @RS_gender bit,
    @RS_folk nchar(10),
    @RS_political nchar(14),
    @RS_birthday datetime,
    @RS_level nchar(8),
    @RS_cardType char(10),
    @RS_cardID nchar(30),
    @RS_huKou nchar(16),
    @RS_provience integer,
    @RS_city nchar(20),
    @RS_address nchar(80),
    @RS_zip char(6),
    @RS_nativePlace nchar(40),
    @RS_email nchar(30),
    @RS_tel nchar(20),
    @RS_mobile integer,
    @RS_job nchar(20),
    @RS_company nchar(30),
    @RS_foreignLanguage nchar(16),
    @RS_postSchool nchar(80),
    @RS_postMajor nchar(20),
    @RS_certificateID nchar(20),
    @RS_eduRe nchar(200)as
        insert into  FB_OrecruitStudents
     
    values 
    (   
    @RS_learningCenter,
    @RS_batch,
    @RS_signUpMethod,
    @RS_signUpSchool1,
    @RS_signUpSchool1Major1,
    @RS_signUpSchool1Major2,
    @RS_signUpSchool2,
    @RS_signUpSchool2Major1,
    @RS_signUpSchool2Major2,
    @RS_signUpSchool3,
    @RS_signUpSchool3Major1,
    @RS_signUpSchool3Major2,
    @RS_signUpRe,
    @RS_addType,
    @RS_preparatory,
    @RS_preparatoryTime,
    @RS_additionTest,
    @RS_photo,
    @RS_name,
    @RS_gender,
    @RS_folk,
    @RS_political,
    @RS_birthday,
    @RS_level,
    @RS_cardType,
    @RS_cardID,
    @RS_huKou,
    @RS_provience,
    @RS_city,
    @RS_address,
    @RS_zip,
    @RS_nativePlace,
    @RS_email,
    @RS_tel,
    @RS_mobile,
    @RS_job,
    @RS_company,
    @RS_foreignLanguage,
    @RS_postSchool,
    @RS_postMajor,
    @RS_certificateID,
    @RS_eduRe
    );
      

  7.   

    exec FB_PrcInsertStudentProfile  1,2,'3','4'
    ,5,6,'7',8,9
    ,'10',11,12,'13',14
    ,1,'2002-10-10'
    ,1,'1818','19',1
    ,'20','21','1999-01-01'  --这里原来与下面的交换了.
    ,'22','24','25','26',27
    ,'28','29','30','31','32','33',34
    ,'35','36','37','38','39','40','41'