473,545 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

strange ASP code behaviour

cmt
Greetings

I have a web page with an ASP script in it that is not displaying all
the data from the SQL Server DB correctly in a form.

I have one line in the code, that is doing some strange things.

You can see the code below. The line in question is:

WTacctTotal = objRs("WTacctTo tal")

If I move it to the front of the list, it displays the DB info fine
for that line, but for some reason, These lines are missing in the
form:

WTenteredBy = objRS("WTentere dBy")
WTenteredDate = objRS("WTentere dDate")
WTmodifiedBy = objRS("WTmodifi edBy")
WTmodifiedDate = objRS("WTmodifi edDate")

If move it to the end of the list, the above lines display, but then
WTacctTotal doesn't display.

strQry = "select * from worktask where WTid = '" & WTid & "'"
objRS.Open strQry,GetMSSQL Conn()
'Response.Write strQry & "<br>"
WTacctTotal = objRs("WTacctTo tal") 'strange line
WTlinkItemID = objRS("WTlinkIt emID")
WTtaskTypeID = objRS("WTtaskTy peID")
WTworkEventType ID = objRS("WTworkEv entTypeID")
WTstatusID = objRS("WTstatus ID")
WTcompleteByDat e = objRS("WTcomple teByDate")
WTbillableAmoun t = objRS("WTbillab leAmount")
WTbudgetAmount = objRS("WTbudget Amount")
WTbudgetDate = objRS("WTbudget Date")
WTenteredBy = objRS("WTentere dBy")
WTenteredDate = objRS("WTentere dDate")
WTmodifiedBy = objRS("WTmodifi edBy")
WTmodifiedDate = objRS("WTmodifi edDate")
WToriginalBudge tAmount = objRS("WTorigin alBudgetAmount" )
WTreductionReas on = objRs("WTreduct ionReason")
WTfreetimeReaso n = objRs("WTfreeti meReason")
WTextended = objRs("WTextend ed")
WTmustGo = objRs("WTmustGo ").Value
WTweather = objRs("WTweathe r").Value
WTwaiting = objRs("WTwaitin g").Value

objRS.Close
I am displaying the data in a form like this:

<input type='text' size='20' class='controls ' name='WTacctTot al'
value='<%=WTacc tTotal%>'>

As you can see, I am doing nothing crazy. Just pulling info from a DB,
assigning variables, then writing out in a form.

I can take the SQL query above, and run it in SQL Query Analyzer, and
verify that the data is there. And it is obviously there, because the
data displays correctly in the form if I move that one line to the
top. But then of course that prevents other lines from being
displayed.

I can't figure out what's going on here!

Mar 9 '07 #1
2 1380
cmt wrote:
Greetings

I have a web page with an ASP script in it that is not displaying all
the data from the SQL Server DB correctly in a form.

I have one line in the code, that is doing some strange things.

You can see the code below. The line in question is:

WTacctTotal = objRs("WTacctTo tal")

If I move it to the front of the list, it displays the DB info fine
for that line, but for some reason, These lines are missing in the
form:
It's an old ODBC bug, so you should start by following this advice:
http://www.aspfaq.com/show.asp?id=2126

And then read this:
http://www.aspfaq.com/show.asp?id=2096

And this:
http://databases.aspfaq.com/database...y-columns.html

--
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 9 '07 #2
cmt
On Mar 9, 8:28 am, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
cmt wrote:
Greetings
I have a web page with an ASP script in it that is not displaying all
the data from the SQL Server DB correctly in a form.
I have one line in the code, that is doing some strange things.
You can see the code below. The line in question is:
WTacctTotal = objRs("WTacctTo tal")
If I move it to the front of the list, it displays the DB info fine
for that line, but for some reason, These lines are missing in the
form:

It's an old ODBC bug, so you should start by following this advice:http://www.aspfaq.com/show.asp?id=2126

And then read this:http://www.aspfaq.com/show.asp?id=2096

And this:http://databases.aspfaq.com/database...-memo-text-hyp...

--
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.
OMG...that was it. Instead of using SELECT *, I named all the columns
individually and put the offending column WTacctTotal at the end. It
worked! -THANKS!
Mar 9 '07 #3

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

Similar topics

2
1950
by: Paul Drummond | last post by:
Hi all, I am developing software for Linux Redhat9 and I have noticed some very strange behaviour when throwing exceptions within a shared library. All our exceptions are derived from std::exception. We have a base class which all processes derive from which is always instantiated in main surrounded by a try/catch(std::exception) which...
3
4861
by: Sebastian C. | last post by:
Hello everybody Since I upgraded my Office XP Professional to SP3 I got strange behaviour. Pieces of code which works for 3 years now are suddenly stop to work properly. I have Office XP Developer (SP3 for Office, SP1 for developer, JET40SP8) on Windows XP Home Edition (SP1). The same behaviour occurs on Windows 98 too.
6
2922
by: Edd Dawson | last post by:
Hi. I have a strange problem involving the passing of command line arguments to a C program I'm writing. I tried posting this in comp.programming yesterday but someone kindly suggested that I'd have better luck here. So here goes! My program ignores any command line arguments, or at least it's supposed to. However, when I pass any command...
31
2593
by: DeltaOne | last post by:
#include<stdio.h> typedef struct test{ int i; int j; }test; main(){ test var; var.i=10; var.j=20;
4
1448
by: ignw82 | last post by:
Hi all, I have a strange behaviour in dataview, maybe you can help me. the behaviour is like this : First I made a datatable (odt) in data set, and then I created a dataview using this datatable. I added a row to data table by using (let say the dataview created is odv) odv.table.rows.add(odr). When i saw in first datatable (odt), there...
0
1410
by: theintrepidfox | last post by:
Dear Group I came accross a very annoying behaviour of Visual Studio, giving me six hours of headache till I found the solution. This post is mainly for fellow developers for reference as it took me ages reading through tons of posts till I found an answer. However, I'm also interested why Visual Studio behaves that way. If anyone has a...
10
1182
by: tborn | last post by:
Hi there, Not sure if any one has experienced this before and can tell me what's wrong with this statement: if verified = false then dataObjects.HasError = true This is all on one line and verified is defined as a boolean variable. Irrespective if verified is set to true or false in ALWAYS executes
5
3101
by: Ian | last post by:
Hi everyone, I have found some bizarre (to me...!) behaviour of the Form_Activate function. I have a form which has a button control used to close the form and a subform with a datasheet view showing a list of jobs from the database. When the main form loses focus and the user clicks the 'Close' button, I kept receiving error 2585 (This...
8
5278
by: Dox33 | last post by:
I ran into a very strange behaviour of raw_input(). I hope somebody can tell me how to fix this. (Or is this a problem in the python source?) I will explain the problem by using 3 examples. (Sorry, long email) The first two examples are behaving normal, the thirth is strange....... I wrote the following flabbergasting code:...
20
2206
by: Pilcrow | last post by:
This behavior seems very strange to me, but I imagine that someone will be able to 'explain' it in terms of the famous C standard. -------------------- code ----------------------------------- #include <stdio.h> int main (void) { char xx="abcd"; char * p1 = xx;
0
7478
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...
0
7668
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7437
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...
0
7773
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...
0
5984
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...
1
5343
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...
0
4960
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...
1
1901
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

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.