各位高手,是不是子c#程序里面 只能对mysql的event一些属性进行修改啊,怎么我把drop和create event相关的语句放到c#中,通过command.ExcuteNonQuery执行会报错啊?SET GLOBAL event_scheduler = 1; 这样的就可以运行 谢谢了

解决方案 »

  1.   

    怎么我把drop和create event相关的语句放到c#中
    ---------------
    你先确定你这些SQL语句能在mysql客户端成功的执行
      

  2.   

    drop event if exists myevent;这句话 执行command.ExcuteNonQuery的时候报错..说系统错误..
      

  3.   

    首先确定你的event名字myevent是否有错?
    然后event所属的库是否对,要不这样吧:
    drop event if exists 库名.myevent
      

  4.   

    drop event if exists myevent;选取把这句直接到你的数据库中执行一下,看看有没有什么问题。
      

  5.   

    command.ExcuteNonQueryexcuteupdatenot excutequery