From a .NET 3.5 / C# app, I would like to catch SqlException but only if it is caused by deadlocks on a SQL Server 2008 instance.
Typical error message is Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Yet, it does not seem to be a do...
I am getting an SqlException in the logs of .NET 3.5 app, I am looking for the corresponding number (value of the property SqlException.Number).
System.Data.SqlClient.SqlException: A transport-level error has occurred
when receiving results from the server. (provider: TCP Provider, error: 0
- The specified network name is no longer av...
Hi,
i am getting this(java.sql.SQLException: [NCR][Teradata JDBC Driver]: addBatch not supported) error while trying to execute a query in my application.
i am using addBatch with preparedstatement for constructing the statement and using executeBatch for executing the query.
Cant we use addBatch with preparedStatement for Teradata DB...
in DB2 while executing a query i got
SqlException: DB2 SQL Error: SQLCODE=-668, SQLSTATE=57016
does someone knows what this code means?
...
I am writing a stored procedure where i m using try catch block.
Now i have a unique column in a table. When i try to insert duplicate value it throws exception with exception no 2627.
I want this to be done like this
if (exists(select * from tblABC where col1='value')=true)
raiseError(2627)--raise system error that would have thrown...
Hi All,
I would like to store "2010-03-26 10:13:04 Etc/GMT" value in column of type datetime.
when i try to insert it i got exception
SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10:13:04 Etc/GMT', at line 1
how to insert data tim...
I've recently encountered the error:
System.Data.SqlClient.SqlException:
The transaction log for database
'mydatabase' is full. To find out why
space in the log cannot be reused, see
the log_reuse_wait_desc column in
sys.databases
on one of my windows services. It's supposed to retry after catching an Sql Exception, wha...
HI I am getting this exception when I am calling any stored procedure from my J2EE app.
Exception while calling stored procedure :Bigger type length than Maximum
I am having Oracle 9.1.0.7, JDK1.4 and using ojdbc14.jar running on Weblogic 8.1
Please advise what could be the root cause ?
Below is the manifest of my ojdbc14.jar
...
I am trying some SQL code but I get an error when I try this code.
Main.database.ExecuteCommand("UPDATE Contacts SET first_name='" + c.first_name + _
"', middle='" + c.middle + _
"', last_name='" + c.last_name + _
"', age='" + c.age + _
...
I am using JDBC to connect to my microsoft access database.
I get the following exception when I try to connect to the database:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
I am using 64bit windows7, and I am using eclipse which is al...
java.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
I get the following error when I try to connect to my Microsoft Access database from an eclipse project using jdbc.
I am using 64bit windows and microsoft office 2007.
any help on this matt...
Hello stackers,
I've got a logger that records exception information for our in house applications.
When we log SQL exceptions it'd be super useful if we could see the actual query that caused the exception.
Is there a way we can achieve this?
...
A little background:
I have a Windows .NET application that is in use by approximately 40 field employees across North America. This program allows the users to enter data while in the field (away form internet access) and then synchronizes to our Sql Server 2005 database at night. A couple days ago, two of my users reported getting t...
Hello,
I want to backup my database using Linq to SQL:
Dim sql As String = "BACKUP DATABASE SeaCowDatabase TO DISK = _
'" + sfd.FileName + "'"
db.ExecuteCommand(sql)
But instead, I get this error:
System.Data.SqlClient.SqlException (0x80131904): Could not locate entry in sysdatabases for database 'SeaCowDatabase'. No entry fo...
A TransactionInDoubtException is being thrown, the cause is a SQLException due to a SQL Timeout. But I don't understand the connection.
Any tips on how to make the create a SQLException for a timeout appreciated too.
How can a SQLException cause a TransactionInDoubtException? Is it because the TransactionManager has DB stuff to close b...
What is the difference between SqlException and SqlExecutionException?
I understand that SqlException is an exception (or warning) thrown by SqlServer itself.
But in what cases the SqlExecutionException is thrown?
Why it is defined under System.Web.Management namespace?
...
I've been looking this over for a while now and can't seem to pinpoint the problem.
Does anything stand out that would cause a java.sql.SQLException: No data found
ResultSet rs = null;
rs = s.executeQuery("SELECT * FROM customer");
out.println("<tr><th>Customer ID</th><th>First Name</th> </th></tr>");
while(rs.next()) {
ou...
Hi
Could someone help me understand that why am I getting the following error when I am trying to persist ServiceProvider entity?
java.sql.SQLException: Cannot add or update a child row: a foreign key constraint fails (`springmvc/businesslocation`, CONSTRAINT `FK5CB747B5A26ED80E` FOREIGN KEY (`state_id`) REFERENCES `state` (`id`))
at ...
We have two nodes in a cluster. Both run an ASP.NET web application that connects to a database on another server. Node1 has no problems, but Node2 throws SqlExceptions, stating there's a timeout. The stacktrace shows me it's on DbConnectionPool.GetConnection.
I checked the versions of our DLLs, the web.config files, the connection stri...