How to Connect to Microsoft SQL Server in NetBeans IDE

Sdílet
Vložit
  • čas přidán 28. 12. 2020
  • Learn how to connect and manage databases of Microsoft SQL Server right inside NetBeans IDE using Database Services tool, so you don't have to use any external tools like Microsoft SQL Server Management Studio.
    In details, I'll share with you:
    - Download Microsoft SQL JDBC driver
    - Make connection to a SQL server database
    - Create a new table
    - View & Edit data in a table
    - Execute SQL statements
    Software programs:
    - Java Development Kit (JDK)
    - Apache NetBeans IDE
    - Microsoft SQL Server 2019 (Express edition)
  • Věda a technologie

Komentáře • 33

  • @pacoworld
    @pacoworld Před 3 lety +3

    I think you must also explain where do we get the values Host, Database and Instance Name 4:42

    • @CodeJava
      @CodeJava  Před 3 lety

      you're right. I forgot. Thanks for your valuable suggestion.

  • @stronk_doggo
    @stronk_doggo Před 3 lety +1

    Hello! I am getting this error: Cannot establish a connection to jdbc:sqlserver://{Host Name}\{Instance Name};databaseName=Sample using com.microsoft.sqlserver.jdbc.SQLServerDriver (Login failed for user 'user'. ClientConnectionId:{ID}). I'm new to MS SQL, what should I do? Thanks

  • @kL-ss5kc
    @kL-ss5kc Před 3 lety

    @Code Java
    I want to connect to a database Sql Server .
    Located on a server on a local network
    Not on an localhost
    how do I write ??

    • @CodeJava
      @CodeJava  Před 3 lety +1

      so you need to specify JDBC URL with SQL authentication. See this article for more details: www.codejava.net/java-se/jdbc/connect-to-microsoft-sql-server-via-jdbc

    • @kL-ss5kc
      @kL-ss5kc Před 3 lety

      @@CodeJava Thanks

  • @kslai7590
    @kslai7590 Před rokem

    Hello I'm getting this error "Timeout expired. IDE unable to establish connection. Check your proxy settings or try again later. The server may be unavailable at the moment. You may also want to make sure that your firewall is not blocking network traffic."

  • @madatmovies
    @madatmovies Před 3 lety

    I connect my SQL server to (local) host. How to do it?

    • @CodeJava
      @CodeJava  Před 3 lety

      did you follow the steps explained in this video?

  • @asapaska1
    @asapaska1 Před 2 lety +1

    I am getting error that TCP/IP connection to the host location failed
    Port is open in firewall and SQL is running

    • @CodeJava
      @CodeJava  Před 2 lety

      maybe you need to enable TCP for SQL server. Reference: www.ibm.com/docs/en/sss/3.1.1?topic=install-enabling-sql-server-express-communication-over-tcpip

    • @asapaska1
      @asapaska1 Před 2 lety +1

      @@CodeJava I figured it out. SQL Server Browser was turned off

    • @CodeJava
      @CodeJava  Před 2 lety

      @@asapaska1 great to hear that :)

  • @ilavarasansriraman4140
    @ilavarasansriraman4140 Před 3 lety +1

    Create tutorial on read PDF using java

    • @CodeJava
      @CodeJava  Před 3 lety +1

      I will consider. Could you give some example use cases?

    • @ilavarasansriraman4140
      @ilavarasansriraman4140 Před 3 lety

      @@CodeJava just read values from the pdf file using any java API.. And print those values in the console

    • @CodeJava
      @CodeJava  Před 3 lety +1

      @@ilavarasansriraman4140 okay, noted.

  • @tamhoangminh197
    @tamhoangminh197 Před 2 lety +1

    Are you Vietnamese?

    • @CodeJava
      @CodeJava  Před 2 lety +1

      Yes, I am.

    • @tamhoangminh197
      @tamhoangminh197 Před 2 lety

      @@CodeJava quầy, đồng hương bác ơi! Em đang bị gặp lỗi trong trường hợp này, bác có thể hộ trợ em với được không ạ, em thử két nối bằng tay cũng như dùng công cụ cũng không được ạ

    • @K1ethoang
      @K1ethoang Před 2 lety

      @@tamhoangminh197 bác fix đc chưa em cũng bị lỗi :((

    • @tamhoangminh197
      @tamhoangminh197 Před 2 lety +1

      @@K1ethoang chọn đúng ver driver phù hợp với ver của SQL bác

    • @K1ethoang
      @K1ethoang Před 2 lety

      @@tamhoangminh197 được rồi nè :) oimeoi em định cài lại win :))

  • @danielcisa107
    @danielcisa107 Před 2 lety

    Do we guess the SA user password ?

    • @CodeJava
      @CodeJava  Před 2 lety

      No, it's the password you set when installing SQL server.

  • @peddapudisnehalalitha2192

    Sir I getting such type of message
    Cannot establish a connection to jdbc:sqlserver://sqlsrv\sqlexpress;database name=EMS using com. Microsoft. sqlserver

    • @CodeJava
      @CodeJava  Před 3 lety

      is the SQL server running?

    • @peddapudisnehalalitha2192
      @peddapudisnehalalitha2192 Před 3 lety +1

      @@CodeJava yeah it's running I created database too but cannot establish connect in windows authentication