Register  Login  
  September 8, 2010  
Forum    
Forum Minimize
 
ForumForumDiscussionsDiscussionsSQLGridSelected...SQLGridSelected...Edit Selections on Multiple Columns as in exec dbo.procLoadByKey [Edit:V:0],[Edit:V:1]Edit Selections on Multiple Columns as in exec dbo.procLoadByKey [Edit:V:0],[Edit:V:1]
Previous Previous
 
Next Next
New Post
 7/13/2010 8:28 AM
 

Dear Paul,

Hope you can spare some of your time to point me in the right direction?

Basically I want to select on multiple keys from the

Edit Selections

Select Statement:

Something like:

select KeyOneID,KeyTwoID,DataField

from myTable where KeyOneID = [EDIT:V:0]

and KeyTwoID = [EDIT:V:1]

EDIT columns from a selection grid can quite easily be placed in

Edit Selections

Header Message:

Key - [Edit:V:0],[Edit:V:1]

And will be correctly displayed as values on the top of the edit/delete page.

Equally multiple values work in the

Delete Statement:

e.g.

exec dbo.procDelete [Edit:V:0],[Edit:V:1]

Naturally I then tried a proc in Edit Selections as per

exec dbo.procLoadByKey [Edit:V:0],[Edit:V:1]

but again no luck.

although procs (and selects) do work with KeyValue as in:

exec dbo.procLoadByKey [Edit:V:0],[Edit:V:1]

or

select KeyOneID,KeyTwoID,DataField

from myTable where KeyOneID = [EDIT:KeyValue]

Bit stuck on this one so I would very much appreciate any assistance. I have got a feeling that I may have missed something so obvious I can no longer see it!

Thanks for this module it is becoming very usual especially when you factor in JScript to the EDIT Template and populate it cleverly with the correct TSQL.

Cheers,

Ashley

1 Reports 
New Post
 7/13/2010 5:43 PM
 

Ashley,

SGSV does not support multiple column keys as written, but I think this would be a good "addition", so let me play a bit and see what I can do.

Should be doable, just not sure what "got-ya's" may exist.

Paul.

New Post
 7/13/2010 6:39 PM
 

Thanks for your speedy response.

I can report that Edit Selection will take more than one value as long as it is a constant as in for example:

select KeyOneID,KeyTwoID,DataField

from myTable where KeyOneID = [EDIT:KeyValue]

and KeyTwoID = 35

But this is not exactly flexible!

Of course I could write a link into the select grid passing the keys as a querystring but this would be moving away from your EDIT template formats and having invested time (mainly with Jscript) I think they work really well and would like to keep things uniform.

Thanks once again for your attention to this matter,

Ashley

Previous Previous
 
Next Next
ForumForumDiscussionsDiscussionsSQLGridSelected...SQLGridSelected...Edit Selections on Multiple Columns as in exec dbo.procLoadByKey [Edit:V:0],[Edit:V:1]Edit Selections on Multiple Columns as in exec dbo.procLoadByKey [Edit:V:0],[Edit:V:1]

Print  

  Home | Blog | Forum | Subscriptions | Free Modules   Page generated in 0.3805472 seconds.
  Copyright 2010 by TressleWorks   Terms Of Use | Privacy Statement