摘要: 一个不甚完善的存储过程:-----------------------------------存储过程代码开始-------------------------------------- ================================================-- 作用是代替自动增长型的ID,这样便于分表的维护-- ================================================set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER PROCEDURE [dbo].[GenerateRUID]@t 阅读全文
posted @ 2010-04-26 14:50 PPDev 阅读(761) 评论(0) 推荐(0) 编辑
摘要: 例如有数据表:Table ProductId int,(自动增长)Name Nvarchar用Subsonic DAL处理后即可如下使用添加:Product product = new Product();product.Name="老白干";product.save();更新:Product product =new Product("Id",1);product.Name="老白干";product.save();删除:Product.Delete("Id",1"); 阅读全文
posted @ 2010-04-26 14:49 PPDev 阅读(1140) 评论(2) 推荐(0) 编辑
摘要: 在项目中加入SubSonic.dll的引用;在项目web.config的configuration中加入<configSections> <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false"/></configSections><connectionStrings> <clear/> <add name="MySql 阅读全文
posted @ 2010-04-26 14:48 PPDev 阅读(1008) 评论(0) 推荐(0) 编辑
摘要: 首先要装Oracle客户端,数据库放在哪里就看你的情况了。在项目中加入SubSonic.dll的引用;在项目web.config的configuration中加入<configSections> <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false"/></configSections><connectionStrings> <clear/ 阅读全文
posted @ 2010-04-26 14:47 PPDev 阅读(1223) 评论(0) 推荐(1) 编辑
摘要: 1。 安装SubSonic2.03和SubSonic Tools2.03(SubSonic的官方网站http://www.subsonicproject.com/)。2。 新建一个visual studio 2005的工程,数据库用Sql Server2000(建议用2005版本,实际上SubSonic同样支持mysql和oracle),先添加几个表。3。 添加引用,浏览添加SubSonic.dll(SubSonic安装目录下),添加System.configuration引用。4。 如果是Web应用程序按F5可以产生Web.config(或者手动添加,这不是什么难题),如果是WindowsF 阅读全文
posted @ 2010-04-26 14:45 PPDev 阅读(1186) 评论(0) 推荐(1) 编辑