资源简介
c# 导出oracle数据库下所有表结构
c# 导出oracle数据库下所有表结构

代码片段和文件信息
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OracleClient;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.Office.Interop.Word;
namespace Expert_For_Oracle
{
public partial class Form1 : Form
{
public string ConnectionString
{
get { return this.textBox1.Text; }
}
string sql = “ select * from (SELECT t1.Table_Name AS \“Table_Name\““
+ “ t1.Column_Name AS \“Column_Name\““
+ “ t1.Data_Type AS \“Data_Type\““
+ “ t1.Data_Length AS \“Data_Length\““
+ “ t1.NullAble AS \“NullAble\““
+ “ t2.Comments AS \“Comments\““
+ “ t1.Data_Default \“Data_Default\““
+ “ FROM cols t1“
+ “ left join user_col_comments t2“
+ “ on t1.Table_name = t2.Table_name“
+ “ and t1.Column_Name = t2.Column_Name“
+ “ left join user_tab_comments t3“
+ “ on t1.Table_name = t3.Table_name“
+ “ WHERE NOT EXISTS (SELECT t4.object_Name“
+ “ FROM User_objects t4“
+ “ WHERE t4.object_Type = ‘TABLE‘“
+ “ AND t4.Temporary = ‘Y‘“
+ “ AND t4.object_Name = t1.Table_Name)“
+ “ ORDER BY t1.Table_Name t1.Column_ID) k“
+ “ where k.\“Table_Name\“ = “;
public Form1()
{
InitializeComponent();
this.Load += Form1_Load;
this.button1.Click += button1_Click;
this.button2.Click += button2_Click;
}
void button2_Click(object sender EventArgs e)
{
OracleConnection conn = new OracleConnection(ConnectionString);//创建一个新连接
try
{
conn.Open();
}
catch (Exception ee)
{
MessageBox.Show(“连接失败!“);
return;
}
conn.Close(); //关闭连接
MessageBox.Show(“连接成功!“);
}
void button1_Click(object sender EventArgs e)
{
Thread thread = new Thread(new ThreadStart(delegate()
{
int finsh = 0;
var dt = GetAllTableName().Tables[0];
for (int i = 0; i < dt.Rows.Count; i++)
{
this.BeginInvoke(new Action(() =>
{
this.lbl.Text = “共:“ + dt.Rows.Count + “ 张表,已经导出:“ + i + “ 张表“;
}));
var tableName = dt.Rows[i][“TABLE_NAME“
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-08-30 10:25 Expert For Oracle\
目录 0 2017-08-30 10:25 Expert For Oracle\Expert For Oracle\
文件 187 2015-04-20 09:43 Expert For Oracle\Expert For Oracle\App.config
文件 4090 2015-04-20 10:53 Expert For Oracle\Expert For Oracle\Expert For Oracle.csproj
文件 5768 2015-04-20 11:48 Expert For Oracle\Expert For Oracle\Form1.Designer.cs
文件 8235 2015-04-20 11:48 Expert For Oracle\Expert For Oracle\Form1.cs
文件 5817 2015-04-20 11:48 Expert For Oracle\Expert For Oracle\Form1.resx
文件 529 2015-04-20 09:43 Expert For Oracle\Expert For Oracle\Program.cs
目录 0 2017-08-30 10:25 Expert For Oracle\Expert For Oracle\Properties\
文件 1376 2015-04-20 09:43 Expert For Oracle\Expert For Oracle\Properties\AssemblyInfo.cs
文件 2886 2015-04-20 09:43 Expert For Oracle\Expert For Oracle\Properties\Resources.Designer.cs
文件 5612 2015-04-20 09:43 Expert For Oracle\Expert For Oracle\Properties\Resources.resx
文件 1104 2015-04-20 09:43 Expert For Oracle\Expert For Oracle\Properties\Settings.Designer.cs
文件 249 2015-04-20 09:43 Expert For Oracle\Expert For Oracle\Properties\Settings.settings
目录 0 2017-08-30 10:25 Expert For Oracle\Expert For Oracle\bin\
目录 0 2017-08-30 10:25 Expert For Oracle\Expert For Oracle\bin\Debug\
文件 24576 2015-04-20 11:48 Expert For Oracle\Expert For Oracle\bin\Debug\Expert For Oracle.exe
文件 187 2015-04-20 09:43 Expert For Oracle\Expert For Oracle\bin\Debug\Expert For Oracle.exe.config
文件 30208 2015-04-20 11:48 Expert For Oracle\Expert For Oracle\bin\Debug\Expert For Oracle.pdb
文件 24224 2015-04-20 15:59 Expert For Oracle\Expert For Oracle\bin\Debug\Expert For Oracle.vshost.exe
文件 187 2015-04-20 09:43 Expert For Oracle\Expert For Oracle\bin\Debug\Expert For Oracle.vshost.exe.config
目录 0 2017-11-23 15:01 Expert For Oracle\Expert For Oracle\bin\Release\
目录 0 2017-08-30 10:25 Expert For Oracle\Expert For Oracle\obj\
目录 0 2017-08-30 10:25 Expert For Oracle\Expert For Oracle\obj\Debug\
文件 865 2015-04-20 09:43 Expert For Oracle\Expert For Oracle\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 7212 2015-04-20 10:44 Expert For Oracle\Expert For Oracle\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 753 2015-04-20 15:59 Expert For Oracle\Expert For Oracle\obj\Debug\Expert For Oracle.csproj.FileListAbsolute.txt
文件 977 2015-04-20 11:48 Expert For Oracle\Expert For Oracle\obj\Debug\Expert For Oracle.csproj.GenerateResource.Cache
文件 5722 2015-04-20 10:53 Expert For Oracle\Expert For Oracle\obj\Debug\Expert For Oracle.csprojResolveAssemblyReference.cache
文件 24576 2015-04-20 11:48 Expert For Oracle\Expert For Oracle\obj\Debug\Expert For Oracle.exe
文件 30208 2015-04-20 11:48 Expert For Oracle\Expert For Oracle\obj\Debug\Expert For Oracle.pdb
............此处省略8个文件信息
相关资源
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
评论
共有 条评论