Results 1 to 5 of 5
  1. #1
    Ravi Ranjan is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

    Post Datadase connection

    I have database table of Login module into Access and into Sql server 2005.
    I don't know how to connect the datadase with netbeans.
    So, any one let me know the steps of datadase connection either in sqlserver or in Access.

  2. #2
    satti is offline Member
    Join Date
    Mar 2009
    Posts
    31
    Rep Power
    0

    Default

    try on netbeans ide its may help u.i poste some msg its may help u


    To connect to a database you first need to do the following:
    Confirm that a JDBC driver for your database is registered with the IDE. The registered JDBC drivers are visible under the Drivers node in the Services window.
    Create a database connection for the database. A database connection is represented by a database connection node (* *) under the Databases node in the Services window.
    When you create a database connection, you supply the details needed to connect to a specific database. The details needed to connect to a database include the location of the database, which driver to use and the username and password information.
    After you create the database connection you can do the following:
    Disconnect and reconnect to the database
    Browse the database structure
    View data contained in a table in the database
    To create a new connection:
    Confirm that your database is running.
    In the Services window, confirm that the appropriate JDBC driver for your database is listed under the Drivers node.
    Right-click the Databases node and choose New Connection.
    Alternatively, expand the Drivers node, right-click your driver's instance node and choose Connect Using.
    In the New Database Connection dialog box, confirm that the correct driver is selected in the Driver field.
    Provide the JDBC database URL for the database connection in the Database URL field.
    This URL typically begins with jdbc:and a short code name for the driver, followed by another colon. The rest of the URL depends on the type of driver you are using. For example, you might need to specify a host and port; alternatively, the name of a database file might suffice, or an ODBC DSN. For MySQL, the Database URL might look as follows:
    jdbc:mysql://localhost:3306/mydatabase
    To help you get started, the IDE provides templates for the correct URL format for the most common drivers. If in doubt, refer to the documentation for the driver that you are using.
    Provide the user name and password, if required by your database configuration.
    Click the Remember Password checkbox to have the IDE remember your password.
    If selected, you will not be prompted for the user name and password on subsequent connections to the database. To change this property, right-click the database connection node in the Services window and choose Properties and unselect the Remember Password property in the Properties window.
    Click OK to create the database connection and connect to the database from the IDE.
    When connecting to the database, the schema with the same name as the user name is set as default, but if a schema with that name does not exist, you are automatically switched to the Advanced Tab of the Connect dialog box to select a schema.
    If the connection is successful, the database connection node appears as a subnode of the Databases node. The database connection node appears whole (* *) indicating the database is connected. When the database is connected, you can expand the database connection node to see the child folders representing lists of tables, views and procedures. For more, see Browsing Structures.
    If the connection attempt fails, the IDE displays a dialog box indicating it was unable to add the connection. Check the connection information for the database in the New Database Connection dialog box.

    To disconnect from the database:
    Right-click the database connection node and choose Disconnect.
    You cannot browse the database until you reconnect to the database.
    never never give up until successed

  3. #3
    satti is offline Member
    Join Date
    Mar 2009
    Posts
    31
    Rep Power
    0

    Default

    but its for mysql you may use to sql server
    never never give up until successed

  4. #4
    marcellis is offline Member
    Join Date
    Sep 2009
    Posts
    12
    Rep Power
    0

    Default

    Look at mine tuturial on www java-task com.
    In taks one I explain how to make a database connection

  5. #5
    raqman is offline Member
    Join Date
    Sep 2009
    Posts
    37
    Rep Power
    0

    Default

    Open NetBeans. Under Services tab open/expand Databases. Right-click on Databases and select New Connection. New Database Connection window opens.
    Beside Name select the type of database driver you are using for your connection.
    For Database_Url type the Url used for the particular database you are using, for instance MySQL uses jdbc:mysql://<HOST>:<PORT>/<DB>, host=localhost, port=3306, DB=nameofyourdatabase. Then type the username and password that you use to start your SQL server. Thats all you need.
    RAQ Report: free Java reporting tool.

Similar Threads

  1. Unable to get connection
    By chennee72 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 09-24-2008, 02:33 AM
  2. connection problem
    By subash in forum JDBC
    Replies: 5
    Last Post: 04-22-2008, 09:17 AM
  3. no connection
    By even in forum JDBC
    Replies: 15
    Last Post: 01-02-2008, 01:50 PM
  4. JDBC connection
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-10-2007, 07:39 PM
  5. connection pool for db2
    By paty in forum JDBC
    Replies: 1
    Last Post: 08-06-2007, 02:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •