SET NOCOUNT OFF INSERT INTO SchYrSemCourseJoin(CourseID,SchYrSemID) SELECT CourseID,@ SchyrSemID FROM RegularLoad INNER JOIN [RegularLoad Details] ON RegularLoad.RegularLoadID = [RegularLoad Details] .RegularLoadID WHERE ProgramID = @ ProgramID AND Year = @ Year AND Semester = @ Sem; 结束 GOas of now i am using a stored procedure from my sql server 2000 toinsert record from another table. what i need now is on how can iinsert record by not using the stored procedure and insert it usingdataset.here is my code in stored procedure..CREATE PROCEDURE AddRegularLoad@SchYrSemID as int, @ProgramID as int, @Sem as varchar(50), @Year asintASBEGINSET NOCOUNT OFFINSERT INTO SchYrSemCourseJoin ( CourseID, SchYrSemID )SELECT CourseID, @SchYrSemIDFROM RegularLoad INNER JOIN [RegularLoad Details] ONRegularLoad.RegularLoadID = [RegularLoad Details].RegularLoadIDWHERE ProgramID=@ProgramID AND Year=@Year AND Semester=@Sem;ENDGO推荐答案" jaYPee" ; <喜****** @ yahoo.com> schrieb"jaYPee" <hi******@yahoo.com> schrieb截至目前我正在使用我的sql server 2000中的存储过程来从另一个表中插入记录。我现在需要的是如何通过不使用存储过程来插入记录并使用数据集插入它。 [...] INSERT INTO SchYrSemCourseJoin(CourseID, SchYrSemID) SELECT CourseID,@ SchYrSemID FROM RegularLoad INNER JOIN [RegularLoad Details] ON RegularLoad.RegularLoadID = [RegularLoad Details] .RegularLoadID WHERE ProgramID = @ ProgramID AND Year = @Year和Semester = @ Sem; as of now i am using a stored procedure from my sql server 2000 to insert record from another table. what i need now is on how can i insert record by not using the stored procedure and insert it using dataset. [...] INSERT INTO SchYrSemCourseJoin ( CourseID, SchYrSemID ) SELECT CourseID, @SchYrSemID FROM RegularLoad INNER JOIN [RegularLoad Details] ON RegularLoad.RegularLoadID = [RegularLoad Details].RegularLoadID WHERE ProgramID=@ProgramID AND Year=@Year AND Semester=@Sem; IMO,这里的数据集没有意义。你不想把数据加载到 内存中,而这就是数据集的用途。我认为SP已经是最好的解决方案了。 更多ADO.Net:microsoft.public.dotnet.framework.adonet - Armin 如何报价以及原因: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.htmlIMO, a dataset doesn''t make sense here. You don''t want to load data intomemory, and that''s where the dataset is used for. I think the SP is alreadythe best solution.More ADO.Net: microsoft.public.dotnet.framework.adonet--ArminHow to quote and why: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html" Armin Zingler" < AZ ******* @ freenet.de> schrieb"Armin Zingler" <az*******@freenet.de> schrieb进入内存,这就是数据集的用途。我认为SP into memory, and that''s where the dataset is used for. I think the SP ......数据集的用途是什么.. - Armin...what the dataset is used for..--Armin不知道你的意思是......这个数据集用于存储来自我的表格的的数据我的sql server 2000.我是对的吗? 周五,2004年4月23日10:14:12 +0200,Armin Zingler < az *** ****@freenet.de>写道:don''t know wat u mean...this dataset is used to stored the data frommy table from my sql server 2000. am i right?On Fri, 23 Apr 2004 10:14:12 +0200, "Armin Zingler"<az*******@freenet.de> wrote:" Armin Zingler" < AZ ******* @ freenet.de> schrieb"Armin Zingler" <az*******@freenet.de> schrieb进入内存,这就是数据集的用途。我认为SP into memory, and that''s where the dataset is used for. I think the SP ..数据集用于什么....what the dataset is used for.. 这篇关于如何将记录从另一个表插入数据集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-05 02:36