Hi All;
I am trying to print an column the type LONG from my database Oracle 9i
example:
objPage.AddTextArea(rs("Column_type_LONG"), 0, Linea, 504, 10, Left, Arial, 8)
Thist column rs("Column_type_LONG") not display data, but, the response.binarywrite(rs("Column_type_LONG")) is display OK.
Can an column the type LONG be print from a database?
Thanks, Marco
Display column type LONG of Oracle
Re: Display column type LONG of Oracle
Support · Apr 3, 2007Hello Marco,
Any LONG data coming out of the database needs to be accessed using the GetChunk method. So in other words the code should look something like this:
objPage.AddTextArea(rs("Column_type_LONG").GetChunk(size), 0, 0, 504, 10, Left, Arial, 8)
The number you pass to the GetChunk() method is the number of bytes allowed. So, please make sure that the value in bytes you are passing to the GetChunk() method is equal to or greater than the size of the text in bytes.
Thanks,
ceTe Software Support Team
Re: Display column type LONG of Oracle
Forum member · Apr 3, 2007Hello
ceTe Software Support Team ;
objPage.AddTextArea(rs("Column_type_LONG").GetChunk(size), 0, 0, 504, 10, Left, Arial, 8)
I am programming in asp.NET and not support GetChunk in RecordSet,
some suggestion?
Thanks, Marco
Re: Display column type LONG of Oracle
Support · Apr 4, 2007Hello Marco,
Can you please let us know what Oracle class does the "rs" instance variable belong to?
Also does "rs" variable belong to ADO or ADO.NET?
Thanks,
ceTe Software Support Team
Re: Display column type LONG of Oracle
Forum member · Apr 4, 2007Hello;
Thanks to respond quickly, the "rs" (RecordSet) variable belong to ADO.NET.
Thanks againg, Marco
Re: Display column type LONG of Oracle
Support · Apr 4, 2007Hello Marco,
What driver are you using to connect to the oracle database?. Also in which namespace does the Recordset class belong to?
Thanks,
ceTe Software Support Team.
Re: Display column type LONG of Oracle
Forum member · Apr 4, 2007Hello;
I have instaled Client Oracle 8.x with support 7.x
<%@ import Namespace="System.Data.OleDb" %>
Dim connectionString As String = "Provider=MSDAORA.1;Password=pass;User ID=user;Data Source=DS"
Thanks again, Marco
Re: Display column type LONG of Oracle
Support · Apr 4, 2007Hello Marco,
We do not see the RecordSet class as part of the System.Data.OleDb namespace. Can you please let us know what DLL file (class library) are you referencing and also what version of the .NET Framework you are using?
Thanks,
ceTe Software Support Team
Re: Display column type LONG of Oracle
Forum member · Apr 4, 2007Hello All;
I have install version .NET 2.0 and DLL version 2.0.50727.42
part of code:
Dim connectionString As String = "Provider=MSDAORA.1;Password=pass;User ID=user;Data Source=DS"
Using ConexionJDE As New OleDb.OleDbConnection(connectionString)
Dim cnn As New OleDb.OleDbCommand(sql, ConexionJDE)
ConexionJDE.Open()
Dim rs As OleDb.OleDbDataReader = cnn.ExecuteReader()
Thanks, Marco
Re: Display column type LONG of Oracle
Support · Apr 4, 2007Hello Marco,
Can you try the following line of code and see if that solves the problem?
objPage.AddTextArea(rs("Column_type_LONG").ToString(), 0, 0, 504, 10, Left, Arial, 8)
Thanks,
ceTe Software Support Team
Re: Display column type LONG of Oracle
Forum member · Apr 4, 2007Hello;
I try the line of code and the problem is the same one, is not data display.
Thanks...
Re: Display column type LONG of Oracle
Support · Apr 4, 2007Hello,
Can you try casting the value coming from the database to string and see if that helps?
objPage.AddTextArea(CType(rs("Column_type_LONG"), String), 0, 0, 504, 10, Left, Arial, 8)
If the above does not help, can you check the Type of data that is being returned by rs("Column_type_LONG"). You can do this using the GetType() method.
Thanks,
ceTe Software Support Team