Re: No TDS_RET_STATUS was found



Joe,

My driver version is 1.0.809.102, are you running SP1 CTP? Curious if that
would make the difference. Plus are you running MSSQL 2005?

-Chris

"Joe Weinstein" wrote:



Hi CHris. I tried to duplicate the problem as couldn't.
Below is the standalone program I made. I get:

C:\new_ms_driver_3>java foo
Driver version is 1.1.1320.0
executing first time...
handled an update count of -1
first run returns 0
How many rows did we insert into SEQUENCE2? 0
How many rows did we insert into test2? 0
How many rows did we insert into DOC2? 0
executing second time...
handled an update count of -1
second run returns 0


If you can look it over and hack it to try it?
I did alter the procedure a little, but it
ran the same without the alteration...
thanks,
Joe Weinstein at BEA Systems

import java.sql.*;
import java.util.*;

public class foo
{
public static void main(String args[])
throws Exception
{
String createTabs =
"create table #SEQUENCE2 (set_type varchar(30), sequence_no int)"
+ " "
+ " create table #test2"
+ " ("
+ " test_code varchar(16),"
+ " [description] varchar(256),"
+ " code_type_ind int,"
+ " parent_code varchar(16),"
+ " ref_method varchar(25),"
+ " class varchar(10),"
+ " duration int,"
+ " tolerance varchar(100),"
+ " cap1 int,"
+ " cap2 int,"
+ " cap3 int,"
+ " eff_date datetime,"
+ " status_ind int,"
+ " approval_code varchar(10),"
+ " hold_code varchar(10),"
+ " owner_code varchar(10),"
+ " group_code varchar(10),"
+ " owner_security int,"
+ " group_security int,"
+ " role_security int,"
+ " creation_date datetime,"
+ " created_by varchar(20),"
+ " modify_date datetime,"
+ " modify_by varchar(20),"
+ " logical_delete smallint,"
+ " c_question_no int,"
+ " c_scope varchar(50),"
+ " c_delivery varchar(50),"
+ " c_nerac_reqdate datetime,"
+ " doc_id int"
+ " )"
+ " "
+ " create table #DOC2(doc_id int, function_code varchar(30),"
+ " text_data ntext, attch_cnt int, attch_type int)"
+ " ";


String proc =
" CREATE PROCEDURE usp_test_add_joe"
+ " ("
+ " @request_date varchar(20),"
+ " @question_nbr varchar(20),"
+ " @hit_scope varchar(50),"
+ " @description varchar(255),"
+ " @doc_path varchar(255)"
+ " )"
+ " AS"
+ " "
+ " DECLARE "
+ " @test_code varchar(16),"
+ " @code_type_ind int,"
+ " @parent_code varchar(16),"
+ " @ref_method varchar(25),"
+ " @class varchar(10),"
+ " @duration int,"
+ " @tolerance varchar(100),"
+ " @cap1 int,"
+ " @cap2 int,"
+ " @cap3 int,"
+ " @eff_date datetime,"
+ " @doc_id int,"
+ " @status_ind int,"
+ " @approval_code varchar(10),"
+ " @hold_code varchar(10),"
+ " @owner_code varchar(10),"
+ " @group_code varchar(10),"
+ " @owner_security int,"
+ " @group_security int,"
+ " @role_security int,"
+ " @creation_date datetime,"
+ " @created_by varchar(20),"
+ " @modify_date datetime,"
+ " @modify_by varchar(20),"
+ " @logical_delete smallint,"
+ " @delivery varchar(25),"
+ " @nerac_reqdate datetime,"
+ " @attch_cnt smallint,"
+ " @text_ptr varbinary(16),"
+ " @sequence_nbr int,"
+ " @len int,"
+ " @test_suffix varchar(6),"
+ " @str_suffix varchar(6),"
+ " @new_test char(1),"
+ " @new_test_int int,"
+ " @text_data varchar(1000),"
+ " @return_code smallint"
+ " "
+ " "
+ " -- INIT DEFAULT VALUES"
+ " "
+ " "
+ " SET @code_type_ind = 0"
+ " SET @parent_code = ''"
+ " SET @ref_method = ''"
+ " SET @class = 'TEST'"
+ " SET @duration = 0"
+ " SET @tolerance = ''"
+ " SET @cap1 = 0"
+ " SET @cap2 = 0"
+ " SET @cap3 = 0"
+ " SET @eff_date = CONVERT(datetime, @request_date)"
+ " SET @status_ind = 0"
+ " SET @approval_code = 'NONE'"
+ " SET @hold_code = ''"
+ " SET @owner_code = 'USER'"
+ " SET @group_code = 'VMO'"
+ " SET @owner_security = 15"
+ " SET @group_security = 7"
+ " SET @role_security = 3"
+ " SET @creation_date = @eff_date"
+ " SET @created_by = 'TEST'"
+ " SET @modify_date = GETDATE()"
+ " SET @modify_by = 'TEST'"
+ " SET @logical_delete = 0"
+ " SET @delivery = 'EMAIL'"
+ " SET @nerac_reqdate = @eff_date"
+ " SET @return_code = 0"
+ " SET @new_test = 'Y'"
+ " "
+ " "
+ " "
+ " SET @new_test_int = (SELECT count(*) "
+ " FROM TEST2 "
+ " WHERE c_question_no = @question_nbr) "
+ " if (new_test_int > 0) SET @new_test = 'N'"
+ " "
+ " "
+ " BEGIN TRAN"
+ " "
+ " "
+ " "
+ " IF @new_test = 'Y'"
+ " BEGIN"
+ " SELECT @sequence_nbr = ISNULL(sequence_no,0)"
+ " FROM #SEQUENCE2 WHERE set_type = 'TEST'"
+ " "
+ " IF @sequence_nbr = 0"
+ " INSERT INTO #SEQUENCE2 (set_type, sequence_no) VALUES ('TEST', 0)"
+ " "
+ " "
+ " SET @sequence_nbr = @sequence_nbr + 1"
+ " "
+ " "
+ " IF @@ERROR != 0 AND @return_code = 0"
+ " SET @return_code = 1"
+ " "
+ " "
+ " SET @test_suffix = CONVERT(varchar(6), @sequence_nbr)"
+ " "
+ " "
+ " "
+ " IF LEN(@test_suffix) < 6"
+ " BEGIN"
+ " SET @len = 6 - LEN(@test_suffix)"
+ " SET @str_suffix = SUBSTRING('000000', 1, @len) + @test_suffix"
+ " SET @test_code = 'TEST-' + @str_suffix"
+ " END"
+ " "
+ " "
+ " "
+ " SELECT @doc_id = sequence_no"
+ " FROM sequence2"
+ " WHERE set_type = 'DOCUMENT'"
+ " "
+ " "
+ " "
+ " SET @doc_id = @doc_id + 1"
+ " "
+ " "
+ " "
+ " INSERT INTO #test2"
+ " (test_code, [description], code_type_ind, parent_code,"
+ " ref_method, class, duration, tolerance, cap1, cap2, cap3,"
+ " eff_date, status_ind, approval_code, hold_code, owner_code,"
+ " group_code, owner_security, group_security, role_security,"
+ " creation_date, created_by, modify_date, modify_by,"
+ " logical_delete, c_question_no, c_scope, c_delivery,"
+ " c_nerac_reqdate, doc_id)"
+ " VALUES"
+ " (@test_code, @description, @code_type_ind, @parent_code,"
+ " @ref_method, @class, @duration, @tolerance, @cap1, @cap2, @cap3,"
+ " @eff_date, @status_ind, @approval_code, @hold_code, @owner_code,"
+ " @group_code, @owner_security, @group_security, @role_security,"
+ " @creation_date, @created_by, @modify_date, @modify_by,"
+ " @logical_delete, @question_nbr, @hit_scope, @delivery,"
+ " @nerac_reqdate, @doc_id)"
+ " "
+ " "
+ " "
+ " IF @@ERROR != 0 AND @return_code = 0"
+ " SET @return_code = 2"
+ " "
+ " "
+ " "
+ " SET @text_data = 'If you would like the URL (internet address) for any links found
**' + @doc_path"
+ " "
+ " "
+ " INSERT INTO #DOC2"
+ " (doc_id, function_code, text_data, attch_cnt, attch_type)"
+ " VALUES"
+ " (@doc_id, 'NOTE', CONVERT(ntext, @text_data), 1, 3)"
+ " "
+ " "
+ " "
+ " IF @@ERROR != 0 AND @return_code = 0"
+ " SET @return_code = 3"
+ " "
+ " "
+ " "
+ " UPDATE sequence2 SET sequence_no = @sequence_nbr"
+ " WHERE set_type = 'TEST'"
+ " "
+ " "
+ " "
+ " IF @@ERROR != 0 AND @return_code = 0"
+ " SET @return_code = 4"
+ " "
+ " "
+ " "
+ " UPDATE sequence2 SET sequence_no = @doc_id"
+ " WHERE set_type = 'DOCUMENT'"
+ " "
+ " "
+ " "
+ " IF @@ERROR != 0 AND @return_code = 0"
+ " SET @return_code = 5"
+ " "
+ " "
+ " "
+ " END"
+ " ELSE"
+ " BEGIN"
+ " SELECT @doc_id = doc_id"
+ " FROM #test2"
+ " WHERE c_question_no = @question_nbr"
+ " "
+ " "
+ " SET @text_data = '|' + @doc_path"
+ " "
+ " "
+ " "
+ " SELECT @text_ptr = TEXTPTR(text_data), @len = (DATALENGTH(text_data) / 2),"
+ " @attch_cnt = attch_cnt"
+ " FROM doc2 WHERE doc_id = @doc_id"
+ " "
+ " "
+ " "
+ " UPDATETEXT doc2.text_data @text_ptr @len 0 @text_data"
+ " "
+ " "
+ " "
+ " IF @@ERROR != 0 AND @return_code = 0"
+ " SET @return_code = 6"
+ " "
+ " "
+ " "
+ " SET @attch_cnt = @attch_cnt + 1"
+ " "
+ " "
+ " "
+ " UPDATE doc2 SET attch_cnt = @attch_cnt"
+ " WHERE doc_id = @doc_id"
+ " "
.



Relevant Pages

  • [git patches] IDE updates part #5
    ... Palmchip BK3710 IDE driver ... int stat, err, sense_key; ... + * After each failed packet command we issue a request sense command and retry ...
    (Linux-Kernel)
  • [git patches] net driver updates for .26
    ... Fix a bug where the pointer never moves for dma_unmap... ... Update and fix driver debugging messages ... int reset); ... * header structure can be anywhere in the mcp. ...
    (Linux-Kernel)
  • [RFC/PATCH] Winbond CIR driver for the WPCD376I chip (ACPI/PNP id WEC1022)
    ... The driver currently supports receiving IR commands and wake from sleep/power-off. ... The input syscalls all seem to use an int for the scancode (which will be at least 32 bits on any platform which has ... unsigned int last_keycode; ... goto set_timer; ...
    (Linux-Kernel)
  • [git patches v2] net driver updates for 2.6.29
    ... sfc: Correct address of gPXE boot configuration in EEPROM ... bonding: Fix ALB mode to balance traffic on VLANs ... SMSC LAN911x and LAN921x vendor driver ... module_param(updelay, int, 0); ...
    (Linux-Kernel)
  • [PATCH 196/196] Driver core: coding style fixes
    ... extern int system_bus_init; ... struct klist_iter i; ... struct device *dev; ... * We iterate over each driver that belongs to @bus, ...
    (Linux-Kernel)

Loading