ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 24th, 2003, 07:54 AM
Buraque Buraque is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Shimonoseki / JAPAN
Posts: 58 Buraque User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 4 sec
Reputation Power: 11
I cannot use variable to call a member of recordset. Plz look

Lets say I have created a Recordset named MySET.
And I have a value passed from a form: Request.Form.Key(1)

--------------------------------
Response.Write MySET("member") --> Prints George to screen

Response.Write Request.Form.Key(1) --> Prints member to screen

Val = Request.Form.Key(1)
Response.Write Val ---> Prints member to screen

And Finally
Response.Write Myset(Val) ---> Returns This error:
ADO Could not find the object in the collection corresponding to the name or ordinal reference requested by the collection.

Now we are sure that value of the Val is "member" Why is this not working?
I am going to go mad!!! Please help!
__________________
Sweet smell of a great sorrow lies over the land. Plumes of smoke rise, merge into the leaden sky. A man lies and dreams of green fields and rivers, but awakes to a morning with no reason for waking. He's haunted by the memory of lost paradise. In his youth or dream, he can't be precise. He's chained forever to a world that's departed. It's not enough, it's not enough.
Gilmour

Reply With Quote
  #2  
Old April 24th, 2003, 09:29 AM
imbrokn imbrokn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: NJ
Posts: 428 imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 34 m 8 sec
Reputation Power: 15
Send a message via AIM to imbrokn
how bout pasting a code block?

Reply With Quote
  #3  
Old April 24th, 2003, 10:29 AM
Buraque Buraque is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Shimonoseki / JAPAN
Posts: 58 Buraque User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 4 sec
Reputation Power: 11
I found the problem....
I trimmed the VAL variable and it solved

Actually it has no spaces at all. When I write it many times without any carriage return or space, It seems like this:

membermembermembermember

But strangely doesn't work without Trim...

Reply With Quote
  #4  
Old April 24th, 2003, 01:56 PM
imbrokn imbrokn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: NJ
Posts: 428 imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 34 m 8 sec
Reputation Power: 15
Send a message via AIM to imbrokn
you were prolly putting a space after member in the form. in such case, its not very weird that you have to use trim, because the variable will contain member and trailing space, so equivalently is val is "member " which has no column in the database.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > I cannot use variable to call a member of recordset. Plz look

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap