How to change username?

E

erick-flores

Hello all

I have this big database and now I need to change ALL the users names.
Is there a way to rename a user name, or do I have to delete and add
it again (I DO NOT want to do this)?
I know how to change the password, but I have no idea about the user
name.

I do not want to delete then and add it again, because I will lost all
the data (I think)

Any ideas?

Thanks in advance
 
T

Tom van Stiphout

On Thu, 10 Jan 2008 08:31:38 -0800 (PST), erick-flores

Where are your user names stored? Since you're asking this in the
security newsgroup I'm thinking you're speaking of workgroup-level
security, right?
If right, how would deleting a user delete data?

-Tom.
 
E

erick-flores

Yes, I do have workgroup-level security...sorry about that.
If right, how would deleting a user delete data?
Well I am not sure thats why I said "I think"...

This is the scenario: The database control expenses for around 30+
users. Each user log in with Firstname Lastname. There are a LOT of
expenses already entered by these users. Users have their own database
on their laptops and the master database sits on a server, they sync
back n forth with it.

They want to log in using flastname. Example: Erick Flores (old user)
eflores (new user). Is there a way I can link the old username with
the new user name? I guess I understand I will not lost any data but I
want to keep the data from Erick Flores under eflores, all under the
same username..do you understand? In other words when they login to
the database, I want them to see their old data under their new
username.

Thanks for your help
 
B

BruceM

The user name is stored in the security mdw file. It has no connection to
stored data. Create the new user names, then have the users log in using
the new names. They will see the same data they saw with the old user name.
 
J

Joan Wild

Not exactly. I'm reading that erick is storing the username with the data that 'belongs' to that user.

So you'll need to delete all the users (no you can't change the existing usernames), recreate them, and then run a bunch of update queries to update the existing data to the new username. At least, I think that's the best way.
 
B

BruceM

Oh, I see. I was reading it differently, but it's likely you're right. If
the new name is consistent with the example given it may be possible to use
a single query, with something like:
ShortName: Left([NameField],1) & _
Right([NameField],Len([NameField]-InStr([NameField]," "))

Even if it doesn't work in every case, it should do a lot of the work.


Not exactly. I'm reading that erick is storing the username with the data
that 'belongs' to that user.

So you'll need to delete all the users (no you can't change the existing
usernames), recreate them, and then run a bunch of update queries to update
the existing data to the new username. At least, I think that's the best
way.
 
E

erick-flores

Thanks for the help. I was trying to avoid deleting all the users and
re-create them, but I guess thats the only way. Thanks again.
 
J

Joan Wild

It's not the only way, but it is the best in the long term.

You could add a field to your employee table with the new username, keeping the old one as well. Then you'd need to change all your queries/forms to look up the new username as needed.
 
E

erick-flores

OK. I am not 100% sure when we are going to implement the new user
name. But I will look into that option if we do so. Thanks
 

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