using System;
using System.Data;
using System.Data.SqlClient;
using System.IO;
namespace LoadImmages
{
class LoadImages
{
//you may refer to your own system's image file location
string imageFileLocation = @"F:\";
//you may refer to your own image's file name here.
//string imageFilePrefix = "painting-almirah";
string imageFilePrefix = "微信";
int numberImageFiles = 2;
string imageFileType = ".jpg";
int maxImageSize = 1000000;
SqlConnection conn = null;
SqlCommand cmd = null;
void OpenConnection()
{
conn = new SqlConnection(@"server=.;integrated security = true;database=tempdb");
conn.Open();
}
void CloseConnection()
{
conn.Close();
Console.WriteLine("Connection Closed!");
}
C#保存图片数据到数据库
最新推荐文章于 2024-08-08 11:24:16 发布