Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 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 13th, 2008, 05:58 AM
jomet
Guest
 
Posts: n/a
Default not showing column in datagridview

Hi,

my code

command.CommandText = "SELECT COLUMN_NAME, SEARCH_CONDITION " & _
"FROM(USER_TAB_COLUMNS) " & _
"WHERE TABLE_NAME ='" & tableName & "'" & _
"AND DATA_DEFAULT IS NOT NULL"
reader = command.ExecuteReader()
constraintsList.Load(reader)

constraintsList is datatable

it is not showing the SEARCH_CONDITION column when it is binded with
a datagrid
desc USER_TAB_COLUMNS shows that SEARCH_CONDITION is LONG column(Oracle db)
i searched google also

can i see long column in a datagrid using datatable

please help.
thanks:)

jomet.
---------------------------------------------
Once you start a working on something,
dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
 
Old March 13th, 2008, 06:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Sure you can... maybe you have no auto columns for the grid??

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old March 13th, 2008, 06:58 AM
jomet
Guest
 
Posts: n/a
Default

Quote:
quote:Originally posted by gbianchi
 Sure you can... maybe you have no auto columns for the grid??
Column is there
But no data in it

using debugger i found that DataTable itself is not populated
for that column only

i think this is the problem of LONG() datatype of Oracle

by googling similar problem is found at
http://www.experts-exchange.com/Prog..._21175989.html

thanks

jomet.
---------------------------------------------
Once you start a working on something,
dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
 
Old March 14th, 2008, 12:25 AM
jomet
Guest
 
Posts: n/a
Default

Anyy other way to dispaly LONG dataType in VB.NET

jomet.
---------------------------------------------
Once you start a working on something,
dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
 
Old March 14th, 2008, 03:53 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Something I didn't know till I looked it up, Oracle's LONG data type is not a numeric field - it is in fact a text field of variable length (a bigger version of oracles VARCHAR2, similar perhaps to SQL Server's text data type).

If you are using the Oracle ODP.Net drivers then I found the following link:

http://www.howtodothings.com/compute...pnet-in-c.html


/- Sam Judson : Wrox Technical Editor -/
 
Old March 14th, 2008, 04:18 AM
jomet
Guest
 
Posts: n/a
Default

Yes i am using Oracle ODP.Net drivers

command.InitialLONGFetchSize = 1000 solved my problem
many thanks for your help


jomet.
---------------------------------------------
Once you start a working on something,
dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
 
Old March 15th, 2008, 04:02 AM
jomet
Guest
 
Posts: n/a
Default

mY requirement is changed
now i have to use
  // .NET DataProvider from Microsoft
using System.Data.OracleClient;

another solution with reader.getBytes(.....)
gives me unhandled exceptions
code like:
cmd.commandText = " select rowid, long_raw_field from table1 "
               con.open()
               dataReader = cmd.ExecuteReader()
               dataReader.Read()
     dim DiskFile as string = "C:\temp.txt"
     dim byteData(2000) as byte
     dim numbytes as long
                numbytes = dataReader.GetBytes(1, 0, byteData, 0, 2000)
                Dim fstreamwriter As StreamWriter = File.AppendText(DiskFile)
                i = 0
                Do While i < numbytes
                    fstreamwriter.Write(System.Convert.Tochar(byteData (i)))
                    i += 1
                Loop
                fstreamwriter.Close()

jomet.
---------------------------------------------
Once you start a working on something,
dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.





Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGridView - allow column resize snufse .NET Framework 2.0 0 January 31st, 2008 10:33 AM
DataGridView column value snufse .NET Framework 2.0 3 January 30th, 2008 10:06 AM
Datagridview & combobox column p2pmarit .NET Framework 2.0 1 July 31st, 2006 02:31 AM
check Box column in DataGridView control tiyyob .NET Framework 2.0 0 June 24th, 2006 09:49 AM
Combobox Showing Wrong Column SerranoG Access 4 June 30th, 2005 07:23 AM





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