C#MySQL数据库对Pro/e,cad文件的存储与读取
其中MySQL数据库的设计如下图所示:
类实现如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Collections;
using System.Drawing;
//对流进行操作要引用
using System.IO;
//连接数据库操作要引用
using MySql.Data.MySqlClient;
namespace DBjiaju_Dev
{
class FileMySQL
{
/// <存储文件至MySQL数据库>
/// 存储图片至MySQL数据库
/// </summary>
/// <param name="strImagePath"></param>
/// <returns></returns>
public bool MapSearchWrite(String strImagePath, String name)
{
//将文件转换成缓冲