易截截图软件、单文件、免安装、纯绿色、仅160KB

C#中使用DataTable显示Access数据库中文件列表


private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
             this.comboBox2.Items.Clear();
            switch(this.comboBox1.SelectedIndex)
            {
             case 0:
                  try
                    {
                        OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;User ID=admin;Data Source=C:\tmpAccess\DataBase1.mdb");
                        conn.Open();
                        if(conn.State == System.Data.ConnectionState.Open){
                            Console.WriteLine("Success");
                        }
                        DataTable test = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new Object[] { null, null, null, "Table" });
                        this.dataGridView1.DataSource =test;
                        int tableIndex = test.Columns.IndexOf("TABLE_NAME");
                        foreach (DataRow row in test.Rows)
                            comboBox2.Items.Add(row[tableIndex].ToString());
     &nb


相关文档:

C#连接mysql数据库

using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using MySql ......

asp /asp.net c#链接Orcale 数据库的方案

1,在web服务器上安装Oracle数据库客户端,这是连接Oracle数据库的基础(但,不一定是必须的)。
2,在客户端的Net Manager 中进行配置服务的名称,配置如图(这一点非常的重要以后的链接全都在这个服务名称的基础上进行的)
3,ASP链接服务的链接字符串和方法如下:
<%
connstr= "Provider=MSDAORA.1;Password=***; ......

将图片等文件保存到sqlite中(c#)

 SqLite.net的dll为System.Data.SQLite.dll,这种dll分为32位、64位和适用于compactframework三种,在引用时要注意,选择正确的dll。
将要保存图片的字段类型设为blob。代码如下:
private void savePicture()
{
using (SQLiteConnection cnn = new SQLiteConnection(dbPath))
......

C#连接MySQL进行操作的方法

由于需要实现以下功能:
网关通过串口发送数据给PC机,PC机收集数据并解析保存到MySQL中,然后JSP页面读取MySQL中的数据并显示。
所以利用C#连接MySQL数据成为了必须要经过的过程,在此给予详细的说明。
1、下载需要的文件MySQLDriverCS,下载地址为:http://sourceforge.net/projects/mysqldrivercs
2、安装文件:MySQ ......

用python, c#, java写的文件拷贝

     前一段时间试着用这三种语言简单的写了关于文件拷贝的程序,发现c#和python的api惊人的相似,对于文件的操作这两种语言非常的方便。都没有加异常的处理
C#源代码:
        public static void CopyFile(string source, string destination)
  & ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号