View Complete Post
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 !
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.
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?
Here is my SP:
create or replacePROCEDURE ZGETUSERSSIGNONS (vUid IN VARCHAR2, p_getuserssignon_recordset1 OUT SYS_REFCURSOR) ASBEGIN Open p_getuserssignon_recordset1 for SELECT Distinct(Userid), UserPassword, SecurityLevel, ActiveStatusFROM ZSIGNON WHERE substr(UserId,1,2) <> vUidOrder By UserId;END ZGETUSERSSIGNONS;
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).
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,
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)
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);
DataTable dataTable = new DataTable();
dataTable = IncidentsDataSet.Tables["dataTableTest"];
dataGridView1.DataSource = dataTable;
//Would like to create som
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'.
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..Lavanya