资源简介
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# 绘制多边形,支持撤销 删除 编辑
- c# winform wia 调用扫描仪
- C#软件注册试用期限代码.zip
- C# 获取图片某像素点RGB565值
- 火币网REST API C#版
- 五子棋对战用C#编写的
- C#串口调试助手_VS2010()
- C# 软件注册期限验证代码
- C# 敏感字过滤 内含敏感字字典两个字
- Skyline开发入门C#
- C# 流数据旋转 90度 图像旋转 90度
- c# rgb565 转 rgb24
- c# 学生成绩管理系统
- C#实现USB设备通信
- C#使用NI-VISA控制仪器
- MODBUS TCP C# 源码 -- 测试过信捷PLC
- C# 增量式PID控制
- c# 动态编译代码 执行脚本代码 关键字
- C# 新手:在窗体上显示图片和文字
- 常用的7种 C# 遗传算法源码集
- C#设置和获取输入法一例 一个简单的
- c# icon 图标 特效 WINDOWS任务栏 动态生
- c# MJPEG STREAM SERVER AND CLIENT
- 基于控制台实现的贪吃蛇
- 学生成绩管理系统 c#+Access
- C#淘宝秒杀源码
- C#WEB上传控件多附件上传
- 深圳明华URF-R330读卡器 M1卡读写程序(
- C#透明窗体画图电子尺
- C#HttpWebRequest大文件断点续传类
评论
共有 条评论