Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-11-2004, 04:24 AM   #1 (permalink)
sohlican
Registered User
 
Join Date: Jun 2004
Posts: 2
sohlican is on a distinguished road
A help needed

hi guys, i would like anyone here that can help me to code this thing.

I want to capture the time in the pc with a click of a button then store the time into ms access database. issit possible?

I have already connected the access through this odbc
sohlican is offline   Reply With Quote
Old 06-12-2004, 02:06 PM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,175
Belisarius is on a distinguished road
Well, ODBC won't help you in Java, you need JDBC.

What you can do is when you register a click of a mouse button, you create a Calendar object, and use it's methods to get hour/time/second. Or you can use System.getCurrentTimeMillis(); to get the number of milliseconds since the Unix epoch. You then connect to Access via JDBC, and fill in the columns you need.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 06-12-2004, 08:44 PM   #3 (permalink)
sohlican
Registered User
 
Join Date: Jun 2004
Posts: 2
sohlican is on a distinguished road
sorry sorry, my mistake, typing mistake, i use JDBC to connect da database, so what i need here now is

can you code it for me?

Once i click on a button, it gets the time of the pc and store it in the database. Thank you.
sohlican is offline   Reply With Quote
Old 06-13-2004, 06:12 AM   #4 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,175
Belisarius is on a distinguished road
Sorry, I don't do work with GUI's, so I can't whip out any code. I just know it's possible.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 06-13-2004, 09:01 AM   #5 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,530
sde is on a distinguished road
people are more likely to help you when you look like you're trying to learn something .. rather than just asking someone code things for you.

as i see it, there are 2 things you need to learn here.

1. how to connect and query MS Access from Java.

2. Assign this method to a button.

this link will help you with the connection and query: http://www.sloppycode.net/sloppycode/Java/s56.php

i have only used netbeans, and to assign code to a button, i double click the button and it takes me to the code view method that executes when the button is pressed.

start hacking it out, then if you do get stuck, post very specific questions and the related code segmant. i'm sure you'lle find much more direct answers when you provide specific questions.

good luck
__________________
Mike
sde is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java refreshers needed, apply within creed Java 6 09-24-2004 09:46 AM
Starcraft/Warcraft 3 + HTML staff needed MEDIEVALDRAGON Lounge 4 08-13-2003 04:20 PM
more java help needed sno2dude Java 9 04-25-2003 04:21 PM
more help needed kashif Standard C, C++ 0 04-21-2003 11:30 AM
colo in L.A. area needed .. plz sde Lounge 1 12-21-2002 06:53 AM


All times are GMT -8. The time now is 01:24 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting