Hai, m doing a project with jsp and postgresql. M facing a problem...my prob is that i hv a combobox with department code connecting from database.now when i select a dept name in combo, there there is a textbox where employee id is generated....emp id is generated in this way that suppose when i select "home" dept the emp id will be 'hm1' next hm'2 ....... hm3 in this way....nw when i select another dept in the combo then this will be perform for that dept.....suppose "education" dept,then emp id will be 'edu1','edu2 '.........
here hm or edu are the dept abbreviation of respective dept that also connected from database of the same table from where dept code was connected in the combo....and 1,2,3.....are the serial no that is generated automatically.....
please help.....n give me the code.....
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need. goodluck!
- If you need clarification, ask it in the comment box above.
- Better answers use proper spelling and grammar.
- Provide details, support with references or personal experience.
Tell us some more! Your answer needs to include more details to help people.You can't post answers that contain an email address.Please enter a valid email address.The email address entered is already associated to an account.Login to postPlease use English characters only.
Tip: The max point reward for answering a question is 15.
you can set the recordsource in the properties for the comboBox to a table or create a recordset and loop through it adding one item at a time, see example below:-
Dim dept As String Dim db As DAO.Database Dim rst As DAO.Recordset Dim qd As DAO.QueryDef Dim varResults Dim oMessage Dim sQueryName As String Set db = CurrentDb
mdbname.[Form_Name].Department.SetFocus dept = formname[Form_Name].Department.Text sQueryName = "Query_Name" Set qd = db.QueryDefs(sQueryName) ' ' set up input field for query ' qd.Parameters("field_from_query") = dept Set rst = qd.OpenRecordset() Dim recCount As Integer recCount = rst.RecordCount If recCount > 0 Then With rst .MoveLast .MoveFirst Do While Not .EOF listBoxproducts.AddItem .Fields("pname") listboxCode.AddItem .Fields("pcode") listboxPrice.AddItem .Fields("pprice") .MoveNext Loop End With rst.Close
Set rst = Nothing Set qd = Nothing Set db = Nothing
Java Servlet technology provides Web developers with a simple, consistent mechanism for extending the functionality of a Web server and for accessing existing business systems. A servlet can almost be thought of as an applet that runs on the server side--without a face. Java servlets make many Web applications possible. »Read More
The reference implementation is included in the Java EE 5 SDK and also in the open-source Java Platform, Enterprise Edition (Java EE) application server, available through the GlassFish project, which you can download from java.net. The reference implementation source code is available from the servlet-sources project on java.net.