adocommand1.CommandText:='insert into CourseInfo(type,id,fullname,period,annual,area,vocation,property,object,sort,grade,courseform,coursemode,starttime,endtime) values(:CourseType,:IDInfo,:fullname,:period,:annual,:area,:vocation,:CourseProperty,:CourseObject,:sort,:grade,:CourseForm,:CourseMode,:StartTime,:EndTime)';
运行的时候会提示字符串超过了255个,我该怎么解决这个问题

解决方案 »

  1.   

    分开两半,
    adocommand1.CommandText:='insert into CourseInfo(type,id,fullname,period,annual,area,vocation,property,object,sort,grade,courseform,coursemode,starttime,endtime) ';adocommand1.CommandText:=adocommand1.CommandText+'values(:CourseType,:IDInfo,:fullname,:period,:annual,:area,:vocation,:CourseProperty,:CourseObject,:sort,:grade,:CourseForm,:CourseMode,:StartTime,:EndTime)';
      

  2.   

    用ADOQUERY.sql.add('insert into ........');
    ADOQUERY.sql.add('........');
    ADOQUERY.sql.add('........');
    ADOQUERY.sql.add('........');
    adoquery.execsql;
    255个应该是没得问题的
      

  3.   

    对于一个String不能一次赋超过255个字符的值,
    但可以对其多次赋值,前后拼接起来即可。Str:='asdfsdafsdaf...sadfsdfsdaf';
    Str:=Str+'sadfewrwe...tyeqye';如果你觉得这样不爽,可以试试 WideString型