Ask a Question related to ASP Database, Design and Development.
-
Wilton Yuan #1
Sometime only one data can retrieved
Hi,
I developed web application with ASP, it was running well before we changed
to use new server. After we started using new server since last year, we
always have this problem that we only can retrieve one data from
database(SQL Server 7).
For example:
The data is suppose to be showm as when I use "Select * from table1":
AAA
BBB
CCC
DDD
EEE
FFF
However, the ASP page only shows AAA which alway is the first row of search
result. If we click refresh button on Internet Explorer, most time all data
will be shown.
Does anyone know what the problem? Is it from ASP coding or Server setting
or IIS or someting else?
Thanks in advance,
Wilton
Wilton Yuan Guest
-
How to the get to number of retrieved columns?
Hello everyone, i just implement an own search site in MS CRM 1.2, which searches in a MS-SQL database. My question is, how to get the number... -
How to get the number of retrieved columns when doing a SQL Query
Hello everyone, i just implement an own search site in MS CRM 1.2, which searches in a MS-SQL database. My question is, how to get the number... -
Cookies not being retrieved from hard drive
Hi, Using Training from the source book - Dreamweaver MX dynamic sites.......but software is actually Studio MX 2004, running on Windows 2000... -
How do I change data retrieved from db before sending it out to client
I'm new to dotnet. This might not be the right place to post my question, if so, accept my apoligies and please redirect me to the correct group. ... -
nothing retrieved from ntext data type?
Possibly this? http://support.microsoft.com/?kbid=200124 If not that, what code? Ray at work "s" <anonymous@discussions.microsoft.com>... -
John #2
Re: Sometime only one data can retrieved
Please show us your code to retrieve the data
John Guest
-
Wilton Yuan #3
Re: Sometime only one data can retrieved
Hi John,
Here is the sample coding.
<%
On Error Resume Next
'Connect the Database
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "DSN=NorthwindDSN;UID=sa;PWD=;database=northwi nd"
'SQL Command
SQL="Select CategoryName, CategoryID from Categories "
'run SQL Command
Set RS=Conn.Execute(SQL)
'Appear result
Response.write "<table Align=center border=1 cellpadding=0 cellspacing=0
width=700>"
Response.write "<tr >"
Response.write "<td colspan=2><B>" & Ucase(rs(0).Name) & "</B></td>"
Response.write "<td colspan=2><B>" & Ucase(rs(1).Name) & "</B></td>"
Response.write "</tr>"
While Not rs.EOF
Response.write "<tr>"
Response.write "<td colspan=2><b>" & rs(0).Value &"</B></td>"
Response.write "<td colspan=2><b>" & rs(1).Value &"</B></td>"
rs.MoveNext
Response.write "</tr>"
Wend
Response.write "</table>"
Set Conn = nothing
%>
The result is supposed to be:
Beverages 1
Condiments 2
Confections 3
Dairy Products 4
Grains/Cereals 5
Meat/Poultry 6
Produce 7
Seafood 8
However, sometime it only shows:
Beverages 1
After I click refresh button, sometime it will show all result, but sometime
it still show the first record. It seems Rs.Movenext does not work.
Thanks,
WIlton Yuan
Wilton Yuan Guest
-
Aaron [SQL Server MVP] #4
Re: Sometime only one data can retrieved
One idea is to stop using a DSN and make sure MDAC is up to date.
[url]http://www.aspfaq.com/2126[/url]
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
"Wilton Yuan" <wdyuan@telus.net> wrote in message
news:e7AW9g0cEHA.2520@TK2MSFTNGP12.phx.gbl...sometime> Hi John,
>
> Here is the sample coding.
>
>
> <%
> On Error Resume Next
>
>
> 'Connect the Database
> Set Conn=Server.CreateObject("ADODB.Connection")
> Conn.Open "DSN=NorthwindDSN;UID=sa;PWD=;database=northwi nd"
>
> 'SQL Command
> SQL="Select CategoryName, CategoryID from Categories "
> 'run SQL Command
> Set RS=Conn.Execute(SQL)
>
> 'Appear result
>
> Response.write "<table Align=center border=1 cellpadding=0 cellspacing=0
> width=700>"
> Response.write "<tr >"
> Response.write "<td colspan=2><B>" & Ucase(rs(0).Name) & "</B></td>"
> Response.write "<td colspan=2><B>" & Ucase(rs(1).Name) & "</B></td>"
>
> Response.write "</tr>"
>
>
> While Not rs.EOF
> Response.write "<tr>"
>
> Response.write "<td colspan=2><b>" & rs(0).Value &"</B></td>"
> Response.write "<td colspan=2><b>" & rs(1).Value &"</B></td>"
> rs.MoveNext
> Response.write "</tr>"
> Wend
> Response.write "</table>"
>
>
> Set Conn = nothing
> %>
>
> The result is supposed to be:
> Beverages 1
> Condiments 2
> Confections 3
> Dairy Products 4
> Grains/Cereals 5
> Meat/Poultry 6
> Produce 7
> Seafood 8
>
> However, sometime it only shows:
>
> Beverages 1
>
> After I click refresh button, sometime it will show all result, but> it still show the first record. It seems Rs.Movenext does not work.
>
> Thanks,
>
> WIlton Yuan
>
>
>
Aaron [SQL Server MVP] Guest



Reply With Quote

