Anj
Posts: 13
|
Posted: 02/15/2009, 7:52 PM |
|
I am trying to dynamically show in a list box possible answers to particular questions.
I am stuck with the where clause
so this works
SELECT AutoQID, AnsID, AnsText
FROM PossAnswers
WHERE AutoQID = 100
instead of the 100 I want it to equal the AutoQID for the row in the editable grid.
I know I am close - not sure if it is to going insane or close to getting the answer.
Any help would be enormously appreciated.
|
|
|
akhan
Posts: 38
|
Posted: 02/16/2009, 2:14 AM |
|
HI,
you need to add a custom parameter in the where clause .For the "Type" use "expression"
now in the "parameter" you have 3 options:
1. If the column is included in the select statement and is a primary key you can do:
item.AutoQIDidfield.value
2. If the column is included in the editable grid then you can do:
item.AutoQID.value or DataItem.AutoQID.value
3. Otherwise you can:
item.rawdata("AutoQID")
Hope it helps.
Regards
_________________
"Simplicity is the key to brilliance” (bruce lee) |
|
|
Anj
Posts: 13
|
Posted: 02/17/2009, 4:14 AM |
|
Thanks for your suggestions akhan, this is the results, its still not quite working.
Suggestion 1.The autoQID is not a primary key for each of these tables.
Suggestion 2. The Item.AutoQID.Value is returning the default value rather than the data in the record (I think this is close but not quite there).
The DataItem.AutoQID.value is returning an error BC30451 Name "DataItem" is not declared
Suggestion 3. item.rawdata("AutoQID") undefined function 'item.rawdata'
Any further suggestions greatly appreciated - and I'm still pulling my hair out.
|
|
|
akhan
Posts: 38
|
Posted: 02/24/2009, 6:12 AM |
|
You can set the column as a primary key in the query builder by right clicking the column.
Is this in asp.net?
You can also try removing the default value?
_________________
"Simplicity is the key to brilliance” (bruce lee) |
|
|