Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Returning Long Datatype from Oracle database in .Net
Hi all
I am trying to return a field which is of long datatype from an Oracle 9i
database. I am accessing the database with ODP.NET, but the only thing being
returned is an empty string.
Here is an example of the code I am using:
string strSQL = "SELECT <Long field> from <Table>"; OracleConnection strConnection = new OracleConnection(
"Data Source=<datasource>;" +
"User Id=<user>;" +
"Password=<password>;");
strConnection.Open();
DataSet objDataSet = new DataSet();
OracleDataAdapter objDataAdapter = new OracleDataAdapter(strSQL,
strConnection); objDataAdapter.Fill(objDataSet, "Table"); DataView
objDataView = new DataView(objDataSet.Tables["Table"]);
dgUsers.DataSource = objDataView;
dgUsers.DataBind();
strConnection.Close();
Any help with this would be appreciated
Thanks
Katie
Received on Thu Mar 11 2004 - 11:05:53 CST