- 博客(6)
- 收藏
- 关注
转载 SQL Server 2008开启远程连接
核心提示:sql server 2008默认是不允许远程连接的,sa帐户默认禁用的,如果想要在本地用SSMS连接远程服务器上的SQL Server 2008,需要做两个部分的配置sql server 2008默认是不允许远程连接的,sa帐户默认禁用的,如果想要在本地用SS
2011-10-18 21:35:17
319
转载 C# Winform主窗体和子窗体之间如何相互操作对方的控件
方法一:在主窗体类中定义一个静态成员,来保存当前主窗体对象,例如: public static yourMainWindow pCurrentWin = null; 然后在主窗体构造函数中,给静态成员初始化,如下:
2011-10-09 00:20:04
1946
转载 C# - 在 WinForm 中让 Enter 键变成 Tab 键
在 WinForm 中为了配合使用者的操作习惯,会让 Enter 键拥有 Tab 键的功能。这功能有两种写法,如下:第一种:使用 Form 的 KeyDown 事件来完成Code:private void Form1_KeyDown(object send
2011-10-08 23:09:33
784
转载 Winform中向DataGridView控件添加数据
在Winform中向DataGridView控件添加数据很常用到,现总结3种填充DataGridView方法:1.利用SqlDataAdapter对象向DataGridView中添加数据关键代码:(可以将该代码放到窗体加载事件的方法中)using (SqlDataAdapter da = new SqlDataAdapter("select * from Prod
2009-11-16 20:19:00
2962
转载 winform 数据类例程
建立一个Conn.cs类文件using System;using System.Collections.Generic;using System.Text;using System.Data.SqlClient;using System.Configuration;using System.Data;namespace Example{
2009-11-16 18:54:00
437
原创 winform数据库连接字符串的设定
在解决方案中增加一窗口选择xml文件,并将名称改为app.config.其内容设置如下: 注意:请在引用中添加-System.configuration不然程序会提示错误。 在程序中就可以这样调用: private string source = System.Configuration.ConfigurationManager.AppSe
2009-11-15 19:45:00
997
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人