473,661 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VERY odd classic ASP problem on 2005 upgrade

I'm seeing a VERY odd issue after moving my data from a SQL2000 DB to
a SQL2005 DB. About half the time, when I request a value (using
ors.fields("pag edata") for instance), I get nothing returned. I know
there's data in the field, and I'm on the correct RS object.

Sometimes, when I move the call to another portion of the page, I get
the data (while on the same RS object). I need to move to a new server
running 2005, and folks are starting to chomp at me. Help! I've never
seen anything vaguely like this.

Thanks,

Elliott Roberts

Mar 27 '07 #1
3 1763
Elliott Roberts wrote:
I'm seeing a VERY odd issue after moving my data from a SQL2000 DB to
a SQL2005 DB. About half the time, when I request a value (using
ors.fields("pag edata") for instance), I get nothing returned. I know
there's data in the field, and I'm on the correct RS object.

Sometimes, when I move the call to another portion of the page, I get
the data (while on the same RS object). I need to move to a new server
running 2005, and folks are starting to chomp at me. Help! I've never
seen anything vaguely like this.
I don't know how you expect us to help you. Show us some code to allow us to
reproduce your problem.

As a guess, could it be this old ODBC bug?
http://www.aspfaq.com/show.asp?id=2188

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Mar 27 '07 #2
On Mar 27, 6:06 pm, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
I don't know how you expect us to help you. Show us some code to allow us to
reproduce your problem.

As a guess, could it be this old ODBC bug?http://www.aspfaq.com/show.asp?id=2188
Sorry for the lack of detail - I thought it might be a common
weirdness with an upgrade like this. Guess not. The code ran like a
Swiss watch against a 2000 server (and still does). It is very long,
and well, not all that well written. Sadly, I need this to work
against 2005 without re-coding the whole thing. Here's a sample that
contains relevant parts:

connectionstrin g = "Driver={SQ L Native
Client};Server= x.x.x.x;Databas e=distweb;Uid=x xx;Pwd=xxx;MARS _Connection=yes ;"
Set oC = Server.CreateOb ject("ADODB.Con nection")
oC.Open connectionstrin g
Set oRS = Server.CreateOb ject("ADODB.Rec ordset")
sqlStr = "SELECT * FROM pagedata WHERE pageid = " & int(pageid) & "
and pid = " & int(pid) & " AND folder = '" & application("va rfolder")
& "' order by rank, id"
set oRS = oC.execute(sqlS TR)

' If there are no paragraphs created, then display an under
construction notice
IF ors.EOF THEN
Response.Write( "<CENTER><B>Thi s section is not yet complete.</B></
CENTER><BR>")
ELSE
' Loop through the available paragraphs
DO WHILE not ORS.EOF

' If the pagedata is a header, print it...else, go to the paragraph
section
IF ors.fields("hea der") = true THEN
BuildHeader(ors .fields("pageda ta"))
ELSE
'Image
IF ors.fields("ima ge") <"" THEN
%>
<IMG SRC="/<%=ors.fields(" image")%>" ALIGN=<
%=ors.fields("i magealign")%>>

<img alt="" src="spacer.gif " height="0" align="left" width="1">
<%
END IF
'Check to see if this is a title
vt = ors.fields("tit le")
IF vt <"" THEN
%>
<B><%=vt%></B><BR>
<%
END IF
Response.write( ors.fields("pag edata") & "<BR><BR>")
if ors.fields("img cap") <"" then
%>
<div style="width:10 0%; text-align:<
%=ors.fields("i magealign")%>"> <table align="<%=ors.f ields("imageali gn")
%>"><tr><td align="left" style="font-size:7pt;"><%=o rs.fields("imgc ap")
%></td></tr></table></div>
<%
end if
END IF 'IF header

ors.MoveNext
loop
END IF

oRS.Close
set oRS = nothing
oC.close
Set oC = nothing

-----------------------------------------------------------------

Thanks for any help.

Elliott

Mar 28 '07 #3
Elliott Roberts wrote:
On Mar 27, 6:06 pm, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
>I don't know how you expect us to help you. Show us some code to
allow us to reproduce your problem.

As a guess, could it be this old ODBC
bug?http://www.aspfaq.com/show.asp?id=2188

Sorry for the lack of detail - I thought it might be a common
weirdness with an upgrade like this. Guess not. The code ran like a
Swiss watch against a 2000 server (and still does). It is very long,
and well, not all that well written. Sadly, I need this to work
against 2005 without re-coding the whole thing. Here's a sample that
contains relevant parts:

connectionstrin g = "Driver={SQ L Native
Client};Server= x.x.x.x;Databas e=distweb;Uid=x xx;Pwd=xxx;MARS _Connection=
yes;"

