-->
-->
Microsoft will not be happy to see this headline. But to be honest, in business applications, there are few companies that really use Microsoft's com.microsoft.jdbc.sqlserver.sqlserverDriver.
In fact, it is also a chance to find out the lack of Microsoft drive. In a single porting application, the system reported errors such as [microsoft][sqlserver JDBC Driver]resultset can not re-read row data for column. To resolve this error, the tracker was busy for most of the day and did not identify the problem. Can only be determined in the rs.getstring ("XXX") when there must be errors (RS for ResultSet object). So now simulate the following environment:
database table: TestTable
Table fields and types:
GUID char (38)
Title varchar (100)
Content Text
Username varchar (20)
Query SQL statements:
Select Guid,username,content,title from testtable where
Java code:
Rs.getstring ("GUID");
Rs.getbinarystream ("content");
Rs.getstring ("username");
-----------------------------------------------------------
The above code, very not honored to be. Using the driver of Microsoft, it will certainly be an error (that is, the mistake mentioned above). If you follow it, it must be this line: rs.getstring ("username") throws an error.
So, what if you put rs.getstring ("username") and Rs.getbinarystream ("content"); The result is that you can run normally.
Why does this happen because Microsoft drives a field that contains a BLOB or CLOB type (that is, image and text type). Then you must query in the Select order and do not support duplicate queries.