C 操作ORACLE資料庫

2021-06-03 22:06:53 字數 1066 閱讀 1026

using system;

using system.data;

using system.configuration;

using system.linq;

using system.web;

using system.web.security;

using system.web.ui;

using system.web.ui.htmlcontrols;

using system.web.ui.webcontrols;

using system.web.ui.webcontrols.webparts;

using system.xml.linq;

using system.data.oracleclient;

public class oradb

public void executequery(string query)

catch (exception e)

finally

}}

using system;

using system.collections;

using system.configuration;

using system.data;

using system.linq;

using system.web;

using system.web.security;

using system.web.ui;

using system.web.ui.htmlcontrols;

using system.web.ui.webcontrols;

using system.web.ui.webcontrols.webparts;

using system.xml.linq;

namespace mytest

protected void imagebutton1_click(object sender, imageclickeventargs e)

}}

Oracle資料庫操作類(c )

用oracleconnection連線oracle 在web.config中配置 oracle value data source user id password public system.data.oracleclient.oracleconnection cnn 開啟資料庫連線 public...

c 對Oracle資料庫操作

using system using system.data using system.data.oracleclient namespace web region 插入和更新資料庫 public void execsql string strsql catch exception e finall...

C 連線oracle資料庫操作

1 匯入引用system.data.oracleclient.dll檔案 2 在頭部using system.data.oracleclient 通過dataset來讀取資料 建立和資料庫的連線 oracleconnection oracon new oracleconnection user id...