Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2008, 12:21 AM
Registered User
 
Join Date: Sep 2007
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Default probl accesing oracle view and bind it to datagrid

i have made views in oracle and the viewname = V_SUTR_PDPJ;when i acces the view with OracleDataadapter.fill methode, error occur. here's the error message "ora-02041 client database did not begin a transaction",

and here's the code i wrote;
protected virtual DataTable GetDatatable(string NameOfStoredProcedure, string Sql,string DataTableName) // methode for accesing datatable
{
   this.GetConnection();// methode to build a new connection
    if (NameOfStoredProcedure != "")
    {
      this.OraComm = new OracleCommand(NameOfStoredProcedure, this.OraConn);// oraconn = field / property for OracleConnection
    this.OraComm.CommandType = CommandType.StoredProcedure;
    }
    else
    {this.OraComm = new OracleCommand(Sql, this.OraConn);
      this.OraComm.CommandType = CommandType.Text;
    }
    DataTable myDataTable = new DataTable(DataTableName);
    myDataTable.Clear();
    this.OraDat = new OracleDataAdapter(this.OraComm);
    this.OraDat.Fill(myDataTable);//exception(error here)at debuging
    //this.OraComb = new OracleCommandBuilder(this.OraDat);
    this.CloseConnection();// close the connection after filling
    return myDataTable;
}
if there's someone who knows the matter, please reply this topic
i'll be waiting for the answer.






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Bind Data in DataGrid akumarp2p C# 2005 2 December 30th, 2006 12:11 PM
Bind Tree View to MS Access table using VB bonekrusher ASP.NET 2.0 Basics 1 December 22nd, 2006 12:42 PM
Help to bind grid view msbsam ASP.NET 2.0 Professional 1 December 19th, 2006 06:55 AM
Datagrid Bind Problem param99 ASP.NET 1.0 and 1.1 Professional 1 November 23rd, 2006 12:34 PM
Bind image to the datagrid learner_7983 ADO.NET 3 November 1st, 2004 02:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.