PowerShell 调用 Oracle.ManagedDataAccess.dll



PowerShell 调用 Oracle.ManagedDataAccess.dll


#

# PowerShell Oracle.ManagedDataAccess.dll

#

 

[System.Reflection.Assembly]::LoadFrom("C:\oracle\odp.net\managed\common\Oracle.ManagedDataAccess.dll")

 

$connStr="userid=hr;password=hr;data source=xe"

$conn=New-ObjectOracle.ManagedDataAccess.Client.OracleConnection($connStr)

$conn.Open()

 

$cmd=$conn.CreateCommand()

$cmd.CommandType=[System.Data.CommandType]::Text

$cmd.CommandText="Select * fromjobs"


$reader=$cmd.ExecuteReader()

 

$da=New-ObjectOracle.ManagedDataAccess.Client.OracleDataAdapter($cmd )

$table=New-ObjectSystem.Data.DataTable

$cnt=$da.Fill($table)

 

$cnt

$table

 


PowerShell 调用 Oracle.ManagedDataAccess.dll

上一篇:adb pull命令复制数据库文件.db到电脑


下一篇:Web版的各种聊天工具