Thanks much  to Daniel who replied to me directly and scolded me for using
*...and recommended I specify the needed fields...since some apps might have
heart failure if there's changed named or too much junk being called (my
terms, not his technical ones).

Anyway...once I specified the patientid along with name, species in the
SELECT statement, that was enough to kick the query in the pants and get me
what I needed! 

Thanks!

Dian ~
View Hurricane Humane Updates:  http://www.mousetrax.com/pets.html


-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Dian D. Chapman
Sent: Monday, October 03, 2005 4:30 PM
To: Group - ASP
Subject: [ASP] Why RS doesn't find ID field in query?

Hi...appreciate any help figuring this one out. It was working before, but
now the client moved the SQL data to an Access DB (don't ask!<sigh>) and the
IDs have become TEXT versus Numbers. So I've had to update some LONGs to
STRINGS as well as adding quotes around the IDs.

But an error has cropped up that isn't making sense to me. I guess I'm
missing something. Any help seeing what I'm missing would be appreciated.

Here's the query string:

gstrSQLQuery = _
  "SELECT * FROM csdbo_OWNER INNER JOIN " _
     & "csdbo_PATIENT ON csdbo_OWNER.patientid = csdbo_PATIENT.patientid " _
     & "WHERE csdbo_OWNER.clientid = " & Chr(39) & gstrClientID & Chr(39) _
     & " ORDER BY csdbo_PATIENT.speciesid, csdbo_PATIENT.name DESC"

With that, I get an error while attempting to add the array to the ListBox
in this line...

     frmPets.lstPets.List(0, 0) = gobjRS.Fields("patientid")

The error tells me that it can't find the "patientid" info in the RS. 

Yet it has no trouble showing me the next two lines...which are from the
same patient table...

     'col 2 = pet name
     frmPets.lstPets.List(0, 1) = gobjRS.Fields("name")
     'col 3 = birthdate
     frmPets.lstPets.List(0, 2) = gobjRS.Fields("speciesid")

If I comment out that problem line, it displays the dlg with the animals
name and species, but, of course, not their ID. 

Anyone know why the 'patientid' isn't available in the RS?

TIA...
Dian ~

View Hurricane Humane Updates:  http://www.mousetrax.com/pets.html

-- 
This email scanned and certified clean by AVG!
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 9/30/2005
 




---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links



 



-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 9/30/2005
 

-- 
This email scanned and certified clean by AVG!
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 9/30/2005
 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to