473,498 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

auto employee code

sir,
iam doing project in vb.net with ms-access back end
i wants to create employee code like companyname+code
like western001....
pls help to genereate code
example once i save the button it will generate next code western0002.... so on

regards
Desikankannan.

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Nov 21 '05 #1
1 1363
before you insert a record, query your database for the maximum id
first. then assign your prefix with it.

e.g.
employee(id,name)

SQL DML : select max(id) from employee

when u're inserting a record, combine your prefix with the id+1 :

"western" & id_form_db+1

somehting like that.

gurus please correct me.

Nov 21 '05 #2

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

Similar topics

11
2764
by: csomberg | last post by:
SQL 2000 I thought I would throw this out there for some feedback from others. I'd like to know if you feel using MS auto-increment field is a good solution these days or should one grow their...
2
567
by: Earl Anderson | last post by:
In A97, WXP, I have an employee form which, among other things, has a textbox for that employee's assigned access card number . The form also has two (2) Yes/No checkboxes. One checkbox is to...
17
19258
by: RSH | last post by:
I am really trying to grasp the concept of OOP as it applies to C#. I am looking at trying to set up a simple Employee Class but I am having trouble conceptualizing what this class should look...
3
4054
by: jhhbr549 | last post by:
Can some help me with this. Please review this code for errors. I can not get it to complie. Here is my Code .. This is an abstract class that is used in conjuntion with 4 other classes.. ...
0
1407
by: sloan | last post by:
http://weblogs.asp.net/scottgu/archive/2006/01/17/435765.aspx http://aspnet.4guysfromrolla.com/articles/030806-1.aspx I've been looking for an implementation of a Menu Control that controls...
1
5141
by: pravinnweb | last post by:
can anyone tell me how to set auto height to outer div that is in green box id "gray-background" it should increase relatively to inner div "smbox" here is the css and html code it should work in...
3
1420
by: baccheekumar | last post by:
hi this is niraj i am doing a code to auto increment the employee number on button click event in a text box ....can any one help me for that. the format has to be in the form like. 001-08 where...
1
3315
by: lrw0831 | last post by:
I'm creating an issue tracker database. The main issue for contains basic issue information (issue_id, product, issuetype, status, description, request from, assigned to). What I am trying to do...
2
4730
by: paulyXvpf | last post by:
Hi All, FACTS: > I've created a VB.NET 2005 form, with a SQL Server 2000 backend > The form has about 30 fields that populate 30 columns in the SQL database > The form has mostly text feilds,...
0
7002
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...
0
7203
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...
1
6885
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
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4588
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...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1417
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 ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.