摘要: access:delete from 表名alter table表名 alter column自动增长列名 counter(1,1)sql server: delete from 表名dbcc checkident('表名 ',reseed,0) 阅读全文
posted @ 2012-02-20 14:59 kting 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1.DataGridView中的comboBox需要点击2次或多次才能弹出下拉itemfirst:Me.DataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEntersecond: If e.ColumnIndex >= 0 AndAlso e.RowIndex >= 0 AndAlso DataGridView1(e.ColumnIndex, e.RowIndex) IsNot Nothing _ AndAlso Not DataGridView1(e.ColumnIndex, e.Ro 阅读全文
posted @ 2011-12-31 16:11 kting 阅读(596) 评论(0) 推荐(0) 编辑
摘要: Microsoft Office Excel cannot access the file 'C:\inetpub\wwwroot\AminoScience\OutFiles\Diet_Report_6c0dd8c3-5864-4c8a-9181-48b0e67cea96.xls'. There are several possible reasons:• The file name or path does not exist.• The file is being used by another program.• The workbook you are trying t 阅读全文
posted @ 2011-12-28 14:52 kting 阅读(2166) 评论(1) 推荐(0) 编辑
摘要: 1.如何将 Office 应用程序配置为在交互式用户帐户下运行2. add <identity impersonate="true" userName="machinename\administrator" password="admin password" /> in <system.web> section of web.config 阅读全文
posted @ 2011-12-28 09:28 kting 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 经常有这样的需求,一个web application 公司内部域用户访问时自动登录,外部用户访问时需要提供用户名和密码用Form登录。1. 在web项目中新建 WinLogin.aspx, WebLogin.aspx,Redirect401.htm 在Redirect401.htm中添加javascript 代码将页面跳转到WebLogin.aspx上 2. 将web application的web.config配置成form登录 <authentication mode="Forms"> <forms loginUrl="Winlogin.as 阅读全文
posted @ 2011-12-02 16:45 kting 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 问题现象: 在.html.erb中显示mysql中的中文字符时会出现 incompatible character encodings: UTF-8 and ASCII-8BIT 错误问题可能原因:mysql_adapater出来的数据是ASCII-8BIT解决方法:修改根目录下的\Ruby192\lib\ruby\gems\1.9.1\gems\activerecord-3.0.9\lib\active_record\connection_adapters中的mysql_adapter.rb文件def select(sql, name = nil) @connection.query_w.. 阅读全文
posted @ 2011-09-15 14:28 kting 阅读(6864) 评论(0) 推荐(0) 编辑
摘要: 问题现象: 当向mysql5.5插入中文时,会出现类似错误 ERROR 1366 (HY000): Incorrect string value: '\xD6\xD0\xCE\xC4' for column 问题原因:Db characterset的字符集设成了latin1解决方案:修改mysql 安装目录下的 my.ini 文件为 default-character-set=utf8character-set-server=utf8然后mysql服务,重新创建一个数据库。 阅读全文
posted @ 2011-09-15 14:09 kting 阅读(464) 评论(0) 推荐(0) 编辑
摘要: run rake db:migrate errorRails 3.1 and Rspec-rails < 2.6 isn't compatible: https://github.com/rspec/rspec-rails/blob/master/features/RailsVersions.md.upgrade to rspec-rails version 2.6.1.beta1 fixed it.solution:If you haven't specified a version for rspec-rails in your Gemfile, just run b 阅读全文
posted @ 2011-06-22 09:07 kting 阅读(289) 评论(0) 推荐(0) 编辑
摘要: RouteHandler是在路由选择之后进行处理的组件,它并不仅仅针对ASP.NET MVC。显然,如果您改变了RouteHandler,那么对请求的处理将不再使用ASP.NET MVC,但这在您使用其他HttpHandler或经典的WebForm进行路由处理时却是非常有用的。要创建一个 route handler 需要继承 System.Web.Routing.IRouteHandler 接口实现接口的 GetHttpHandler方法。一下是和 ASP.NET MVC 默认的 MvcHandler 部分相同功能的 CustomMVCHandler 类的实现现在我们可以通过在 globa.. 阅读全文
posted @ 2010-08-03 14:52 kting 阅读(411) 评论(0) 推荐(0) 编辑
摘要: ASP.NET MVC 3 中内置了对Json绑定的支持, 能使Action 方法接收 json格式的数据然后 model-bind Action的参数。通过下面的例子来说明,下面代码中定义了id为“search”的button的客户端 click方法。在方法中创建了一个客户端的javascript "User" 对象,它有四个字段其值分别从页面对于的html控件中获取。然后通过JQuery的ajax()方法向服务端发起了包含 “User” 对象的请求。 下面是服务端的"/Home/GetUsers" action 的实现"GetUsers&q 阅读全文
posted @ 2010-07-30 11:01 kting 阅读(867) 评论(0) 推荐(2) 编辑