Questions tagged [sqlexception]

An exception that is thrown when the database driver encounters an error. This tag could be used for both C# `SqlExpection` and Java `SQLException`.

C#

SqlException is thrown when encounters a SQL Server related error.

SqlException is the class used by System.Data.SqlClient library to represent an error either communicating with, or generated by, SQL Server.

For errors that are generated by the SQL Server, the Number property will contain SQL Server's error number and Class contains the severity. If there was more than one error or warning returned by the server, then the details of the exception will be populated by the first error\warning and any other errors and warnings can be viewed in the Errors property.

For communication errors, the Message will contain the error details from the network provider and, with .Net 4.5 and above, the InnerException will contain the relevant Win32Exception.

For more information onSqlException, see its MSDN page

Java

An exception that provides information on a database access error or other errors, could be thrown by driver. See official javadoc for more details.

875 questions
-3
votes
1 answer

"If" and "ResultSet" code error: SQLExpection

Please help me. This code no error shows, but when it's run and finished it show error. This is my code: private void jBtn_UpdateActionPerformed(java.awt.event.ActionEvent evt { String user_id =…
Riz buddy
  • 11
  • 1
  • 5
-3
votes
2 answers

Error show java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0)

I have three table 1.User 2.Branch 3 userbranch. I have trying to solve login form. but when login button is click it's show this error java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0). public Boolean…
Snahar
  • 1
  • 4
-4
votes
1 answer

Exception insert record to SQL Server in C# by stored procedure

I'm trying to insert a supplier to SQL Server but it always throws an exception on the line cmd.ExecuteNonQuery(). Really need some help!
Lam
  • 15
  • 2
-5
votes
1 answer

SQL Server with C#

I am writing a program that connects to a SQL Server (IGOR-PC - SQL Server 10.50.4044 - instance Igor-PC\Igor) The code is this: SqlConnection myConnection = newSqlConnection("Server=.\\Igor;Database=Prueba"); myConnection.Open(); But I get this…
yerena.jon
  • 11
  • 3
1 2 3
58
59