FSharp 调用 Oracle.ManagedDataAccess.dll
时间:2022-03-13 22:55
Oracle.ManagedDataAccess.dll
即使是 64 位系统,也要注册 32 位版本。
#if INTERACTIVE
#r@"C:\oracle\odp.net\managed\common\Oracle.ManagedDataAccess.dll"
#endif
openOracle.ManagedDataAccess.Client
openOracle.ManagedDataAccess.Types
open System.Data
let connStr ="userid=hr;password=hr;data source=xe"
let conn =newOracle.ManagedDataAccess.Client.OracleConnection(connStr)
conn.Open()
printfn"%s" conn.ServerVersion
let cmd =conn.CreateCommand()
cmd.CommandType<- CommandType.Text
cmd.CommandText<- "select* from jobs"
let da =newOracle.ManagedDataAccess.Client.OracleDataAdapter( cmd )
let table =new System.Data.DataTable()
let cnt =da.Fill(table)
table.Columns.[0]
table.Rows.[0]
table.Rows.[0].[0]
FSharp 调用 Oracle.ManagedDataAccess.dll,布布扣,bubuko.com