摘要
在C#.net程序中利用Sql Data Adapter或者Sql Command调用存储过程比较方便,但是存在没有调用代码设计的支持,而只有在运行程序时执行到相应的语句,才能检查调用的代码是否有问题的缺点。如果在测试过程没有把所有可能执行到的语句都测试一次,程序往往会出现问题。针对这个缺点,提出利用数据集设计器调用存储过程,将存储过程变为强类型对象,这样编译器就可以在编译期间检查所有可能出现的错误。解决Sql Data Adapter或者Sql Command调用存储过程的不足的同时,还可以简化调用存储过程的复杂度。
In C#.Net program to use Sql Data Adapter or Sql Command calls a stored procedure more convenient, but there is no design-time support for the calling code, but only when running the program execution to the appropriate statement in order to check whether the code in question is called shortcomings. If did not test all possible execution to test a statement, the program will always be a problem. To this shortcoming, the designer made use of data sets stored procedure calls the stored procedure into a strongly typed object, so that the compiler can compile check all possible errors. Sql Data Adapter or Sql Command solve the lack of calling a stored procedure can also greatly simplify the complexity of the stored procedure call.
出处
《齐齐哈尔大学学报(自然科学版)》
2012年第1期20-23,共4页
Journal of Qiqihar University(Natural Science Edition)
基金
中国教育学会教育机制研究分会"十一五"科研项目(2010KC102)