Click here to Skip to main content
15,914,014 members
Home / Discussions / C#
   

C#

 
GeneralRe: swicth & case? Pin
Luc Pattyn23-Mar-09 16:23
sitebuilderLuc Pattyn23-Mar-09 16:23 
GeneralRe: swicth & case? Pin
PIEBALDconsult23-Mar-09 16:25
mvePIEBALDconsult23-Mar-09 16:25 
GeneralRe: swicth & case? Pin
dec8223-Mar-09 16:16
dec8223-Mar-09 16:16 
GeneralRe: swicth & case? Pin
Mycroft Holmes23-Mar-09 16:44
professionalMycroft Holmes23-Mar-09 16:44 
GeneralRe: swicth & case? Pin
PIEBALDconsult23-Mar-09 17:14
mvePIEBALDconsult23-Mar-09 17:14 
GeneralRe: swicth & case? Pin
dec8224-Mar-09 2:22
dec8224-Mar-09 2:22 
GeneralRe: swicth & case? Pin
PIEBALDconsult24-Mar-09 3:54
mvePIEBALDconsult24-Mar-09 3:54 
QuestionODAC and DbProviderFactory Pin
devvvy23-Mar-09 14:43
devvvy23-Mar-09 14:43 
hello

trying to access oracle database, reading this article from Oracle herself[^]. It illustrates how to configure and retrieve connection but what I need to do is to get an "DbProviderFactory" instance (to align with other db access already in our DAO library)

Any idea how to do this with ODAC? Example:

<br />
public static DbProviderFactory GetConnectionFactory(string strProvider)<br />
		{<br />
			// REF: http://msdn2.microsoft.com/en-us/library/s90hx22e(VS.80).aspx<br />
			DbProviderFactory oDbFactory = null;<br />
<br />
			if (Providers == null)<br />
			{<br />
				Providers = new Hashtable();<br />
			}<br />
<br />
			if (!Providers.ContainsKey(strProvider))<br />
			{<br />
				// TODO: CAUTION: Does it support MySQL and Oracle? Apparently not! Be careful.<br />
				if (strProvider.ToUpper() == MYSQL.ToUpper())<br />
				{<br />
					oDbFactory = new MySql.Data.MySqlClient.MySqlClientFactory();<br />
				}<br />
				else if (strProvider.ToUpper() == ORACLE.ToUpper())<br />
				{<br />
					// TODO: I searched Oracle.DataAccess.Client didn't find any provider factory class...<br />
					oDbFactory = Oracle.DataAccess.Client.???<br />
				}<br />
				else<br />
				{<br />
					oDbFactory = DbProviderFactories.GetFactory(strProvider);<br />
					Providers.Add(strProvider, oDbFactory);<br />
				}<br />
			}<br />
			else<br />
			{<br />
				oDbFactory = (DbProviderFactory)Providers[strProvider];<br />
			}<br />
<br />
			return oDbFactory;<br />
		}<br />


Or should I forget ODAC and use "System.Data.OracleClient.OracleClientFactory"?
<br />
oDbFactory = DbProviderFactories.GetFactory("System.Data.OracleClient..::.OracleClientFactory");<br />
					Providers.Add(ORACLE, oDbFactory);<br />


Thanks

dev

QuestionA Class to interface with many types Pin
iltallman23-Mar-09 14:27
iltallman23-Mar-09 14:27 
QuestionSaving picture to SQL (PictureBox) GDI Error Pin
Jacob Dixon23-Mar-09 14:24
Jacob Dixon23-Mar-09 14:24 
AnswerRe: Saving picture to SQL (PictureBox) GDI Error Pin
Xmen Real 23-Mar-09 15:19
professional Xmen Real 23-Mar-09 15:19 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Jacob Dixon23-Mar-09 15:31
Jacob Dixon23-Mar-09 15:31 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Xmen Real 23-Mar-09 15:35
professional Xmen Real 23-Mar-09 15:35 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Jacob Dixon23-Mar-09 15:40
Jacob Dixon23-Mar-09 15:40 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Xmen Real 23-Mar-09 15:44
professional Xmen Real 23-Mar-09 15:44 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Jacob Dixon23-Mar-09 15:50
Jacob Dixon23-Mar-09 15:50 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Xmen Real 23-Mar-09 16:27
professional Xmen Real 23-Mar-09 16:27 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Jacob Dixon23-Mar-09 16:56
Jacob Dixon23-Mar-09 16:56 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Xmen Real 23-Mar-09 16:59
professional Xmen Real 23-Mar-09 16:59 
AnswerRe: Saving picture to SQL (PictureBox) GDI Error Pin
Luc Pattyn23-Mar-09 16:03
sitebuilderLuc Pattyn23-Mar-09 16:03 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Jacob Dixon23-Mar-09 16:14
Jacob Dixon23-Mar-09 16:14 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Luc Pattyn23-Mar-09 16:30
sitebuilderLuc Pattyn23-Mar-09 16:30 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Jacob Dixon23-Mar-09 16:42
Jacob Dixon23-Mar-09 16:42 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Luc Pattyn23-Mar-09 17:36
sitebuilderLuc Pattyn23-Mar-09 17:36 
GeneralRe: Saving picture to SQL (PictureBox) GDI Error Pin
Xmen Real 23-Mar-09 17:03
professional Xmen Real 23-Mar-09 17:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.