.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

DataTable --> Oracle DB

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net


Can someone offer advice on the below? 

I am connecting to an AR Server and pulling out data into a DataSet.  There will be 15 different DataTables within the set.  I would like to find a way to either insert the entire DataSet or each DataTable into an Oracle table.  The Oracle table has the same format as the DataTables I'm creating.

 private void button1_Click(object sender, EventArgs e)
                //Get Credentials
                ID = userNameTextBox.Text;
                PW = passWordTextBox.Text;

                connString = gstrConnectBaseLineStart + "UID=" + ID + ";PWD=" + PW + gstrConnectBaseLineEnd; //Connection string
                conn = new OdbcConnection(connString); //Create Connection
                conn.Open(); //Open Connection
                Console.Write("Connection Successful" + "\n");

                dataAdapter = new OdbcDataAdapter(SQL, conn);
                dataAdapter.Fill(IncidentsDataSet, "dataTableTest");

                DataTable dataTable = new DataTable();
                dataTable = IncidentsDataSet.Tables["dataTableTest"];

                dataGridView1.DataSource = dataTable;

                //Would like to create som

View Complete Post

More Related Resource Links

out of memory loading datatable from large oracle table


I've created a winform c# application that connects to an oracle database and loads a datatable with all the data in the oracle table then exports it out to a delimited file, which will then get imported to a local mysql database.  This works just fine when the oracle table isn't so large.  However I keep getting an out of memory exception when I populate my datatable with a large oracle table.  I can't manually export data from oracle then manually load to mysql because this has to be seamless to the user.  I'm having difficulties grasping how to solve this problem.  Is there a better solution then what I have to get from oracle to mysql? 

Need Oracle Data Provider .CS File for Oracle 10g Database connection !



I need a 'Wrapper.cs' file which takes care of the Database connection ( Oracle 10g) where

i can just call the method with my SQL Query


Gridview1.DataSource = SampleWrapper.ExecuteDatatable("THE SQL QUERY");


Plz Post the link if there is any open source !    

ASP.Net connect to Oracle.


 We have an application which uses  'System.Data.OracleClient'. On the box it was developed we can change the TNSNAMES.ORA entries to connect to different oracle databases. Moving the code to a  Microsoft Server 2008 box it would appear that the application ignores the TNSNAMES.ORA file. It has cached the first Oracle connection and will now work without any TNSNAMES.ORA file. Where is it getting the connection? We have set tns_admin to point at the TNSNAMES.ORA file. We can tnsping the connection OK.

access Oracle database


Pre- .Net Framework 4.0 supported using Oracle.DataAccess.Client, using Oracle.DataAccess.Types, System.Data.OracleClient, OracleDataReader, OracleConnection. What are the equivalents in .Net Framework 4.0? Does it require any download?

Thank you.

Trying to run a stored procedure from vb code with oracle data provider.



Here is my SP:

create or replace
 Open p_getuserssignon_recordset1 for
 SELECT Distinct(Userid), UserPassword, SecurityLevel, ActiveStatus
WHERE substr(UserId,1,2) <> vUid
Order By UserId;

I would like to run this SP from code and fill a gridview with the result. 

I am not sure how to go about this, as I have found several different examples, other than the one I  think I need.

I am using the oracle data provider and I have an input parameter (vUid, which will equal "zz").

First question. When filling a gridview with a result set from a stored procedure should the recordset OUT be defined as a REFCURSOR (like i did above)? 


Do you have example code as to how to execute the SP and fill a gridview?  I keep trying different variations of code i've found on the internet without any success other than getting more confused.

(I am using VS 2005, VB).

Thank you.



Linq with two databases (oracle and sql server)


i have a problem to bring the data from the oracle (external database) and the sql server together (with similar data). The linq entities are linked to each other. The structure is like different countries with different cities and so on. To display these "non original linq objects" i need to put them into entities (linked to each other). Now i add some of them to my sql database. But for every entity i must check the connection to the other objects i don't want to add and delete them (otherwise linq will add all the connected objects, even those I don't want to add). If this goes wrong the whole input-method crashes. Is there any other possibility, except from checking every single entity and removing unwanted connections, to handle this procedure?
Thanks a lot, preg

Connecting to Oracle on 64bit OS

We have a 64-bit implementation of MOSS 2007. I recently installed the SharePoint SDK to use the Application Definition Designer to connect to Oracle. I enter the connection string and then I get this:

Attempt to load Oracle client libraries threw BadImageFormatException. The problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.

I have verified that the server contains the 64 bit version of the Oracle client installed both with the instantclient and with system.data.oracleclient.dll. The only thing I can think of is that the tool was compiled as a 32bit application.  Is there a 64bit version available? Is there something else that I'm missing?

"An error occurred while retrieving data from Oracle Instance..."


I have succeffuly Imported the ADF and have also successfully created a Business Data Column. But when I try to query data , I get the following error

An error occurred while retrieving data from Oracle Instance. Administrator, see the server log for more information

And this is what I found in the Application Logs
A Metadata Exception was constructed in App Domain '/LM/W3SVC/81256521/ROOT-1-129217212004078822'. The full exception text is: LobSystem could not be found using criteria 'id=476'.

Secured Oracle Provider



Ours is a Asp.net web application. Database is Oracle. Its an Internet Application.

Database will be in one location and Web application in another. Data from Oracle to Web application will be passed over Internet.

We are using EnterpriseLibrary. And provider is System.Data.OracleClient.

We need a provider which encrypts the data while passing data over internet.

Do we need to go for some third party Providers or ODBC ?

Please let me know..


What's wrong with MSDAORA.1 (Microsoft OLE DB Provider for Oracle) in SQL2008R2

