Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to implement the security to my QV file according to one User table in the database, where the userid, roles, and access information will be stored.
So i need to connect that user table to my section access dynamically.
Dynamically i mean like if there is any updation in the data table ,that should be automatically reflected in the QV file. Suppose i have given usera for North region access, but tomorrow i want to give him North as well south region access. These information will be loaded to the User table in the database according to the requirement. So my point is here i should able to connect to the user table from QV section access and the data should be automatically refreshed in QV inline with the updation of the user table.
1- How can i connect to the database table from section access. IF its through script please provide me some example as am very new to the technology.
2- How the data will be automatically refreshed in QV from the user table that i have refred for the section access.
Please provide me the step to implement the same if the same is possible.
Any help will be appreciated.
Thanks,
Mahaweta
Hi Amar,
Really thanks a ton.
Now am able to connect to data base table.
But one thing am missing here like i have one column scen in the customer table and its one foreign key also.
The same scen column is made to be PK in the user table.
I have pasted my script as below.
Section
Access;
Load
'USER' as ACCESS,
UNAME
as USERID,
PASSWD
as PASSWORD ,
'SCEN'Resident
USERINFO;
SECTION
APPLICATION;
SQL
SELECT CID,
CNAME,
ADRS,
SALES,
SCEN
FROM
system."CUSTOMER_SCENARIO";
CONNECT
TO [Provider=MSDAORA.1;User ID=system;Data Source=adexa1] (XPassword is KaKSeQRMFDeCWQB);
Something surely i am missing here, as when i am login in to qv file with the user name the data selection should hapen according to the user. But am getting all the data irrespective of the user login.
Please suggest me where i am missing.
Thanks,
Mahasweta
Hi Amar,
Really thanks a ton.
Now am able to connect to data base table.
But one thing am missing here like i have one column scen in the customer table and its one foreign key also.
The same scen column is made to be PK in the user table.
I have pasted my script as below.
Section
Access;
Load
'USER' as ACCESS,
UNAME
as USERID,
PASSWD
as PASSWORD ,
'SCEN'Resident
USERINFO;
SECTION
APPLICATION;
SQL
SELECT CID,
CNAME,
ADRS,
SALES,
SCEN
FROM
system."CUSTOMER_SCENARIO";
CONNECT
TO [Provider=MSDAORA.1;User ID=system;Data Source=adexa1] (XPassword is KaKSeQRMFDeCWQB);
Something surely i am missing here, as when i am login in to qv file with the user name the data selection should hapen according to the user. But am getting all the data irrespective of the user login.
Please suggest me where i am missing.
Thanks,
Mahasweta
Hi Amar,
Really thanks a ton.
Now am able to connect to data base table.
But one thing am missing here like i have one column scen in the customer table and its one foreign key also.
The same scen column is made to be PK in the user table.
I have pasted my script as below.
Section
Access;
Load
'USER' as ACCESS,
UNAME
as USERID,
PASSWD
as PASSWORD ,
'SCEN'Resident
USERINFO;
SECTION
APPLICATION;
SQL
SELECT CID,
CNAME,
ADRS,
SALES,
SCEN
FROM
system."CUSTOMER_SCENARIO";
CONNECT
TO [Provider=MSDAORA.1;User ID=system;Data Source=adexa1] (XPassword is KaKSeQRMFDeCWQB);
Something surely i am missing here, as when i am login in to qv file with the user name the data selection should hapen according to the user. But am getting all the data irrespective of the user login.
Please suggest me where i am missing.
Thanks,
Mahasweta
Hi,
Try it this way
CONNECT TO [Provider=MSDAORA.1;User ID=system;Data Source=adexa1] (XPassword is KaKSeQRMFDeCWQB);
USERINFO:
SQL SELECT UNAME, PASSWD, SCEN from USERTBL
SQL SELECT CID, CNAME, ADRS, SALES, SCEN FROM system."CUSTOMER_SCENARIO";
Section Access;
Load
'USER' as ACCESS,
UNAME
as USERID,
PASSWD
as PASSWORD , SCEN
Resident
USERINFO;
SECTION APPLICATION;
Load SCEN from USERINFO;
Regards
Amar
Hi Amar,
Thanks a lot.
I have tried with the same code as you have provided.
But am getting one error here saying canot open file c:\mahasweta\userinfo
Load SCEN from USERINFO;
Something am missing here, please suggest me where am going wrong.
Thanks,
Mahasweta
hi
Use Load SCEN Resident USERINFO;
Regards
Amar;
Hi Amar,
Thanks a lot, yes its working.
Now i want to hide the script and reload option only for the user, i have gone through the document properties like i checked initial data reduction. But its not helping me out.
Because once am reloading all users data is available in QV file, so i dont want the script to be reloaded or to be seen for the user.
Please suggest me how to implement that.
Thanks,
Mahasweta