异常:
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]将截断字符串或二进制数据。
多半是由于段长度大小的问题,你插入的内容的长度大于该字段定义的长度
异常
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
检查你的数据库服务器有没有开启,端口是否占用,配置是否正确,其次看看下面的异常处理
"Error establishing socket" exception while connecting to the database
Symptom: while running a windows application that includes massive opening and closing of a connections to database server, "Error establishing socket" exception appears after a short time of execution.
Cause: This problem is caused by a lack of a reusable sockets on client machine, since each TCP/IP connection stays in the TIME_WAIT state when the connection is being closed. While a connection is in this state, the socket cannot be reused.
Resolution: do one of the following:
Increase the port range that is used for anonymous ports to approximately 20,000 ports (for example) by modifying the MaxUserPort registry key (this parameter controls the maximum port number that is used when an application requests any available user port from the system). Windows uses the conventional BSD range of 1024 to 5000 for its anonymous (ephemeral) port range. You can set only the upper bound of the ephemeral port range. To modify the MaxUserPort registry key, follow these steps:
Start Registry Editor (Regedt32.exe). Please note that you should backup your registry and any important files on your computer before editing the registry.
Locate the MaxUserPort key in the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
On the Edit menu, click Add Value, and then add the following registry value:
Value Name: MaxUserPort
Data Type: REG_DWORD
Value: 65534 (for example)
Valid Range: 5000-65534 (decimal)
Default: 0x1388 (5000 decimal)
Quit Registry Editor.
Change the timeout on the connections from 240 seconds (the default) to any length from 30 seconds to 300 seconds. Use the TcpTimedWaitDelay registry parameter to change this value. To do this, start Registry Editor (Regedt32.exe), locate the following key in the registry, and then modify the value HKEY_LOCAL_MACHINE\System\CurrectControlSet\services\Tcpip\Parameters (this parameter determines the length of time that a connection stays in the TIME_WAIT state when the connection is being closed. While a connection is in the TIME_WAIT state, the socket pair cannot be reused. For more information, see RFC 793):
Value Name:TcpTimedWaitDelay
Value Type: REG_DWORD-time in seconds
Valid Range: 30-300 (decimal)
Default: 0xF0 (240 decimal)
异常:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]将截断字符串或二进制数据。