Pinochet
Posts: 13
|
| Posted: 06/08/2004, 12:46 PM |
|
I've asked this before, sorry for wasting time, but I can't find the code or the post that had the answer.
How do I get the primary key value of an individual row in a grid?
I guess I could retrieve the value from a control but it seems to me that there was a property of the DS or something?
I need to get this value and to do a lookup of data that is joined in another table to this row.
Also, anyone using SQL2000 Standard get the 'cannot sort a row over 8094..." error?
I like using views to retrieve my data and sometimes have a primary table with 5-10 joined tables and ineviatable a row gets to long and cannot be sorted. Not cool. Anyone know any tricks are tips I could try to avoid this.
Thanks
_________________
don't worry it doesn't mean anything anyway |
 |
 |
Pinochet
Posts: 13
|
| Posted: 06/08/2004, 2:20 PM |
|
I hate when I learn something and then forget it and have to learn it all over again.
Found what I was lookin for here: http://forums.codecharge.com/posts.php?post_id=46002
In case it helps anyone I put this in the custom code for the before show event of a grid named results. I get the id field for the row and plug it into a CCDLookUp and plug that into the value of a label on the grid and thus get a repeating unique value for my label.
dim rid
rid = results.datasource.recordset.fields(0)
results.text_block.value = CCDLookUp("T_BLOCK1", "TEXT_BLOCKS", "PARENT = " & rid & " AND TYPE = 244", DBSynmain)
_________________
don't worry it doesn't mean anything anyway |
 |
 |
|