C#从数据库下载硬盘文件名问题
来源:百度知道 编辑:UC知道 时间:2024/06/17 14:13:05
我这样往硬盘里写放入文件,那么给每个文件不同的文件名。我这样写的,不管有多少文件,始终只读一个文件啊,高手指点啊。我想在这里把系统作为文件名。Application.StartupPath + ("\\Temp\\.jpg"), 因为现在只能读一个文件。
对不住了啊,新手没有分。我的分值为0了
struct Employee
{
public string PictureFile;
public string Page;
}
class DownFile
{
MyMeans MyMean = new MyMeans();
MyModule MyModule = new MyModule();
string My_con = MyMeans.M_str_sqlcon;
public void treeView1_AfterSelect()
{
int CurRec = 0; //初始化记录计数器
//int rec_count=0; //计算总记录数
//public PictureFiles;
string i = System.DateTime.Now.ToString();
Directory.CreateDirectory(Application.StartupPath + "\\Temp\\"+i);
try
{
SqlConnection conn = new SqlConnection(My_con);
string sql = &quo
对不住了啊,新手没有分。我的分值为0了
struct Employee
{
public string PictureFile;
public string Page;
}
class DownFile
{
MyMeans MyMean = new MyMeans();
MyModule MyModule = new MyModule();
string My_con = MyMeans.M_str_sqlcon;
public void treeView1_AfterSelect()
{
int CurRec = 0; //初始化记录计数器
//int rec_count=0; //计算总记录数
//public PictureFiles;
string i = System.DateTime.Now.ToString();
Directory.CreateDirectory(Application.StartupPath + "\\Temp\\"+i);
try
{
SqlConnection conn = new SqlConnection(My_con);
string sql = &quo
SqlConnection conn = new SqlConnection(My_con);
string sql = "select COUNT(*) from PICTURE";
///string sql = "select UNITID ,PICTUREFILE from PICTURE order by UNITID";
SqlDataReader AD = MyMean.getcom(sql);
AD.Read();
int a = Convert.ToInt32(AD[0].ToString());
// int a = AD.GetByte(0).ToString();
conn.Open();
这里为什么不先open再 getcom