473,287 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Why will the Note field display when called by itself, but NOT display if another fie

This one is completely baffling.

DB Enviornment: MSSQL database
Code Environment: ASP / VBscript (obviously)

Problem: data from an nText field disappears from conn.execute(sql) recordset. The sql statement is a monster, I'll give you a taste down below.

Code Set 1 : always displays fine
do while not rsdata.eof
response.write rsdata("NoteField")
rsdata.movenext
loop

Code set 2: does NOT always display NoteField correctly.
do while not rsdata.eof
response.write rsdata("ID")
response.write rsdata("NoteField")
rsdata.movenext
loop

Here are the different ways I have created the recordset

Does Not display correctly
-------------------------------------------
set rsdata = conn.execute(sql)
rsdata.open sql, conn

Does display correctly
------------------------------
rsdata.open sql, conn, 3,3

The only way I can get the ID and the NoteField to display correctly is if I open the recordset keystatic, pessimistic.

You are saying to yourself, this guy just solved his own problem.....here's the wrinkle. While the sql is a monster, I have to run it thru a STORED PROCEDURE ( which handles recordset paging ). The sql alone works with the sql, conn, 3,3..... but the stored procedure call will only display the note in codeset 1, not codeset 2.

The $65,000 is:

Why will the Note field display when called by itself, but NOT display if another field is called just before or after it?
Aug 23 '07 #1
1 1433
jhardman
3,406 Expert 2GB
The problem has to be in the stored procedure, I am guessing it "intuitively" alters the query which is why it sometimes doesn't have all the data. When you ask for the notefield does it come up empty, or is it throwing an error? (of course if you have an error handler in place it might look empty even though it is really generating an error) One way to check is to display all the recordset fields like this:
Expand|Select|Wrap|Line Numbers
  1. for each x in rs.fields
  2.    response.write x.name & ": " & x.value
  3. next
Let me know if this helps.

Jared
Aug 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: endus | last post by:
I'm having some trouble getting something to work. I'm not even sure whether or not this is possible, but it *seems* like it should be. I've done a fair amount of experimenting and googling...but...
15
by: M Smith | last post by:
I have a form I want to submit to itself. I want to be able to type in a list of numbers and submit the form and have that list show up on the same form under the text box I typed them into and...
8
by: Calan | last post by:
I have a server-side ASP script that dynamically creates an input form from a database table. The table contains a field name, the table where values are stored, type of input control, value for a...
7
by: Marco Simone | last post by:
Hi, What is your opinion about using Lookup field in table. I would like to use lookup field in table 1, so that I can choose data in combo box from table 2. Is this good design of database? ...
30
by: Shannan Casteel via AccessMonster.com | last post by:
I have a subform named "sbfrmParts" with a list of parts along with the quantity and price. I have used a text box in the subform's footer and set the control source to "=Sum(*)". I set the...
2
by: Eric Newton | last post by:
VB's more declarative nature of handling events is golden. I'm hoping C# will acquire this type of deal, in addition to the anonymous delegates. could do same as vb (actually would be easier to...
5
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp The Joy of Interoperability Sometimes a revolution in programming forces you to abandon all...
3
by: jim.murphy | last post by:
I am not sure If I can do this with a lookup, but what I would like to do is perhaps use lookup to retrieve a control date from an unassociated table to control what date is entered in another...
11
by: Paul H | last post by:
Suppose I have a table called tblPeople and I want a field to illustrate whether each person prefers cats or dogs. I could do it one of three ways. 1. A plain text field Create a text field in...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.