FSharp 调用 Oracle.ManagedDataAccess.dll

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

FSharp 调用 Oracle.ManagedDataAccess.dll

上一篇:java攻城狮之路--复习JDBC


下一篇:sqlserver巧用row_number和partition by分组取top数据