WebMehod that return List
Closed
leilusha
Posts
19
Registration date
Tuesday June 3, 2014
Status
Member
Last seen
February 22, 2017
-
Oct 30, 2015 at 06:07 PM
Blocked Profile - Oct 31, 2015 at 06:57 PM
Blocked Profile - Oct 31, 2015 at 06:57 PM
Related:
- WebMehod that return List
- Display two columns in data validation list but return only one - Guide
- My contacts list names - Guide
- Counter strike 1.6 cheats list - Guide
- How to change your best friends list on snapchat to 3 - Guide
- Whatsapp country code list - Guide
3 responses
Well, an SQL statement usually ends with a ";".
Your variable QUERY statement would actually be interpreted as:
if nameT = "tblGOBLYSTUFF".
You may need to append the SQL with an additional +";" behind the nameT within the SQL select statement.
But, then again, you did not tell us where the error was being thrown. From the connection, the SQL SELECT, or the syntax?
Let us know what you try and find!
I have said it once, I will say it again. IT!
Your variable QUERY statement would actually be interpreted as:
"select * from tblGOBLYSTUFF"
if nameT = "tblGOBLYSTUFF".
You may need to append the SQL with an additional +";" behind the nameT within the SQL select statement.
But, then again, you did not tell us where the error was being thrown. From the connection, the SQL SELECT, or the syntax?
Let us know what you try and find!
I have said it once, I will say it again. IT!
leilusha
Posts
19
Registration date
Tuesday June 3, 2014
Status
Member
Last seen
February 22, 2017
Oct 31, 2015 at 06:41 AM
Oct 31, 2015 at 06:41 AM
okay, i tried
then i tried this
but the return was like this :
where is the contents of my List?
"select * from "+nameT+";"but it didn't work
then i tried this
"select * from '"+nameT+"'"and it works -> there is no errors thank you,
but the return was like this :
Method returned java.util.List : "[]"
where is the contents of my List?
Well, you have to "provision" (set) and array of the return.
Dim therecords_index0(99)
Dim therecords_index1(99)
a=0
DO WHILE NOT rs.EOF
therecords_index0(a)=rs(0)
therecords_index1(a)=rs(1)
RS.MOVENEXT 'loops through the next record or throws EOF
a=a+1 'add one to value a whichcounts the array index
LOOP 'will loop as long as not EOF
This will only store 99 records. Please notice that you will only be returning the first two index values of the table.
Once again, this is not the same language, but it should be able to give you direction.
Dim therecords_index0(99)
Dim therecords_index1(99)
a=0
DO WHILE NOT rs.EOF
therecords_index0(a)=rs(0)
therecords_index1(a)=rs(1)
RS.MOVENEXT 'loops through the next record or throws EOF
a=a+1 'add one to value a whichcounts the array index
LOOP 'will loop as long as not EOF
This will only store 99 records. Please notice that you will only be returning the first two index values of the table.
Once again, this is not the same language, but it should be able to give you direction.