473,626 Members | 3,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

formating database

46 New Member
hai guys...do you know how to formating the currency data from database into java form
Apr 11 '08 #1
9 1460
sukatoa
539 Contributor
hai guys...do you know how to formating the currency data from database into java form
I dont know, but if i like to learn from it, i should look first to Google's friend...

regards,
sukatoa
Apr 11 '08 #2
najmi
46 New Member
thans 4 ur sugestion,but i need it as soon as posible,,
Apr 12 '08 #3
JosAH
11,448 Recognized Expert MVP
thans 4 ur sugestion,but i need it as soon as posible,,
Feeding "currency format Java" to Google would've been faster than typing another
response in here. If might even give you spoonfeeding code which you're not going
to find here.

kind regards,

Jos
Apr 12 '08 #4
r035198x
13,262 MVP
... formating the currency data from database into java form
I don't understand the "into java form part".
Apr 14 '08 #5
BigDaddyLH
1,216 Recognized Expert Top Contributor
I don't understand the "into java form part".
Yes the original question is vague and I suspect has nothing, really, to do with a database. Try to rephrase the question by being clearer. For example:

I have a date:

java.sql.Date date = ..

but I would like to format it as a string in the following format:

2008-03-30 22:30:57

using time zone UTC.


See? It's not that hard to be coherent.
Apr 14 '08 #6
najmi
46 New Member
ok..
let say i have enter into the ms access database $200.00..
for your information, i already format the decimal point into 2 in db.
so when i call back into java form it come out with this value $200.0000
Apr 15 '08 #7
BigDaddyLH
1,216 Recognized Expert Top Contributor
ok..
let say i have enter into the ms access database $200.00..
for your information, i already format the decimal point into 2 in db.
so when i call back into java form it come out with this value $200.0000
Note that 200.00 == 200.0000, the only difference being the number of decimal places displayed.

How can one control the number of decimal places displayed? There are several classes that can do this, including:

java.text.Decim alFormat: http://java.sun.com/javase/6/docs/ap...malFormat.html
java.util.Forma tter: http://java.sun.com/javase/6/docs/ap...Formatter.html
and the format methods of PrintWriter, PrintStream and String: format method API
Apr 15 '08 #8
najmi
46 New Member
can anybody help me how to generate auto id or number
Apr 17 '08 #9
BigDaddyLH
1,216 Recognized Expert Top Contributor
can anybody help me how to generate auto id or number
The precise SQL used to get back a generated sequence number varies from database vendor to database vendor. (So much for JDBC and vendor independence!)

There is also some support for doing this in the JDBC API:

int executeUpdate(S tring sql, boolean autoGeneratedKe ys)
ResultSet getGeneratedKey s()

I haven't used these because as soon as I could, I moved up from JDBC to Hibernate, and haven't looked back.
Apr 17 '08 #10

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

Similar topics

6
2209
by: Polar | last post by:
I have a database that stories entries of short stories for a writers website. I can easily input the data into MYSQL but my trouble lies in retrieving the data. the story in just cut and pasted from a WP into the TEXTAREA on the form. When I look at the story in the DB I can see it retains all the paragraph spacing etc. but when I try and read that cell when retrieving data all the text is crammed into one paragrapgh. What am I...
0
1471
by: rodrigo guerra | last post by:
where i can change the code formating that visual studio does in the code.... like if i type: if ( ) { .... } visual studio changes to:
0
1156
by: Dmitri Manushin | last post by:
Hi all, i have textBox (multiline) i'am enter many words and don't push enter next i push button and text record in database. When i read data from database in table i'am use teg <pre> for save text formating, but i don't push enter in previous example and my table grow in right. How i can solve my problem. Thanks. P.S.
4
1573
by: djc | last post by:
Is there a property or method of the textbox web server control that I can use to format the text in it a certian way. For example I am displaying a date value from a database in a text box. It displays like so: mm/dd/yyyy mm:hh:ss. I 'was' using the .ToShortDateString() function like so: txtETA.Text = drMain.Item("EstimatedDeliveryDate").ToShortDateString() which worked great until I came across a database record with NULL for this field....
3
2110
by: Smiley | last post by:
Hi, I know how to do confitional formating in Excel by clicking the wizard. Is this possible in MS Access ? If so, please directly where to look. I found example but nothing as to how to do it. I am very green in this. Please help.
12
1852
tolkienarda
by: tolkienarda | last post by:
hi all I am working on a content management service and i need some help keeping formating. what i am doing is recreating my site in an admin side and all of the articles on the site will now be in <textarea> boxes so admins can edit them and save the changes it is working but any formating they use dosen't seem to work. if they want to have a return in the middle of their article the only way it will work is if they enter a br tag in...
0
1745
by: Fonix | last post by:
I'm trying to make table border with pyExcelerator. As i can see there is only cell formating!? If i'm wrong pls tell me what is method to make more then one cell to have same format, other then just give them one-by-one. For little tables 100/20 formating cell by cell work ( i try with borders) fine. But when i get 5000/20 excel say: Too many different cell format! and excel remove some of the formats :( Pls help i need to format...
2
1744
by: sitko | last post by:
Hi, I'm in the process of converting a VB.net program into a C program so it can run on a unix like machine. I've been moving along at a nice pace, but this conversion has stumped me. I need a function to take two arguments:(a double number which may or may not be an integer, and an integer which will be the number of digits to store after the decimal place) it needs to turn this into a string which is always 10 characters long. if the...
0
1103
by: Tyler | last post by:
I have a database with many subforms formated as "single forms". I am having trouble formating the forms so they display propers (fill the box on the main form, don't have scroll bars, don't have different color bars around them, etc.) I want the subforms to look like they are part of the main form. Any ideas or websites you could send me to would be appreciated. Thanks in advance.
1
8368
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
8512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7203
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4094
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2630
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
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1515
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.