Oracle.DataAccess Error

前端 未结 5 1338
失恋的感觉
失恋的感觉 2021-01-03 06:13

I have an asp.net / C# web application running in a Windows environment. The project builds fine and runs perfectly on my local machine\'s VB.net development server.

5条回答
  •  礼貌的吻别
    2021-01-03 06:47

    Equals, with Oracle.DataAccess.dll    Works!!!!
    //using Oracle.DataAccess.Client
    
    object pdf = null;
    
    var queryString =@"SELECT PDF  FROM DIGITAL  WHERE ID_DIGITAL=1001" ;  //example
    var ctx = new Entities();
    var entityConn = ctx.Connection as EntityConnection;
    
    if (entityConn != null)
    {
    var dbConn = entityConn.StoreConnection as OracleConnection;
    dbConn.Open();
    
    var cmd = new OracleCommand(queryString, dbConn);
    using (var reader = cmd.ExecuteReader())
    {
    while (reader.Read())
    {
    pdf = reader[0];
    }
    }
    dbConn.Close();
    }
    return pdf;
    

提交回复
热议问题