Announcement

Collapse
No announcement yet.

Connect to DB with JDBC

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Connect to DB with JDBC

    Does anyone know how to connect to their mysql db with JDBC? I'm looking for a basic construct of the connection string.

    #2
    If you google it, you would find a lot of examples. But why do you need it? Do you want to connect to a vB database using Java? Why don't you just call the vB API instead of directly connecting to the vB database?
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #3
      I prefer to use JDBC but was getting an error trying to connect.

      Comment


        #4
        Why would you prefer that? Accessing the vB database directly outside vBulletin is dangerous and not recommended for the following reasons:
        1. You would have to store and maintain the database credentials outside vBulletin in that extenal application.
        2. It bypasses the permission checks done by vB before allowing the data to be written or read to and from the database.
        3. Modifying the database directly may break the database and thus the site.
        4. When inserting data into the database, it may insert data into multiple tables and trigger other process. For example, saving a post will insert the data into the node table, closure table and other tables. And then read another table for getting the subscibers to the topic and then send them PM/email notifications that a new post was submitted to the topic. You will have to duplicate the same logic/process that's already coded in vBulletin and do the same things in the external application. You're basically reinventing the wheel.
        Helpful? Donate. Thanks!
        Buy me a coffeePayPal QR Code
        Fast VPS Host for vBulletin:
        A2 Hosting & IONOS

        Comment


        • rnedelkow
          rnedelkow commented
          Editing a comment
          Thanks for sharing that Glenn. It's primarily a read-only project but this is something I'll keep in mind. Thanks again.

        • glennrocksvb
          glennrocksvb commented
          Editing a comment
          Just use the API to read the data. I have a link to the API documentation in the Useful Links module on home page.

        • rnedelkow
          rnedelkow commented
          Editing a comment
          Thank you.

      Users Viewing This Page

      Collapse

      There is 1 user viewing this forum topic.

      • Guest Guest

      Latest Posts

      Collapse

      Working...
      X
      Searching...Please wait.
      An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

      Please push the back button and reload the previous window.'
      An unexpected error was returned: 'Your submission could not be processed because the token has expired.

      Please push the back button and reload the previous window.'
      An internal error has occurred and the module cannot be displayed.
      There are no results that meet this criteria.
      Search Result for "|||"