Database connectivity [closed]
Want to improve this question? Add details and clarify the problem by editing this post.
开发者_运维知识库Closed 9 years ago.
Improve this questionHow 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.
精彩评论