|
 |
asp_databases thread: Primary Key
Message #1 by "Matthew Lohr" <mlohr@t...> on Fri, 28 Apr 2000 10:13:01 -0400
|
|
I am trying to use the primary key in a table to reference the other
information. Everytime I do this it tells me it cannot find the ordianl
reference. I know this is usually a speeling error but the name of this
field is "id". I may be dumb but I can spell that. Is there something
barring you from using the primary key for this purpose. I am creating a
select list and using the primary key as the value n the option and trying
to display the rest of that record in the display.
ADODB.Fields error '800a0cc1' ADO could not find the object in the
collection corresponding to the name or ordinal reference requested by the
application. /update.asp, line 35
Message #2 by "Matthew Lohr" <mlohr@t...> on Fri, 28 Apr 2000 11:02:28 -0400
|
|
ok sorry my stupidity I did not include it in the select statement
-----Original Message-----
From: Matthew Lohr
Sent: Friday, April 28, 2000 10:13 AM
To: ASP Databases
Subject: [asp_databases] Primary Key
I am trying to use the primary key in a table to reference the other
information. Everytime I do this it tells me it cannot find the ordianl
reference. I know this is usually a speeling error but the name of this
field is "id". I may be dumb but I can spell that. Is there something
barring you from using the primary key for this purpose. I am creating a
select list and using the primary key as the value n the option and trying
to display the rest of that record in the display.
ADODB.Fields error '800a0cc1' ADO could not find the object in the
collection corresponding to the name or ordinal reference requested by the
application. /update.asp, line 35
---
You are currently subscribed to asp_databases
Message #3 by Kevin D Riggs <kevin.riggs@p...> on Fri, 28 Apr 2000 11:28:15 -0400
|
|
Can you give an example of your code? I use that trick all the time as
shown below:
>>>>>>>>>>>Code Example>>>>>>>>>>>>>
cmdTable.CommandText = "SELECT * FROM whateverTableIChoose WHERE
criteria='" & varCriteria & "' ORDER BY fieldname"
Set rsTable = cmdTable.Execute
Response.Write "<form method=""fill in with what ever you need""
action=""ibid"">" & vbCrLf
Response.Write "<table border='0' cellpad='0' cellspacing='0'>" & vbCrLf
Response.Write "<tr>" & vbCrLf
Response.Write "<td><select name=""test_selection"" size=""1"">" & vbCrLf
While Not rs.EOF
Response.Write "<option value='" & rs("id") & "'>" & rs("firstname") & " "
& rs("lastname") & "</option>" & vbCrLF
rs.MoveNext
Wend
Response.Write "</select></td>" & vbCrLf
Response.Write "<td> . . . .
>>>>>>>>>>>End Example>>>>>>>>>>>>>
Are you trying to set the rs("id") somewhere?
KD
Kevin D Riggs
kevin.riggs@p...
Senior Network Administrator & Webmaster
Rhea County
Board of Education
http://www.rhea.k12.tn.us/
http://www.rheacounty.org/
|
|
 |