Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
pdkaman

Senior Member
Registered:
Posts: 71
Reply with quote  #1 
I'm trying to create a Dynamic Role based on an Admin Table.

So the user only sees Folders specific to the relationships defined in a table.

I need to pass in a parameter to the SelectSql and I'm having a hard time understanding how to use the QueryParameters array.  Would like an example if someone has one.  Here's my code:

SelectSql(new Metastorm76(),"SELECT UserId FROM Relationships_Owners WHERE FK_FIRelationships_ID = @FI_Id ", QueryParameters[] params)

Within the Roles Management I'm not sure how to specify the params.  I can understand this in a server side script, but not within the Roles grid.
0
pdkaman

Senior Member
Registered:
Posts: 71
Reply with quote  #2 
Well I believe I found the resolution... I was over complicating this by using the SelectSql with that signature.

Just changed it to SelectSql(new MetastormDefault(), "SELECT UserId FROM Relationships_Owners WHERE FK_FIRelationships_ID = '" + ProjNew.txtCompanyID + "'")

Thanks!
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #3 
I would very much recommend using a arguments instead of attempting for format text or dates. It is also much easier for the database to optimise.

Just use the SQLArg("@<argument>", <value>) function to set the arguments.

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!