If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > How to get LONG type object from Oracle to ASP?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-18-03, 04:26
toudi toudi is offline
Registered User
 
Join Date: Apr 2003
Posts: 2
Question How to get LONG type object from Oracle to ASP?

Hi all,

I've got a problem with retrieving objects from Oracle table from LONG type column. Inside I have only text but a long one ex. 10 000 characters.
Problem is that recordset takes only first 100 characters from this field!
I've tried to use getChunk but unfortunately it didn't help.
I think that the problem is somewhere in Recordset because when I'm trying to get size of this field I always receive 100 :-(

below is fragment of my code:

<%
set conn = server.createobject("adodb.connection")
Conn.Open Application("ConnectStr")

Set rs = Server.CreateObject("adodb.recordset")
sql = "SELECT ID, name, description " &_
"from MyTable where ID=1"

rs.Open sql, conn, 3, 3

size=rs.Fields("description").ActualSize
desc=rs.Fields("description").GetChunk(size)
%>
<br><%=desc%>



Could someone help me, please?
I would be very grateful!

Toudi.
Reply With Quote
  #2 (permalink)  
Old 04-18-03, 07:01
toudi toudi is offline
Registered User
 
Join Date: Apr 2003
Posts: 2
Re: How to get LONG type object from Oracle to ASP?

I FOUND AN ANSWER!!!

Problem was in amount of tables inside my SQL statement. When there were 4 tables, alter join and I was retrieving 10 fields, then Recordset could not handle this and description was cut to 100 chars. But when I performed simple select from one table it worked OK.

So my advise is not to use to complicated SQL statement when fields can be big. In such a case you can use two queries. It will be slower but at least it will work!

Or maybe someone has different solution?

toudi.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On