Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Actual SQL Stmt's character type size submitted to SQL is 8000?

Status
Not open for further replies.

sobeit

Programmer
Sep 11, 2000
38
US
First of all, forget for this simple question but I have no idea why the data type size of the SQL Statement being passed from the Microsoft JDBC Driver to SQL Server is different than what it should be. I have the following java codes:

PreparedStatement updateTemplate = con.prepareStatement
("UPDATE db2inst1.TEMPLATE SET Template_Name = ? WHERE Template_sk = ? ");
updateTemplate.setString(1, "TEST3 ");
updateTemplate.setString(2, "a");
updateTemplate.executeUpdate();

AND THE SQL Statement i am seeingin SQL Server tracer is:
declare @P1 int
set @P1=1
exec sp_prepexec @P1 output, N'@P1 char(8000),@P2 char(8000)', N'UPDATE db2inst1.TEMPLATE SET Template_Name = @P1 WHERE Template_sk = @P2 ', 'TEST3','a'

Why are parameters set to char(8000)?

Thanks for your time.
 
That's probably a question for the SQL Server forum

-pete
I just can't seem to get back my IntelliSense
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top