tmpCommand.CommandType = CommandType.StoredProcedure????

解决方案 »

  1.   

    tmpCommand.CommandType = CommandType.StoredProcedure,这句有问题?我是按照书“VB.NET和SQL SERVER 2000 高级编程”来写的,但在执行Update时出错了,不知道为什么
      

  2.   

    根本没有调用存储过程,
    tmpCommand.CommandType = CommandType.TexttmpCommand.CommandText = "insert worker (id,name) VALUES(4,10)"
    tmpCommand.execute
      

  3.   

    多谢。
    tmpCommand.CommandText = "insert worker (id,name) VALUES(4,10)"
    tmpCommand.execute确实可以执行存储过程。但这样做有一定的局限。不如用
    OracleDataAdapter.update()语句来得方便。因为其中参数Parameters的设定弹性大。大侠,我想用OracleDataAdapter.update(),来更新一个数据集,如何进行呢?网上也有些示例,但按照他们的操作,一步步下来,总归出错。能不能再帮助我一下,给我指正我程序中的错误。或者给个运行完整的代码也可以,多谢,这个错误搞了我好长时间了,一直没解决,请指点指点。