473,320 Members | 1,817 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,320 software developers and data experts.

need to allot userid uniquely

hi, i need help in allocating each user a unique userid. if a userid already exists then the user must be prompted to choose another id.
i tried this by making userid as primary key in the table.but im not able to write proper commands to make that possible. im using asp.net in vb and as ms access database.
help asap.thnks
Mar 17 '07 #1
2 962
I'm not really clear on what the issue is that you are experiencing. If you're using a DataTable.NewRow() this should be taken care of for you. At least as far as the unique ID is concerned if your Access db has autonumber going.

If you want a true user name, use a parameterized query to check the name against your db and if rows>0 then they need to pick a new one. If not, we insert it and go on our way. Just a thought.
Mar 17 '07 #2
kenobewan
4,871 Expert 4TB
This is a database problem - with userid set as primary key use autonumbering.
Mar 18 '07 #3

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

Similar topics

2
by: Charles | last post by:
I need to find a way to share information between two classes, one is an employee class and the other is a custom error class that inherits from ApplicationException. These two classes are part of...
22
by: OHM \( Terry Burns \) | last post by:
I was thinking about community the other day, and wondering what would be the holy grail for a developer in need. I mean, we do get help here, but its done on a best endeavours basis and its really...
3
by: chrisg | last post by:
Hi All, I've been struggeling with this for a while now, and I was wondering if anyone could help me. given: drop table GENCMP.SCRIPTS; ...
0
by: ankmahajan | last post by:
hi, i need help in allocating each user a unique userid. if a userid already exists then the user must be prompted to choose another id. i tried this by making userid as primary key in the table.but...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.