Page 1 of 1

sqlquery.exe

Posted: Tue Nov 02, 2021 11:16 am
by bobvolz
Hi;

Is there a parameter that can be passed to sqlquery.exe that will turn off the ability to edit a record.

I would like to be able to call this program from my app but for sorting and viewing and filtering only.

Bob Volz

Re: sqlquery.exe

Posted: Tue Nov 02, 2021 11:40 am
by rdonnay
I added this capability for another customer who calls Sqlquery() class from his code.

How are you invoking Sqlquery? Are you using RunShell() or the class?

Re: sqlquery.exe

Posted: Tue Nov 02, 2021 11:43 am
by bobvolz
Hi Roger; I use the class on some of my popular browsers but I also use runshell as standalone menu item for queries into some files.

Thanks

Bob

Re: sqlquery.exe

Posted: Tue Nov 02, 2021 11:58 am
by rdonnay
Try putting Administrator=No in your sqlquery.ini file.

Re: sqlquery.exe

Posted: Tue Nov 02, 2021 12:01 pm
by bobvolz
Excellent. That makes it easy.
Thanks

Bob

Re: sqlquery.exe

Posted: Tue Nov 02, 2021 12:23 pm
by bobvolz
Hi Roger; Not sure in the ini file where I should put the Administrator=No

This is the code I use for the runshell calling the SQLQuery.exe

Also not sure what the 2 .t. 's are for in the runshell.?

DCMENUITEM "&1.Service Customer SQL Query" PARENT oSequelMenu ;
MESSAGE 'Service Customer SQLQuery' ;
INTO oMsgBox ;
ACTION {|| RunInNewThread({|| RunShell('/co:ADS_3 /st:servcust','c:\automanads\sqlquery.exe',.t.,.t.)})}

[ADS_3]
TYPE=ADS
Name=f:\aman\aman.add
Database=f:\aman\aman.add
uid=AdsSys
AdsLockingType=1
AdsTableType=2
Administrator=No Do I put this here or in the [SYSTEM] section ??

Doesn't seem to work either way. Pressing enter stills gives edit screen.

Bob

Re: sqlquery.exe

Posted: Tue Nov 02, 2021 12:46 pm
by rdonnay
It looks like this is going to require some major mods to my code to give you what you want.

I thought I already supported this for my other customer, but he didn't ask for that.
I wrote a bunch of mods to the SqlQueryConfig() class.
I could add your requirements too but then you will need to use the class instead of RunShell().
If I need to add all these configuration parameters to Sqlquery.ini, that's going to take a lot more work.

Re: sqlquery.exe

Posted: Tue Nov 02, 2021 1:38 pm
by bobvolz
Hi Roger;

Don't worry about it. I will use the Class. I believe the editing is still controlled in the browse.

I'm going to remove the runshell options from my menus. I don't want people editing data outside my app.

Thanks
Bob