|
-
Dec 7th, 2001, 05:59 PM
#1
Thread Starter
Frenzied Member
not displaying data out of recordset
not sure if this is an asp problem, database problem, or a looking at the screen to long on a friday problem but here goes.
My company has two sites that are exactly the same except for one gets its data from an access database and the other gets its info from a sql server 7 database. the access one works fine. the one hooked to the sql server is only showing part of its data.
first i select one record from the database and then run through a list of this:
Code:
<% tempvar = rs_main("overview")
if len(tempvar)>1 then %>
<%=tempvar%><BR><BR>
<% end if %>
<% tempvar = rs_main("service")
if len(tempvar)>1 then %>
<B>Service</B><BR>
<%=tempvar%><BR><BR>
<% end if %>
but for some reason overview will show and service will not. (on the site getting from access it has the same data and works fine so i dont think it is the data). In the access db the fields are type memo and in the server they are type ntext.
Has this happened to anyone before, anyone have any ideas?
Thanks in advance,
Michael
-
Dec 7th, 2001, 07:22 PM
#2
Frenzied Member
here is the solution (your luck you get it solved soon, took me 2 weeks to figure it out)
sql server doesnt properly return the text when your using "TEXT" and "NTEXT" fields
so what you have to do is
make that field the LAST in yoru sql statement
so if you did "SELECT * FROM MYTABLE"
that wont work properly
you have to say
"SELECT overview, service FROM...."
notice that the NTEXT FIELD MUST always be the last selected..
this will fix your problemo
-
Dec 10th, 2001, 11:27 AM
#3
Black Cat
Maybe you could use CAST or CONVERT to change the data to varchar in the SQL query:
Code:
SELECT CAST(NumericData AS varchar) FROM Table1
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Dec 10th, 2001, 11:30 AM
#4
Thread Starter
Frenzied Member
Originally posted by JoshT
Maybe you could use CAST or CONVERT to change the data to varchar in the SQL query:
Code:
SELECT CAST(NumericData AS varchar) FROM Table1
But varchar can only hold 8,000 charicters correct? It is possible that some of the fields will have more than that.
Thanks,
Michael
-
Dec 10th, 2001, 11:44 AM
#5
Black Cat
Then I think you need to read the data from those fields as a BLOB or a stream, in chunks at a time...
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Dec 10th, 2001, 11:52 AM
#6
Thread Starter
Frenzied Member
Originally posted by JoshT
Then I think you need to read the data from those fields as a BLOB or a stream, in chunks at a time...
Could you elaborate a little more on that 
Michael
-
Dec 10th, 2001, 01:26 PM
#7
Black Cat
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Dec 10th, 2001, 02:05 PM
#8
Thread Starter
Frenzied Member
I tried:
Code:
tempvar = rs_main("service").GetChunk(5)
and received:
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
thanks,
MIchael
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|