InsertNameCmd.CommandText = "INSERT INTO MSDNFileList(MFileID, MFileName, MDBName, MFileLength) VALUES (@MFileID, @MFileName, @MDBName, @MFileLength) "; InsertNameCmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MFileID", System.Data.SqlDbType.Int, 4, "MFileID")); InsertNameCmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MFileName", System.Data.SqlDbType.VarChar, 200, "MFileName")); InsertNameCmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MDBName", System.Data.SqlDbType.VarChar, 10, "MDBName")); InsertNameCmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MFileLength", System.Data.SqlDbType.Int, 4, "MFileLength")); InitInsertCmd(); } /// /// 初始化插入数据内容的命令对象 /// private void InitInsertCmd() { if( InsertCmd != null) InsertCmd.Dispose(); InsertCmd = DataConn.CreateCommand(); InsertCmd.CommandText = "INSERT INTO MSDNFile(MFileID, MFileContent) VALUES (@MFileID, @MFileContent)"; InsertCmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MFileID", System.Data.SqlDbType.Int, 4, "MFileID")); InsertCmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MFileContent", System.Data.SqlDbType.VarBinary, 2147483647, "MFileContent")); }
/// /// 反编译MSDN文档的主程序 /// private void MsdnOut() { try { // 检查MSDN安装目录 string strMSDNDir =@"C:\Program Files\MSDN\2003FEB\2052"; if( System.IO.Directory.Exists( strMSDNDir) == false) return ;
// 检查反编译器程序 string strExeFile = @"C:\Program Files\Microsoft Help 2.0 SDK\hxcomp.exe"; if( System.IO.File.Exists( strExeFile ) == false) return ;
// 准备临时文件目录 string strOutDir = this.txtOutPath.Text ; if( strOutDir == null || strOutDir.Trim().Length == 0) |