OK, so you are using ODBC. Your first step should be to switch to the
native OLE DB provider (from www.connectionstrings.com):
Provider=SQLNCL I;Server=myServ erAddress;Datab ase=myDataBase; Uid=myUserna
me;Pwd=myPasswo rd;

Set oC = Server.CreateOb ject("ADODB.Con nection")
oC.Open connectionstrin g
Set oRS = Server.CreateOb ject("ADODB.Rec ordset")
sqlStr = "SELECT * FROM pagedata WHERE pageid = " & int(pageid) & "
From the link I provided, you should see that it's a bad idea to use
selstar ... especially when you are planning to use only a few of the
columns from the table. do yourself (and whoever has to maintain this
code after you) a favor and replace the * with the list of columns you
are retrieving from the table ... even if you want all the columns that
are currently in the table. Who's to say that somebody isn't going to
come along at some point and add another column to the table?
<snip>
Without details such as column datatypes, I have to stick with my
original guess. Again, see http://www.aspfaq.com/show.asp?id=2188

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Mar 28 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

99
6075
by: Jim Hubbard | last post by:
It seems that Microsoft not only does not need the classic Visual Basic developer army (the largest army of developers the world has ever seen), but now they don't need ANY Windows developer at a small or mid-sized business. http://groups-beta.google.com/group/microsoft.public.msdn.general/browse_thread/thread/9d7e8f9a00c1c7da/459ca99eb0e7c328?q=%22Proposed+MSDN+subscription+changes%22&rnum=1#459ca99eb0e7c328 Damn! To be that...
30
2212
by: Cowboy \(Gregory A. Beamer\) | last post by:
There seems to be a lot of confusion on the versions of Visual Studio 2005. My latest blog entry covers the different versions: Main URL: http://spaces.msn.com/members/gregorybeamer/Blog/cns!1ptsyfBgfiUmsaQCul95SOyg!141.entry If the above URL wraps and you want a shorter URL for the entry: http://tinyurl.com/9yxbs --
5
512
by: Mike Owen | last post by:
Hi, I have just used the import Wizard to import a VS 2003 app to VS 2005. I have a lot of work to do to enable it to compile successfully with all the errors and warnings it gave me, but as a starting point the compiler can no longer find the function as at the bottom of this posting, that was in the Global.asax.vb file. All the function does is give an easy / quick way of getting the application
2
1466
by: xxdanbrowne | last post by:
Hi, Is there any way to transfer Classic ASP session state to ASP.NET Session without resorting to a kludge? i.e. have they included it as an option in session so's you can more easily upgrade a Classic ASP app without having to rewrite the whole app?
5
2942
by: Velvet | last post by:
Can someone tell me to what process I need to attach to be able to step through my classic ASP code in VS.net 2003. I'm working on an XP box with IIS installed. I also have VS.net 2005 (The final, never installed beta) installed on this box if it makes a difference (I did not install VS Development Web Server as I'm already using the XP web server). I've seen that I need to attach to the native IIS engine, but I don't know what it's...
2
1258
by: Scott R | last post by:
I have purchased the VS 2005 professional upgrade. I would like to remove VS 2003 prior to installation. If I uninstall VS 2003, how does VS 2005 know I qualify for the upgrade pricing?
2
6302
by: Oonz | last post by:
Hi Friends, Is there any tool or assistant to upgrade SQL 2000 to SQL 2005. Thanks, Arunkumar
4
3724
by: PW | last post by:
Has anyone used the traditional Classic ASP / Access DB / IIS configuration on Vista yet? I haven't, but before I upgrade to Vista I would like to ensure all my websites will work once I do. What version of Vista is best to use (and includes IIS) ? What problems did you have with database connectivity ?
3
4140
by: Mark D Powell | last post by:
I attempted to upgrade my SQL Server 2000 Enterprise Edition (32 bit) to SQL Severer 2005 EE 32 bit and while the prereqs passed the installer will not let me select the version 8.00.x (2000 SP4) database that it finds on the server. When I ckeck the install details it tells me that "Your upgrade is blocked becuase of cluster upgrade rules" I have tried searching the MS site but none of the entries I found appear to apply.
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8545
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7364
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.