<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_一衣孤行</title><subtitle type="text">我不喜欢孤独，但我却选择了孤独。</subtitle><id>http://feed.cnblogs.com/blog/u/29452/rss</id><updated>2012-02-01T08:59:27Z</updated><author><name>shunliy</name><uri>http://www.cnblogs.com/shunliy/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shunliy/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/29452/rss"/><entry><id>http://www.cnblogs.com/shunliy/archive/2012/01/17/2324761.html</id><title type="text">MVC中的几个问题汇总</title><summary type="text">1.The model backing the &amp;#39;XXXXDBContext&amp;#39; context has changed since the database was created. Either manually delete/update the database, or call Database.SetInitializer with an IDatabaseInitializer instance. For example, the DropCreateDatabaseIfModelChanges strategy will automatically delete </summary><published>2012-01-17T08:01:00Z</published><updated>2012-01-17T08:01:00Z</updated><author><name>shunliy</name><uri>http://www.cnblogs.com/shunliy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shunliy/archive/2012/01/17/2324761.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shunliy/archive/2012/01/17/2324761.html"/><content type="html">&lt;div&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;1.The model backing the 'XXXXDBContext' context has changed since the  database was created. Either manually delete/update the database, or call  Database.SetInitializer with an IDatabaseInitializer instance. For example, the  DropCreateDatabaseIfModelChanges strategy will automatically delete and recreate  the database, and optionally seed it with new data.&lt;/em&gt; &lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; 出现上述错误需要在Global.asax中的Application_Start方法中加入：&lt;/div&gt;&lt;p&gt;Database.SetInitializer&amp;lt;Models.XXXXDBContext&amp;gt;(null);&lt;/p&gt;&lt;div&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;2.&amp;lt;a&amp;gt;标签在display：block设置下不能居中的问题。&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span  style="font-family: Arial; font-size: 12px; font-weight: normal; line-height: normal; background-color: #f3fafd; "&gt;把display:block改为display:inline-block就OK了。&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;3.如果用&amp;lt;a&amp;gt;标签代替submit按钮。&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;a href="javascript:;" onclick="javascript:document.forms[0].submit();"&amp;gt;保存&amp;lt;/a&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/shunliy/aggbug/2324761.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/shunliy/archive/2012/01/17/2324761.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/shunliy/archive/2012/01/17/2324617.html</id><title type="text">SQL Network Interfaces error: 26 - 定位指定的服务器/实例时出错</title><summary type="text">用VS2010自带的 Microsoft SQL Server Compact 4.0 数据库连接报出如下错误：在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - 定位指定的服务器/实例时出错)[SqlException (0x80131904): 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL .</summary><published>2012-01-17T06:10:00Z</published><updated>2012-01-17T06:10:00Z</updated><author><name>shunliy</name><uri>http://www.cnblogs.com/shunliy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shunliy/archive/2012/01/17/2324617.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shunliy/archive/2012/01/17/2324617.html"/><content type="html">&lt;div&gt;用VS2010自带的 Microsoft SQL Server Compact 4.0 数据库连接报出如下错误：&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server  已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - 定位指定的服务器/实例时出错)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;[SqlException (0x80131904): 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;解决办法：&lt;/p&gt;&lt;p&gt;启动SQL Server (SQLEXPRESS)&amp;nbsp;服务。&lt;/p&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/shunliy/aggbug/2324617.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/shunliy/archive/2012/01/17/2324617.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/shunliy/archive/2012/01/16/2323308.html</id><title type="text">远程登录问题</title><summary type="text">1.由于这台计算机没有终端服务器客户端访问许可证，远程会话被中断。解决办法：在开始---&amp;gt;运行---&amp;gt;输入mstsc /v:IP /console就可以了。网上有人说把终端服务模式设置由&amp;quot;没设备&amp;quot;改为“每客户”,结果当机了。2.由于会话在远程计算机上被注销，远程会话被中断，您的系统管理员或令一个用户结束了您的链接。</summary><published>2012-01-16T02:28:00Z</published><updated>2012-01-16T02:28:00Z</updated><author><name>shunliy</name><uri>http://www.cnblogs.com/shunliy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shunliy/archive/2012/01/16/2323308.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shunliy/archive/2012/01/16/2323308.html"/><content type="html">&lt;div&gt;&lt;div&gt;1.由于这台计算机没有终端服务器客户端访问许可证，远程会话被中断。&lt;/div&gt;&lt;p&gt;解决办法：&lt;/p&gt;&lt;p&gt;在开始---&amp;gt;运行---&amp;gt;输入mstsc /v:IP /console就可以了。&lt;/p&gt;&lt;p&gt;网上有人说把终端服务模式设置由"没设备"改为&amp;#8220;每客户&amp;#8221;,结果当机了。&amp;nbsp;&lt;/p&gt;&lt;p&gt;2.由于会话在远程计算机上被注销，远程会话被中断，您的系统管理员或令一个用户结束了您的链接。&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/shunliy/aggbug/2323308.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/shunliy/archive/2012/01/16/2323308.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/shunliy/archive/2012/01/10/2317995.html</id><title type="text">VS2010不能有System文件夹</title><summary type="text">在VS2010中新建了一个项目，里面有System文件夹，一直提示System下没有Web引用。难道会跟VS自带的类库有冲突？</summary><published>2012-01-10T04:44:00Z</published><updated>2012-01-10T04:44:00Z</updated><author><name>shunliy</name><uri>http://www.cnblogs.com/shunliy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shunliy/archive/2012/01/10/2317995.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shunliy/archive/2012/01/10/2317995.html"/><content type="html">在VS2010中新建了一个项目，里面有System文件夹，一直提示System下没有Web引用。难道会跟VS自带的类库有冲突？&lt;img src="http://www.cnblogs.com/shunliy/aggbug/2317995.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/shunliy/archive/2012/01/10/2317995.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/shunliy/archive/2012/01/04/2312286.html</id><title type="text">删除重复数据</title><summary type="text">删除重复数据：delete a from T_OUTLET_HISTORY aleft join (select max(N_ID) n_id,s_outlet_id,T_DATE from T_OUTLET_HISTORYgroup by s_outlet_id,T_DATE) b on a.n_id=b.n_idwhere b.n_id is null</summary><published>2012-01-04T09:25:00Z</published><updated>2012-01-04T09:25:00Z</updated><author><name>shunliy</name><uri>http://www.cnblogs.com/shunliy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shunliy/archive/2012/01/04/2312286.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shunliy/archive/2012/01/04/2312286.html"/><content type="html">&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;删除重复数据：&amp;nbsp;&lt;/div&gt;&lt;p&gt;delete a from T_OUTLET_HISTORY a&lt;/p&gt;&lt;div&gt;left join (&lt;/div&gt;&lt;div&gt;select max(N_ID) n_id,s_outlet_id,T_DATE from T_OUTLET_HISTORY&lt;/div&gt;&lt;div&gt;group by s_outlet_id,T_DATE) b on a.n_id=b.n_id&lt;/div&gt;&lt;div&gt;where b.n_id is null&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/shunliy/aggbug/2312286.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/shunliy/archive/2012/01/04/2312286.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/shunliy/archive/2011/12/20/2294435.html</id><title type="text">远程桌面不能拷贝文件</title><summary type="text">不能从远程桌面拷贝文件了，本地资源的剪切板和驱动器已经勾选。网上说远程服务器的clipbook服务没有启动。服务是禁用的。无法启动 Clipbook服务。错误1068:依存服务或组无法启动。首先开启 Network DDE DSDM, 开启 Network DDE 开启 Clipbook。</summary><published>2011-12-20T03:19:00Z</published><updated>2011-12-20T03:19:00Z</updated><author><name>shunliy</name><uri>http://www.cnblogs.com/shunliy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shunliy/archive/2011/12/20/2294435.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shunliy/archive/2011/12/20/2294435.html"/><content type="html">&#xD;
&#xD;
 &#xD;