Dear Gurus, I'd install a test SQL2008R2 on Windows Server 2008 R2 x64 Version. And Install Oracle both x86 and x64 version Client. And I'd create a new AS Database as AS System Administrator. And then create a new Datasource with "Microsoft OLE DB Prodiver for Oracle" Provider. When I test connection ,  it tested succeed. Then I create Datasource View / Dimension / Cubes etc... But when I process then Database. There is a error occurs. "Database Access Module Error , Provider 'MSDAORA.1' not register" I'd follow http://msdn.microsoft.com/en-us/library/ms152516.aspx change SQL Server 2008 R2's registry key as the note. Then restart this server . But still same error !   And I'd success process the cube if I change provider as "Oracle OLE DB Proverder"   Is MSDAORA been obsolete in SQL SERVER 2008 R2 ?Wilson

Oracle Linked serve Query performance in 2000 vs 2008 R2 64 Bit

Hi everyone We have started to migrate one of our reporting systems from Sql 2000 to Sql 2008 R2.  One of the steps has been to test the perforance of certain Oracle linked server queries between each server.  We are finding on average 3 fold better perforance stats (in terms of query completion time) on the old server.  This should obviously not be the case.  The new server has signifantly more CPU/Memory/IO resources to play with, and it is 64 bit (not to mention its new!).  Here's what I got so far: Old server: SQL 2000 on W2000 both fully patched.  Old Dell Dual core with 3 GB of Ram running on two soft IDE Mirrored drives (yes I know... it sucks).  It connecting via the MS OLE DB provider for Oracle (9i client) New server: ESX VMware Server with 2 CPU's assigned, 8 GB of ram connected to large HP SAN.  CPU, ram and IO's have all been ruled out as the problem.  We've tried varying network cards with different results so we havent ruled that out yet.  Its connecting via the Oracle provider for OLE DB (11G 64 bit client) The linked server is an Oracle 9i fully patched server.  All three are on the same network backbone. Running a simple select * query on both servers returns the same number of rows (~76 000) .  It takes ~1:20 on the new server and ~0:20 on the old server. In looking at the wait stati

No Way to retrieve data from oracle ref:_cursor over T-SQL and linked Server?

Hello, for an migration projekt we want to compare results from sp's from oracle and sqlsserver. Same calls should retrieve same results. Also we want build an automatic test for this. But is there now way to retrieve results from oracle sp's whit rev_cursor over linked Server? No one answer to this: http://social.msdn.microsoft.com/forums/en-us/sqldataaccess/thread/2BAC6743-8701-4476-8F36-0377A5761525   greetings Michael

I am not able to install oracle 10g on windows 7, Please let me know how can I do it or what could b

Dear Concerned,I have really become fed up while using windows 7, Please let me know how can I install oracle 10g and which of the version of oracle, windows 7  will accept so that I could start work on my laptop ...Thanks and RegardsRahul Kishan

replication from oracle to SQL

Command attempted: Error messages: ·   Invalid distribution command, state 2: transaction 0x0x0000000000000000081e00000000 command 3{offset : 430 token offset: 429 state: 50) }. (Source: MSSQL_REPL, Error number: MSSQL_REPL21001) The above shown message is the one message which i am getting while replicating from oracle to SQL. In development it is working but not in Prod. What is the solution of above error for failed subscription?

invoke an Oracle BPEL asynchronous web service from asp.net

I'm trying to invoke an Oracle BPEL web service from asp.net (vb) and having trouble getting it to work.  This is the portion of my code in the Page_Prerender event: Dim nlsWorkFlow As New soaslab.IIRWorkFlowProcessRequest Dim binding As New soaslab.IIRWorkFlowBinding nlsWorkFlow.input = Session("IIRID").ToString binding.Begininitiate(nlsWorkFlow, Nothing, Nothing) The web service doesn't launch though. I'm not a web service expert, so seeing if anyone else may know how to get this going.  I don't need to track the web service - just need to launch it.  

How to install Microsoft OLE DB Provider for Oracle

I am using an SSIS Package to get the data from Oracle DB to  SQL server 2005 DB. I am using Micorsoft OLE DB provider for oracle for creating a connection manager to connect to ORACLE 10 g.   The package runs great in my local PC.  when I move the package to the Server ( Microsoft windows server 2003 R2, Enterprise x64 edition) which also has SQL server 2005 .  the package fails to run showing the error: " the AcquireConnection method call to the connection manager "HRDATA" failed with error code 0xC0202009."   I tried to see if the Microst OLE DB provider for  Oracle is installed or not  using the .udl file.  The provider tab in .udl file does not show any provider named " Microsoft OLE  DB provider for Oracle"   Can anyone please help me by telling how can I installed the Microsoft OLEDB provider for Oracle, given my server is ( Microsoft windows server 2003 R2, Enterprise x64 edition)  and my source data base is  ORACLE 10g.

Server Cache Issue - .Net 2.0 / Oracle 11g / 2003 Server / IIS 6.0

Hi All,We are working on a web application developed in C#, nHibernate and with Oracle as back-end.WebServer and Database are on different machines.Application is more or less accessed by 500 users all the time.Recently we found that some of the controls within MultiView Tab contol were not working as expected. Basically, data is not getting saved.For instance, if there are 5 tabs and in the first tab if we change an option in the dropdownlist, in the autopostback event, the new value should get saved to database. If we navigate to another tab and visit the previous tab, the new option should remain there (reloading the data in the page_load, preRender events).But once we restart the IIS, all this functionality works as expected.Even if there is some database issue, like foreign key violation etc, application is behaving weirdly and once we fix the database issue, we still need to restart IIS to clear cache for the application to behave normally.I am not sure if any of you ever faced this issue but please let me know where to start analyzing this issue?Thanks in advance.ys
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend