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 > Database Server Software > Informix > Problem displaying text datatype from ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-07-03, 09:28
forte forte is offline
Registered User
 
Join Date: Apr 2003
Posts: 9
Problem displaying text datatype from ASP

Hello gurus, i salute you!

Having a HUGE problem displaying text data type with Informix:

Some specs:
- Informix 9
- CLI Informix 3.30
- IIS .net

CODE: test.asp
CONN_STRING = "DSN=workdsn;"
Set Conn_Informix = Server.CreateObject("ADODB.Connection")
Conn_Informix.Open CONN_STRING

qwe1="select desc from texttabel"

Set rs1 = Server.CreateObject("ADODB.Recordset")
set rs1=Conn_Informix.Execute(qwe1)

while not rs1.eof
label = rs1.FIELDS("desc").value
response.write label & "OK"
rs1.movenext
wend

RESULT:
EMPTY page with a bunc of OKs

Q:
- how do i get the data displayed? Heard of the texttoclob thingy but how do i use it?
- Is this a CLI problem?
- am able to display the result from dbaccess .....
- tried the same query with SQL server with same data types. No problems!

PLEASE HELP!

Last edited by forte : 04-07-03 at 09:30.
Reply With Quote
  #2 (permalink)  
Old 04-08-03, 14:23
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
Can we have the Informix table layout of texttable?

dbschema -t texttable -d database
__________________
rws
Reply With Quote
  #3 (permalink)  
Old 04-09-03, 00:26
forte forte is offline
Registered User
 
Join Date: Apr 2003
Posts: 9
thanks,
chartest char(100)
desc text

dbschema thingy:
{ TABLE "workdb".texttabel row size=156 number of colomns=2 index size =0}

create table "workdb".texttabel
(
chartest char(100),
desc text
);
revoke all on "workdb".texttabel from "public";

sorry about the texttabel typo error ... this was a test table....

thanks for the response, roelwe, have to admit were a bit worried when there were no responses. I'm have to opt for a char(30000) at the moment which is ridiculous and unhealthy.
Reply With Quote
  #4 (permalink)  
Old 04-09-03, 05:50
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
Hi, first of all.

If you want to work with .net, you really nead the latest CSDK, 2.81.

You can download it for free at http://www.ibm.com/informix
What is the exact version of your Infromix server? 9.3, 9.4 ?

I found this in the OLEDB programming manual:
A server-side scrollable cursor (corresponding ADO flags: adOpen-
Dynamic, adOpenStatic, adOpenKeyset) cannot be opened if results
include simple large objects (BYTE and TEXT) or collections. You can
use server-side nonscrollable cursors (adOpenForwardOnly) or
client-side scrollable cursors (adUseClient) with these types.

Maye it might be interesting to test it with CLOB (smart blobs. You will have to define a smart blobspace for that. (onspaces)

Let's see what that gives us!
__________________
rws
Reply With Quote
  #5 (permalink)  
Old 04-09-03, 06:55
forte forte is offline
Registered User
 
Join Date: Apr 2003
Posts: 9
thanks for the prompt reply!

hmmm, thanks for taking some time going through the manuals and I'll certainly try adOpenForwardOnly etc.

I have to tell you that i'm more of a web developer and less on the DB admin thingies, so I passed your recommendations to my collegues who are DB admins.

I'll certainly update you on any findings
Reply With Quote
  #6 (permalink)  
Old 04-09-03, 07:20
forte forte is offline
Registered User
 
Join Date: Apr 2003
Posts: 9
EUREKA!! U're sooo kewl! Thanks for posting out the adUseClient note because that's the solution.

Here's the full code for reference:
CONN_STRING = "DSN=workdsn;"
Set Conn_Informix = Server.CreateObject("ADODB.Connection")
Conn_Informix.Open CONN_STRING

qwe1="select desc from texttabel"

Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.CursorLocation = 3 'JUST NEED THIS!!!
rs1.open qwe1,conn_informix

'set rs1=Conn_Informix.Execute(qwe1)

while not rs1.eof
label = rs1.FIELDS("desc").value
response.write label
rs1.movenext
wend

I wish the support that i get from the paid ones is like this. Informix put the blame on microsoft, and microsoft blames informix. In the end, a huge egg on the forehead. Thanks again sir!
Reply With Quote
  #7 (permalink)  
Old 04-09-03, 07:28
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
Great news.

About the support issue...

I could look into that if you give me a case number. Beleive it or not, but we do want to give our customers good support!
__________________
rws
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On