473,395 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Give users the ability to query a database using SQL

19
Hi

I have a database in Access 2000, for which I would like to give users with a certain amount of SQL knowledge the ability to query it themselves. This would save me a great deal of time and effort! The way I would like to do this is to have a form with two windows - the top window being where the SQL is written and the bottom window being the output, perhaps in a datasheet format. The permissions will need to be limited, i.e. to SELECT only. Is this possible?
Any advice most appreciated.
Sep 6 '07 #1
6 1693
Jim Doherty
897 Expert 512MB
Hi

I have a database in Access 2000, for which I would like to give users with a certain amount of SQL knowledge the ability to query it themselves. This would save me a great deal of time and effort! The way I would like to do this is to have a form with two windows - the top window being where the SQL is written and the bottom window being the output, perhaps in a datasheet format. The permissions will need to be limited, i.e. to SELECT only. Is this possible?
Any advice most appreciated.
IMHO if you don't wish them to have Access then MSQuery (non default installation part of the office package) can query an Access database There a any number of third party apps that do similar and which you could find with a bit of googling.

If you do not mind them 'having' Access but would wish to control it by custom building a form you'd be reinventing the wheel.

To actually and properly custom build a form of the type you describe 'from scratch' requires a significant amount of effort to ensure consistency in the SQL statement they type to ensure it verfified against the datasource not to mention ensuring compliancy of the SQL itself.

The last thing you would want I think? is a user to say "Hey I typed this in and it hasnt done anything" You'd spend a great deal of time and effort running round with replies like "Hey you missed the date # " or no its * for the wildcard only Ansi 92 does % and so on


Jim
Sep 10 '07 #2
JConsulting
603 Expert 512MB
Hi

I have a database in Access 2000, for which I would like to give users with a certain amount of SQL knowledge the ability to query it themselves. This would save me a great deal of time and effort! The way I would like to do this is to have a form with two windows - the top window being where the SQL is written and the bottom window being the output, perhaps in a datasheet format. The permissions will need to be limited, i.e. to SELECT only. Is this possible?
Any advice most appreciated.
I'd also like to add to what Jim has already stated.

A free form textbox is simple enough to type into, however because of the dynamic nature of SQL and the differing number of fields returned etc..and the static nature of forms, you would be better off just letting them type away, and read the text from the box into a SQL statement to execute it. Select queries can be snapshot format, however action queries that change data will be somewhat harder to manage. You could end up with a user that deletes all records from a table.
Method wise, the set-up for this requirement is simple, but the management, as Jim has already stated, is going to be more difficult.
J
Sep 10 '07 #3
ADezii
8,834 Expert 8TB
Hi

I have a database in Access 2000, for which I would like to give users with a certain amount of SQL knowledge the ability to query it themselves. This would save me a great deal of time and effort! The way I would like to do this is to have a form with two windows - the top window being where the SQL is written and the bottom window being the output, perhaps in a datasheet format. The permissions will need to be limited, i.e. to SELECT only. Is this possible?
Any advice most appreciated.
I have an excellent Utility straight from the Access 2002 Developers Handbook called the SQL Scratchpad. This utility consists of 1 Form and 3 Class Modules, and seems to be tailor made for what you are requesting. The Permissions you would have to handle yourself. It uses ANSI 92 Syntax which means that the * and ? are out and % and _ are in. Whether or not this is a problem can only be answered by you. If you are interested, let me know and I can make some arrangements to get it to you.
Sep 10 '07 #4
missinglinq
3,532 Expert 2GB
Perhaps the SQL statement could be parsed, looking for certain terms (Delete for example) and allowing/disallowing execution accordingly. Likewise, a search could also be done of * and ? and replace them, if found, with % and _.

I have to say, though, that giving users this kind of access (sorry!) to data gives me the willies!

Linq ;0)>
Sep 10 '07 #5
ADezii
8,834 Expert 8TB
Perhaps the SQL statement could be parsed, looking for certain terms (Delete for example) and allowing/disallowing execution accordingly. Likewise, a search could also be done of * and ? and replace them, if found, with % and _.

I have to say, though, that giving users this kind of access (sorry!) to data gives me the willies!

Linq ;0)>
I'm with you on this one, linq! Imagine the old "Delete * From ReallyImportantTable" if it's not caught? (LOL).
Sep 10 '07 #6
birchw
19
Thanks guys for the advice. I think this is going to be more time and effort than it's really worth :-)
Sep 19 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: BP | last post by:
I get the following error: Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' /myweb4/authorised_user_page.asp, line 70 and line 70 of my code is: <% rsCheckUser1.Open...
5
by: MX1 | last post by:
Here's an interesting one. I have a database that has user level security invoked. The design is normalized and I have one field in particular called Rep ID. Any thoughts on how I can allow all...
1
by: Almarni | last post by:
Designed a database in Access 97 that runs on a 2000 server and is accessed by users using Windows 2000 client. Reported that no more than 3 users can use it. There is one database with the...
4
by: Michael | last post by:
Hi, I have an Access database set up on a network drive that several users can access. The database has many queries but just one main form. I have designed a startup form where a user can...
4
by: deko | last post by:
Is there any way to let users compose and run SQL from the Access interface? If I create a new query from the Database Window, select Design View and then View >> SQL View, I get a window from...
16
by: Andy_Khosravi | last post by:
I'm in a bit of a pickle. My employer, a health insurance firm, had me design a small database to track benefit issues. The intended users were technical specialists and some managers (about 90...
6
by: google | last post by:
I have a few general questions. I am working on a new database to be used within my company. I would like to give a couple of people, particularly HR, the ability to add and delete Access users,...
1
LMHelper
by: LMHelper | last post by:
Ok I am creating a new database for LM. One that will keep track of our licenses for over 400 users. We already have a database with the users information like name, location, telephone number,...
0
by: raylopez99 | last post by:
10 years ago, the below was written (see very end, after my signature RL). What, if anything, has changed? I have Access 2003 and soon Access 2007 on a Windows XP Professional or Windows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.