易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

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

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

MD5加密的一般方法(ASP.NET / C#2005)

  /// <summary>
/// 方法一:通过使用 new 运算符创建对象
/// </summary>
/// <param name="strSource">需要加密的明文</param>
/// <returns>返回16位加密结果,该结果取32位加密结果的第9位到25位</returns>
public string Get_MD5_Method1(strin ......

将图片等文件保存到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#中对XML节点进行增删改查

号称xmlhelper的一个类
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
namespace WebApplication2
{
/// <summary>
/// XMLHelper XML文档操作管理器
/// </summary>
public class XMLHelper
{
public X ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号