我需要代码连接 [英] I need code connection

查看:46
本文介绍了我需要代码连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用vb.net2010连接Oracle 10g数据库
我该怎么做?
任何人都可以逐步进行解释!!!!!!!

I need to connect Oracle 10g database using vb.net2010
how i can do this??
any one can expline step by step!!!!!!

推荐答案

一个快速的答案是:使用ADO.NET. :-)

对于初学者,我推荐这篇CodeProject文章:为初学者使用ADO.NET [ ^ ].

在本文中,查看Oracle的代码提供程序.微软现已弃用包装在System.Data.OracleClient类中的提供程序,因此更喜欢通过System.Data.OleDb类使用OLEDB,请参见:
http://msdn.microsoft.com/zh-我们/library/system.data.oledb%28v=vs.100%29.aspx [ http://msdn.microsoft.com/en-us/library/ms254953.aspx [ ^ ].

我想强调参数化查询的重要性,因为不使用它们是许多CodeProject问题所展示的常见错误.请参阅:
http://en.wikipedia.org/wiki/Parametrized_query#Parameterized_statements [ http://msdn.microsoft.com/en-us/library/e80y5yhx.aspx [ ^ ].

祝你好运,
—SA
A quick answer would be: use ADO.NET. :-)

For starters, I recommend this CodeProject article: Using ADO.NET for beginners[^].

In this article, look at the code providers for Oracle. The provider wrapped in System.Data.OracleClient classes is now deprecated by Microsoft, so prefer using OLEDB via the classes of System.Data.OleDb, please see:
http://msdn.microsoft.com/en-us/library/system.data.oledb%28v=vs.100%29.aspx[^].

All the classes for different providers have little common functionality in their base classes, but they are very similar. One considerable difference is the different parameter mapping in parametrized queries (named vs. positional), please see:
http://msdn.microsoft.com/en-us/library/ms254953.aspx[^].

I want to emphasize importance of parametrized queries, because not using them is a common mistake demonstrated by many CodeProject questions. Please see:
http://en.wikipedia.org/wiki/Parametrized_query#Parameterized_statements[^].

Everything else is clearly explained in the article I referenced first, step by step. When you get a good idea of how it works and try out some simple samples, read the detailed introduction and address the complete reference starting here:
http://msdn.microsoft.com/en-us/library/e80y5yhx.aspx[^].

Good luck,
—SA


这篇关于我需要代码连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