NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Connecting to database from my form

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
ronkeofe



Joined: 15 Feb 2010
Posts: 14
Location: Ile-Ife

PostPosted: Fri Feb 26, 2010 9:20 am    Post subject: Connecting to database from my form Reply with quote

I have a button on my form. I want the button to connect to the database whenever the button is clicked. I am using the MySQL database embedded inside of NetBeans 6.8 version. Please how do i go about this?
I am new to JAVA and offcourse to Netbeans.
Thank you for your anticipated support. Looking forward to read form you soon. Thank you.
Back to top
scholarz247



Joined: 26 Feb 2010
Posts: 3

PostPosted: Fri Feb 26, 2010 10:39 am    Post subject: Reply with quote

I have the same problem. I want to add the value of a variable to the database using a jButton. How can I do this in Netbeans?
Back to top
ronkeofe



Joined: 15 Feb 2010
Posts: 14
Location: Ile-Ife

PostPosted: Fri Feb 26, 2010 12:01 pm    Post subject: Reply with quote

Hi Scholar,
I'm also new to Netbeans. I'm certain that first of all a connection to the database needs to be estabilshed. Afterwards, an insertion or update SQL stmt might be necessary.(depending on wat u want to do can suffice). I do hope someone will answer our questions.
Thanks
Back to top
scholarz247



Joined: 26 Feb 2010
Posts: 3

PostPosted: Sun Feb 28, 2010 6:35 am    Post subject: Reply with quote

I used to create simple programs using Netbeans, but I'm having troubles in using databases. This one is urgent, I also hope someone will answer this question.
I would greatly appreciate any help.
Oh, by the way, I'm using JavaDB for my database.
Back to top
aberryjr



Joined: 07 Feb 2010
Posts: 62
Location: chicago

PostPosted: Sun Feb 28, 2010 6:26 pm    Post subject: Connecting to database from my form Reply with quote

There are tutorials on the netbeans.org website which have sample code that you can download.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo