shekarls Absent Member.
Absent Member.
400 views

Database querying access from script Editor for particular user group

Jump to solution

HI All,

             Based on the below logic i was able to successfully generate unique numbers with the help of DB connection and assigning it to field TS_USER_07.

After all these were working fine for me as an ADMIN, i realized this logic with connecting to DB wont work for the NON ADMIN USERS in QC nor USERS from particular group.

 

Sub TestPlan_Test_Autoid

 

set td = TDConnection

set com = td.command
com.CommandText = "select max(convert(int, TS_USER_07)) from TEST"
set rec = com.Execute
msgbox rec.FieldValue(0)
newValue = rec.FieldValue(0) + 1

Test_Fields("TS_USER_07").Value = cstr(newValue)              


Test_Fields("TS_USER_07").IsReadOnly = true
set com = nothing
' set rec = nothing
set td = nothing

End IF


End Sub

 

After going through other threads i realized, TD connection can only be done as ADMIN user?

Is there any config changes i can do to get it working for all users? 

If not,  is there a way i can get MAX Value from specific User defined field.....something like Test_Fields("TS_USER_07").Value.MAX  !!!!!

 

Thanks in Advance

Tags (2)
0 Likes
1 Solution

Accepted Solutions
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Database querying access from script Editor for particular user group

Jump to solution
TDConnection can be used by any user. The limitation is on the Command method of the TDConnection object.

If you want to enable the Command method to be used by any user that can connect to QC, you need to set the Site Administration parameter "DISABLE_COMMAND_INTERFACE" to "N". Refer to the Administrator Guide for details.
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
2 Replies
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Database querying access from script Editor for particular user group

Jump to solution
TDConnection can be used by any user. The limitation is on the Command method of the TDConnection object.

If you want to enable the Command method to be used by any user that can connect to QC, you need to set the Site Administration parameter "DISABLE_COMMAND_INTERFACE" to "N". Refer to the Administrator Guide for details.
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
Highlighted
shekarls Absent Member.
Absent Member.

Re: Database querying access from script Editor for particular user group

Jump to solution

Thank you.....

Adding DISABLE_COMMAND_INTERFACE = N under Site Admin config helped me resolve this issue.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.