Saving Query Strings

N

Nathan Guill

I have an interface that works with an Access back-end. I would like to
store and/or load user defined query strings per each user (i.e. no user can
access another's queries). The idea I had was a "table" stored with the C#
front-end (not in the Access database), but don't know if this is even
possible. If it is, can someone let me know how? Otherwise, how do other
people handle storing and loading query strings for possible later use?
 
M

Mythran

Nathan Guill said:
I have an interface that works with an Access back-end. I would like to
store and/or load user defined query strings per each user (i.e. no user
can
access another's queries). The idea I had was a "table" stored with the
C#
front-end (not in the Access database), but don't know if this is even
possible. If it is, can someone let me know how? Otherwise, how do other
people handle storing and loading query strings for possible later use?

Is this for an ASP.Net application? WinForms app? For ASP.Net, I would go
with defining a table within the database that contained such strings. For
the latter, I would go with defining a custom configuration file per user
that is stored within the user directory of the current user. All in all
though, I probably would not be storing such strings anywhere. Depending on
your requirements, you may be able to go about this without using "custom"
query strings.

What is it exactly that is "custom" about these query strings that can't be
made static with additional parameters?

HTH,
Mythran
 
N

Nathan Guill

Sorry, It's for a WinForms app.

I was just thinking that the user might want to save a query that they run a
lot, but is not something I have been asked to develop a standard for. This
way they do not have to reenter the search criteria each time. But now that
I'm thinking about it, these forms are not showing that much data to begin
with, so I think I'm going to leave this capability out as I don't think it
would be that big of a hassle for the user to do...
 
R

RobinS

Does he write his own query, or select stuff on the screen?

I have written a few apps that provide my users with the ability to run ad
hoc requests against the database. I have a bunch of selection criteria on
the screen that they fill in. I create the query, run it, and return the
data to them.

If you are doing that, you can save the values of all of the controls using
My.Settings in VB (it's also in C#, but has a different name; post back if
you need it), then reload them when the user comes back in. That's what I
do.

If they are actually crafting queries, I would do the same thing. I would
save them to My.Settings and then fill it back in.

Anything you can do to make your users' lives easier makes you look better.
It's the small things that count in an application. I once got kudos from a
top-level manager because I used masked edit boxes for the dates, and he
didn't have to type the slashes. Haha!

If you want more info on saving settings, post back with your language of
choice, and I'll post some code for you.

Robin S.
-------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top