473,657 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Replacing CurrentUser in a Conversion


I'm converting an Access 2000 database (fe/be) to a SQL Server 2000
backend.

This is a quick and dirty conversion, using linked files via a file
dsn, and is to be completed ASAP with minimal changes to the Access
2000 frontend

Of course, the funding to take advantage of the SQL Server will become
available sometime in the future.

Anyways, the existing frontend does everything through existing
pre-defined querydefs. I haven't found any object that is creating sql
statements on the fly

And several of these queries use the "currentuse r" function/method.

The existing database is secured, and each user must login. This is
being replaced with windows logins for the sql server

Fortunately, the existing user logins match the user's windows logins.

But the currentuser will return "admin" in the new scheme, not the
user's login name

And I know that I can retrieve the user's login from both windows and
sql server

But how to get this into the query?

My thought now is to have a hidden form opened via the autoexec that
has a control with the login for the user of the machine. And then use
this in the query.

I'm hoping there is a better technique. Any help would be appreciated

Mark Flippin
Nov 13 '05 #1
2 1483
Mark Flippin wrote:
I'm converting an Access 2000 database (fe/be) to a SQL Server 2000
backend.[snip]
And several of these queries use the "currentuse r" function/method.

The existing database is secured, and each user must login. This is
being replaced with windows logins for the sql server [snip] But the currentuser will return "admin" in the new scheme, not the
user's login name

And I know that I can retrieve the user's login from both windows and
sql server

But how to get this into the query?


You were using a function to get CurrentUser() so you simply substitute the
function that returns the Windows login name in that same context.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
On Sun, 22 May 2005 11:13:11 GMT, "Rick Brandt"
<ri*********@ho tmail.com> wrote:
Mark Flippin wrote:

But how to get this into the query?


You were using a function to get CurrentUser() so you simply substitute the
function that returns the Windows login name in that same context.


Well don't I feel stupid. This works like a champ.

Thank you for the response

Mark
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2934
by: sqwirx | last post by:
I am using a String that has a member function c_str(). Because I think c_str() reduces the readability of the code and I don't want implicit conversions, I'm concidering to add a "char const * operator*()". When you look at String as a fancy char* smartpointer then it makes perfectly sense to dereference it with operator*. What you think of it?
3
2660
by: notme | last post by:
Hi everybody, I'm working in a system that doesn't provide rtti functionality, so using dynamic_cast is not possible. I'm wondering how would be a better replacement: using static or reintepret cast? (Or something else?). This is to modify an existing program, so please note that a redesign is not possible. Thanks!
7
2580
by: Ryan Taylor | last post by:
Hi. I have some code that dynamically generates a PDF and spits this content directly to the web browser. I use HTMLDoc to create the Pdf's from html. So the user can click on a button "Print PDF" and the current page magically becomes a PDF file. This worked great until we moved the site to https. Now, when the button is clicked, I get a warning that This page contains both secure and nonsecure items. Do you want to display the...
8
4608
by: Chris A via AccessMonster.com | last post by:
I have an interesting problem that I have yet to come accross that I can't change data structure on because it is an export from filemaker I am reformatting for another dept. anyway. I have a table like so... Table 1 Field1 Field2 Field3 E1 April 2006 AA, BB, CC E2 April 2006 AA, BB, CC,DD, EE E3 April 2006 AA, BB
5
1602
by: Dax | last post by:
Hi, how can Identify a domain user that send a form made with ASP. I have see that exist a variable called currentuser, but what does it mean? Thanks in advance, Dax
6
3283
by: reidarT | last post by:
How do I get current user logged in with vb.net code? reidarT
2
5346
by: PowerLifter1450 | last post by:
Hi all, I have fields in my tables which get updated to the UserName when someone inserts/updates records through a form. However, I have created append queries that are importing records to the tables from an external data source. I would like to have Default value of the UserName field filled in as the current user for each of the appended record, however that default value in the table design do not take the CurrentUser() function. Is...
10
2523
by: Mourad | last post by:
Hi All, CurrentUser() returns null when called from a form event handler, at least from Form_Open()! However, it works fine in other forms! Use Application.CurrentUser seem to work, but I'd rather get CurrentUser() to work, since there are so many calls to it.
3
1454
by: JohnHo | last post by:
This is probably simple but this is the last feature for an db app and I am stumped (read fatigued). I have created users with the Access security feature. Additionally, I have a lookup table (lkupClinicianInfo) with user information (lngClinicianID, txtUserName, etc.) for various other purposes. The txtUserName string and CurrentUser string are exactly the same. For a new record I would like to insert the clinician ID...
0
8413
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.