|
 |
asp_databases thread: objRS.Fields().Value
Message #1 by mcguiness74@h... on Sun, 12 Jan 2003 14:34:36
|
|
I've written an application in which the user can choose certain things.
Depending on this choice a table in the Database is selected.
Therefore, i've use the objRS.Fields().Value to get the data.
All the table have the following layout:
ID - Name - Catalog - Image
When using it on the server here at home objRS.Fields(1).Value refers to
Column 'Name'.
When using the same page on the website however, i need to use objRS.Fields
(2).Value to refer to the column 'Name'
What is wrong over here?
Thankz
Message #2 by "Jonas Skafte Jensen" <jskaftejensen@h...> on Sun, 12 Jan 2003 16:01:45 +0100
|
|
> ID - Name - Catalog - Image
>
> When using it on the server here at home objRS.Fields(1).Value refers to
> Column 'Name'.
>
> When using the same page on the website however, i need to use
objRS.Fields
> (2).Value to refer to the column 'Name'
Do you select like this:
SELECT ID, Name, Catalog, Image FROM tbYourTable"
... or like this:
SELECT * FROM tbYourTable
?
If you are using the asterisk-version try the first one instead!
HTH
~J
Message #3 by mcguiness74@h... on Sun, 12 Jan 2003 20:29:21
|
|
Yes, i do use the * version; haven't tryed the other option yet, but how
it it possible that the asterisk version works fine on the test server,
while the page on the internet server gives problems?
> > ID - Name - Catalog - Image
>
> When using it on the server here at home objRS.Fields(1).Value refers to
> Column 'Name'.
>
> When using the same page on the website however, i need to use
objRS.Fields
> (2).Value to refer to the column 'Name'
Do you select like this:
SELECT ID, Name, Catalog, Image FROM tbYourTable"
... or like this:
SELECT * FROM tbYourTable
?
If you are using the asterisk-version try the first one instead!
HTH
~J
Message #4 by "Ron Williams" <ronwilliams32@c...> on Sun, 12 Jan 2003 20:57:41
|
|
objRS("Name") would work with both versions, for the current record of
course.
> Yes, i do use the * version; haven't tryed the other option yet, but how
i> t it possible that the asterisk version works fine on the test server,
w> hile the page on the internet server gives problems?
>
> > > ID - Name - Catalog - Image
>>
>> When using it on the server here at home objRS.Fields(1).Value refers
to
>> Column 'Name'.
>>
>> When using the same page on the website however, i need to use
o> bjRS.Fields
>> (2).Value to refer to the column 'Name'
> Do you select like this:
S> ELECT ID, Name, Catalog, Image FROM tbYourTable"
> ... or like this:
S> ELECT * FROM tbYourTable
?>
> If you are using the asterisk-version try the first one instead!
> HTH
~> J
Message #5 by "Jonas Skafte Jensen" <jskaftejensen@h...> on Sun, 12 Jan 2003 21:54:13 +0100
|
|
>> Yes, i do use the * version; haven't tryed the other option yet, but how
>> it it possible that the asterisk version works fine on the test server,
>> while the page on the internet server gives problems?
With the * version, you can never be *sure* in what order your fields get
returned...
~J
|
|
 |