I'd like to execute a stored procedure on SQL server 2005 through the com.ms.jdbc.odbc.JdbcOdbcDriver driver but i get an error message:
"[Microsoft][ODBC SQL Server Driver]00107002COUNT mez vagy szintaktikai hiba"
On SQL server 2000 it works.
Best regards,
Ferenc

ODBC error message: [Microsoft][ODBC SQL Server Driver]00107002COUNT
energium
It will be great if you can post us small reproducible code snippet of stored procedure and the program which invokes stored procedure. Please keep code as small as posssible:)
Thanks,
Varun
Mr. Boogie
Does the stored procedure give correct result when invoked from SQL server interface itself
Ulf Lagerb
maverick786us
There is a small function:
public static void test()
{
try
{
Class.forName( "com.ms.jdbc.odbc.JdbcOdbcDriver" );
java.sql.Connection cn = java.sql.DriverManager.getConnection(
"JDBC:ODBC:driver={SQLServer};SERVER=(local);DATABASE=master;UID=sa;PWD=" );
DatabaseMetaData dbmd = cn.getMetaData();
ResultSet rs = dbmd.getProcedureColumns( null, "%", "sp_addserver", "%" );
while( rs.next() )
{
System.out.println(rs.getString("COLUMN_NAME"));
}
cn.close();
}
catch( System.Exception ex )
{
}
}
Output on SQL 2000 is:
@RETURN_VALUE
@server
@local
@duplicate_ok
But output on SQL 2005 is:
@server
@local
@duplicate_ok
On SQL 2005, the DatabaseMetaData object's getProcedureColumns method's result set not contains the @RETURN_VALUE column.
Best regards,
Ferenc