MySQL Forums
Forum List  »  Chinese

Read longText field by ASP.怎么用ASP读longText字段
Posted by: wu shichang
Date: April 22, 2008 01:16AM

ASP+MySQL

table(表):userInfo(uID,uName,uPassword,uIntro)
"uIntro" is a "longText" field.

When I try to read it's value,it is ""(No value)
My code:(我的ASP代码)
---------------------------------
set mcn = server.createobject("adodb.connection")
mcn.CursorLocation=3
mcnStr="Driver={mysql odbc 5.1 driver};DefaultDir=;database=myDB;server=127.0.0.1;port=3306;uid=root;password=123;option=3;stmt=set names 'utf-8';"
mcn.open mcnStr
---------------------------------
用如下语句读不到数据:

set rs=mcn.execute("select * from userInfo")
if rs.eof=false then response.write rs("uIntro")
........Output nothing
=================================
This SQL is OK:(用下面的语句却可以读到数据)

set rs=mcn.execute("select left(uIntro,1024) as t from userInfo")
if rs.eof=false then response.write rs("t")
........Output "test test test...."(1024 Char)
=================================

how to get the whole value of the field??

Options: ReplyQuote


Subject
Views
Written By
Posted
Read longText field by ASP.怎么用ASP读longText字段
10428
April 22, 2008 01:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.