91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.38MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-08-17
  • 語言: C#
  • 標簽: c#??oracle??excel??aspose??

資源簡介

c#全部源碼,用到了aspose插件。 能將查詢導出到excel。 能一次導出多條查詢語句,語句需要用";"分割。 自動判斷數據條數分頁,每頁65535條。 自動判斷導出文件大小,若單文件大于100MB,則分文件導出

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
//using?System.ComponentModel;
using?System.Text.Regularexpressions;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.IO;
using?Microsoft.Win32;
using?System.Collections;
using?Aspose.Cells;
using?System.Data.OracleClient;

namespace?orcl2xls
{

????public?partial?class?Form_Main?:?Form
????{
????????public?Form_Main()
????????{
????????????InitializeComponent();
????????}

????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????//聲明一個注冊表項對象,使其打開LocalMachine主項
????????????RegistryKey?HKEY?=?Registry.LocalMachine;

????????????//聲明另外一個注冊表項對象,使其打開Oracle所用到的項
????????????RegistryKey?OracleSubKey?=?HKEY.OpenSubKey(@“Software\oracle\“?false);

????????????//然后用GetValue方法,得到Oracle安裝文件夾的路徑
????????????string?tnsFileName?=?““;
????????????try
????????????{
????????????????tnsFileName?=?OracleSubKey.GetValue(“ORACLE_HOME“).ToString();
????????????}
????????????catch
????????????{
????????????????if?(OracleSubKey?!=?null)
????????????????{
????????????????????string[]?subkeyNames;
????????????????????subkeyNames?=?OracleSubKey.GetSubKeyNames();
????????????????????foreach?(string?keyName?in?subkeyNames)
????????????????????{
????????????????????????RegistryKey?OracleSubSubKey?=?HKEY.OpenSubKey(@“Software\oracle\“?+?keyName?false);
????????????????????????try
????????????????????????{
????????????????????????????tnsFileName?=?OracleSubSubKey.GetValue(“ORACLE_HOME“).ToString();
????????????????????????}
????????????????????????catch
????????????????????????{
????????????????????????}
????????????????????????if?(tnsFileName?!=?““)
????????????????????????????break;
????????????????????}


????????????????}

????????????}
????????????if?(tnsFileName?!=?““)
????????????{
????????????????//得到Oracle連接串配置文件的絕對地址
????????????????tnsFileName?+=?@“\network\ADMIN\tnsnames.ora“;

????????????????//聲明一個StreamReader對象,打開這個配置文件
????????????????StreamReader?fin?=?new?StreamReader(tnsFileName);
????????????????string?Content?TnsContent?TmpName;
????????????????O2F.TnsList.Clear();
????????????????TnsContent?=?““;
????????????????TmpName?=?““;
????????????????Content?=?fin.ReadLine();????//從配置文件里讀一行數據
????????????????while?(Content?!=?null)????//執行循環,直到讀取的內容為null,退出循環
????????????????{
????????????????????//再讀一行,因為配置文件里前兩行都是注釋,所以不加限制的讀取3行是沒有問題的
????????????????????Content?=?fin.ReadLine();
????????????????????//Content?=?Content.Trim();
????????????????????//判斷讀取的內容是不是符合條件。
????????????????????//由于&&判斷是驟死式判斷,所以當&&前的判斷不成立時,后面的判斷就不進行了。
????????????????????//所以按照這個順序寫,是不會出錯的。
????????????????????//如果把Content!=null放到if判斷的第二條,那么程序就會出錯(因為當讀到文件尾的時候,Content會等于null)
????????????????????if?(Content?!=?null?&&?Content.Trim().Length?!=?0?&&?Content.Trim()[0]?!=?‘#‘)//&&?Content[0]?!=?‘#‘?&&?Content[0]?!=?‘(‘?&&?Content[0]?!=?‘)‘)
????????????????????{
????????????????????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????4317184??2014-09-18?09:08??orcl2xls\orcl2xls\bin\Release\Aspose.Cells.dll

?????文件????????427??2014-09-18?09:09??orcl2xls\orcl2xls\bin\Release\License.lic

?????文件??????53248??2014-09-23?11:53??orcl2xls\orcl2xls\bin\Release\orcl2xls.exe

?????文件??????36352??2014-09-23?11:53??orcl2xls\orcl2xls\bin\Release\orcl2xls.pdb

?????文件??????16958??2014-09-19?08:32??orcl2xls\orcl2xls\bin\Release\OTE.ico

?????文件??????42748??2014-09-23?11:53??orcl2xls\orcl2xls\Form1.cs

?????文件??????11553??2014-09-22?15:42??orcl2xls\orcl2xls\Form1.Designer.cs

?????文件???????6431??2014-09-22?15:42??orcl2xls\orcl2xls\Form1.resx

?????文件????????842??2014-09-22?16:47??orcl2xls\orcl2xls\obj\Debug\orcl2xls.csproj.GenerateResource.Cache

?????文件??????53248??2014-09-22?16:48??orcl2xls\orcl2xls\obj\Debug\orcl2xls.exe

?????文件????????180??2014-09-16?22:28??orcl2xls\orcl2xls\obj\Debug\orcl2xls.Form_Login.resources

?????文件????????180??2014-09-22?16:47??orcl2xls\orcl2xls\obj\Debug\orcl2xls.Form_Main.resources

?????文件??????46592??2014-09-22?16:48??orcl2xls\orcl2xls\obj\Debug\orcl2xls.pdb

?????文件????????180??2014-09-18?16:49??orcl2xls\orcl2xls\obj\Debug\orcl2xls.Properties.Resources.resources

?????文件????????295??2014-09-21?22:52??orcl2xls\orcl2xls\obj\orcl2xls.csproj.FileList.txt

?????文件???????1707??2014-09-23?11:53??orcl2xls\orcl2xls\obj\orcl2xls.csproj.FileListAbsolute.txt

?????文件????????842??2014-09-23?11:53??orcl2xls\orcl2xls\obj\Release\orcl2xls.csproj.GenerateResource.Cache

?????文件??????53248??2014-09-23?11:53??orcl2xls\orcl2xls\obj\Release\orcl2xls.exe

?????文件????????180??2014-09-23?11:53??orcl2xls\orcl2xls\obj\Release\orcl2xls.Form_Main.resources

?????文件??????36352??2014-09-23?11:53??orcl2xls\orcl2xls\obj\Release\orcl2xls.pdb

?????文件????????180??2014-09-23?11:53??orcl2xls\orcl2xls\obj\Release\orcl2xls.Properties.Resources.resources

?????文件???????3528??2014-09-23?08:53??orcl2xls\orcl2xls\orcl2xls.csproj

?????文件??????16958??2014-09-19?08:33??orcl2xls\orcl2xls\OTE.ico

?????文件????????471??2014-09-17?08:36??orcl2xls\orcl2xls\Program.cs

?????文件???????1176??2014-09-19?09:28??orcl2xls\orcl2xls\Properties\AssemblyInfo.cs

?????文件???????2870??2014-09-16?22:16??orcl2xls\orcl2xls\Properties\Resources.Designer.cs

?????文件???????5350??2014-09-16?22:16??orcl2xls\orcl2xls\Properties\Resources.resx

?????文件???????1091??2014-09-16?22:16??orcl2xls\orcl2xls\Properties\Settings.Designer.cs

?????文件????????249??2014-09-16?22:16??orcl2xls\orcl2xls\Properties\Settings.settings

?????文件????????917??2014-09-17?00:10??orcl2xls\orcl2xls.sln

............此處省略16個文件信息

評論

共有 條評論