DataGridView的增加,修改,删除命令指定SQL语句
'保存数据
Private Sub Save()
Try
If MsgBox("确定要保存所修改的数据吗?", MsgBoxStyle.Question Or MsgBoxStyle.DefaultButton2 Or MsgBoxStyle.YesNo, "系统提示") = MsgBoxResult.Yes Then
GridView.Rows(0).Cells("spbm").Selected = True
Dim gCummand As New SqlClient.SqlCommandBuilder(gDataAdapter)
With gDataAdapter
Dim parameterU As SqlClient.SqlParameter
'重新指定修改的SQL命令
.UpdateCommand = New SqlClient.SqlCommand("P_SetSJCXinfo", eCMyData.CreateConnection())
.UpdateCommand.CommandType = CommandType.StoredProcedure
parameterU = .UpdateCommand.Parameters.Add("@v_type", SqlDbType.Char, 2)
parameterU.Value = "20"
parameterU = .UpdateCommand.Parameters.Add("@v_sjbh", SqlDbType.Char, 10)
相关文档:
SQL Server 索引结构及其使用(二)
作者:freedk
一、深入浅出理解索引结构
改善SQL语句
很多人不知道SQL语句在SQL SERVER中是如何执行的,他们担心自己所写的SQL语句会被SQL SERVER误解。比如:
select * from table1 where name=''zhangsan'' and tID > 10000
和执行:
select * from table1 where tID ......
SQL Server 索引结构及其使用(四)
作者:freedk
一、深入浅出理解索引结构
二、改善SQL语句
三、实现小数据量和海量数据的通用分页显示存储过程
聚集索引的重要性和如何选择聚集索引
在上一节的标题中,笔者写的是:实现小数据量和海量数据的通用分页显示存储过程。这是因为在将本存储过程应用于“办 ......
今天刚开通这个小博,作为庆祝,把我以前空间中的一篇文章转过来。
希望对
问题:由于安装sql server 2000 sp4以后修改了服务器的名称导致SQL中保留的服务器名不正确。
解决方法:
1.select @@servername
查看返回值是否与现在机器名不一致(如果一致就是别的问题了)
2.exec sp_helpserver
查看应该有NAME与network ......
If the SQL data type is 'timestamp', we need to use ResultSet.getBytes() to retrieve its value. If the SQL data type is 'datetime', we can use ResultSet.getTimestamp(). It is said timestamp is interanlly saved as binary data.
try {
Class.forName("com.microsoft. ......