不能从远程桌面拷贝文件了，本地资源的剪切板和驱动器已经勾选。网上说远程服务器的clipbook服务没有启动。服务是禁用的。无法启动 Clipbook服务。错误1068:依存服务或组无法启动。首先开启 Network DDE DSDM&amp;nbsp;, 开启 Network DDE 开启 Clipbook。&lt;img src="http://www.cnblogs.com/shunliy/aggbug/2294435.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/shunliy/archive/2011/12/20/2294435.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/shunliy/archive/2011/12/11/2283790.html</id><title type="text">cannot load msptls.dll</title><summary type="text">前几天把office2007换成了2010，结果vs2008在切换到设计视图时老是报错:cannot load msptls.dll解决方法：将 vs2008安装文件\WCU\WebDesignerCore\WebDesignerCore.exe安装</summary><published>2011-12-11T02:41:00Z</published><updated>2011-12-11T02:41:00Z</updated><author><name>shunliy</name><uri>http://www.cnblogs.com/shunliy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shunliy/archive/2011/12/11/2283790.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shunliy/archive/2011/12/11/2283790.html"/><content type="html">&lt;div&gt;前几天把office2007换成了2010，结果vs2008在切换到设计视图时老是报错:cannot load msptls.dll&amp;nbsp;&lt;/div&gt;&lt;p&gt;解决方法：&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: simsun; font-size: 14px; line-height: 23px; background-color: #ffffff; "&gt;将 vs2008安装文件\WCU\WebDesignerCore\WebDesignerCore.exe安装&lt;/span&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/shunliy/aggbug/2283790.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/shunliy/archive/2011/12/11/2283790.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/shunliy/archive/2011/12/09/2282305.html</id><title type="text">SQLServer中触发器不能批量插入</title><summary type="text">当用“insert into 表1select * from 表2”进行插入时，不能触发表1上的触发器， 必须在触发器中逐条触发。</summary><published>2011-12-09T07:31:00Z</published><updated>2011-12-09T07:31:00Z</updated><author><name>shunliy</name><uri>http://www.cnblogs.com/shunliy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shunliy/archive/2011/12/09/2282305.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shunliy/archive/2011/12/09/2282305.html"/><content type="html">&lt;p&gt;当用&amp;#8220;insert into 表1&lt;/p&gt;&lt;p&gt;select * from 表2&amp;#8221;进行插入时，不能触发表1上的触发器， 必须在触发器中逐条触发。&lt;/p&gt;&lt;img src="http://www.cnblogs.com/shunliy/aggbug/2282305.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/shunliy/archive/2011/12/09/2282305.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/shunliy/archive/2011/10/12/2208156.html</id><title type="text">SQL中科学计数法的处理</title><summary type="text">在SQL Server中科学计数法形式的数据与varchar相互转换过程中有时会有一些问题出现。如果用covnert(numeric(10,2),varchar)会出现“从数据类型 varchar 转换为 numeric 时出错。”这样的错误，需要把varchar转换为float就可以了。</summary><published>2011-10-12T01:49:00Z</published><updated>2011-10-12T01:49:00Z</updated><author><name>shunliy</name><uri>http://www.cnblogs.com/shunliy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shunliy/archive/2011/10/12/2208156.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shunliy/archive/2011/10/12/2208156.html"/><content type="html">在SQL Server中科学计数法形式的数据与varchar相互转换过程中有时会有一些问题出现。如果用covnert(numeric(10,2),varchar)会出现&amp;#8220;从数据类型 varchar 转换为 numeric 时出错。&amp;#8221;这样的错误，需要把varchar转换为float就可以了。&lt;img src="http://www.cnblogs.com/shunliy/aggbug/2208156.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/shunliy/archive/2011/10/12/2208156.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/shunliy/archive/2011/01/27/1946172.html</id><title type="text">减小日志文件</title><summary type="text">backup log qingpu with NO_LOG;backup logqingpu with TRUNCATE_ONLY;DBCC SHRINKDATABASE(qingpu) ;</summary><published>2011-01-27T06:02:00Z</published><updated>2011-01-27T06:02:00Z</updated><author><name>shunliy</name><uri>http://www.cnblogs.com/shunliy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/shunliy/archive/2011/01/27/1946172.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/shunliy/archive/2011/01/27/1946172.html"/><content type="html">backup log&amp;nbsp; qingpu&amp;nbsp;&amp;nbsp; with NO_LOG;&lt;br /&gt;backup log&amp;nbsp;&amp;nbsp;qingpu&amp;nbsp;&amp;nbsp;&amp;nbsp; with TRUNCATE_ONLY;&lt;br /&gt;DBCC SHRINKDATABASE(qingpu) ;&lt;img src="http://www.cnblogs.com/shunliy/aggbug/1946172.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/shunliy/archive/2011/01/27/1946172.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry></feed>
