I sended the same parameters in the
JSP file,I cought an error:
java.sql.SQLException: [Microsoft][SQLServer
JDBC Driver]No ResultSet set was produced.
It was no error in the main void when i uses the same parameters .
My database is sql server2000.
this is my procedure:
CREATE PROCEDURE InsertRecord
@tn varchar(20), -- TableName
@zn varchar(20), -- ID FieldName
@sn varchar(6000), -- FieldName Array
@sm varchar(6000) -- FieldValue Array
AS
begin transaction
declare @s varchar (8000)
if @tn='join' set @tn='[join]'
if (@sn='()')and(@sm='('''')') set @s='Insert Into '+@tn+' DEFAULT VALUES' else
set @s='Insert Into '+@tn+@sn+' values '+@sm
EXEC (@s)
set @s='Select Max('+@zn+') as maxid,xlid,gxrq from '+@tn
EXEC (@s)
commit transaction
GO
[ September 08, 2005: Message edited by: D JQ ]