开发者

Database connectivity [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

开发者_运维知识库

Closed 9 years ago.

Improve this question

How can I establish the database connection with the back end of oracle10g express edition with the front end of asp.net?. Please send the source code.


Once you've downloaded the appropriate driver you reference the assembly in your project you could perform SQL queries against the database:

using (var conn = new OracleConnection(ConnectionString))
using (var command = conn.CreateCommand())
{
    conn.Open();
    command.CommandText = "SELECT id FROM foo;";
    using (var reader = command.ExecuteReader())
    {
        while (reader.Read())
        {
            // TODO: exploit the results
        }
    }
}

Reading the technical articles accompanying the driver might also be useful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