Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 05: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, 08: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

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