zlloyd0 0 Posted April 11, 2017 Share Posted April 11, 2017 I have a database that I have created using SQLite on my Mac, and I need to add a constraint of sorts that makes it so that only someone who logs in can alter the data, but for everyone else it is read only.... Can someone PLEASE provide me an example (including actual code used) on how this could be accomplished?? Thanks in advance!! Park_Files.db Link to post Share on other sites
jchd 1,822 Posted April 11, 2017 Share Posted April 11, 2017 Albeit your question isn't AutoIt-related, here's how I see it. Place the DB in a directory and give RW access to only one user, others users just being granted Read access. Yet there is one (big) catch: the RO users can't have temporary files created. Note that seemingly RO queries may have to create temporary tables. A client-server DB engine would probably be a better choice. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to post Share on other sites
Joboy2k 8 Posted April 11, 2017 Share Posted April 11, 2017 i use a virtual box on my Mac that has windows 10 installed. i use SSH from the windows 10 into the Macs IP to access my SQL database via autoit. If you set up users on the SSH and mess around with their permissions im sure you could get it to work but never needed to make it readonly for certain people so let us know how you do it if you get it working. Link to post Share on other sites
Skysnake 94 Posted April 12, 2017 Share Posted April 12, 2017 SQLite is primarily intended as an embedded or single user database. I am with @jchd on this. Go for a relational database. If you DO manage to find a solution I would very much like to hear about it. Skysnake Skysnake Why is the snake in the sky? Link to post Share on other sites
jchd 1,822 Posted April 12, 2017 Share Posted April 12, 2017 SQLite is natively "multi-user" (as in multi-thread and/or multi-process) and is a pretty good relational DBMS. What it isn't naively is a client-server engine and its use over a network is not recommended. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to post Share on other sites
Skysnake 94 Posted April 12, 2017 Share Posted April 12, 2017 Dear @jchd thank you for clarifying that. That was what I intended to say, in line with the topic under discussion. Skysnake Why is the snake in the sky? Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now