|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
how bout pasting a code block?
|
|
#3
|
|||
|
|||
|
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... |
|
#4
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > I cannot use variable to call a member of recordset. Plz look |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|