Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    8

    Unanswered: ADO Command Call Stored return "Type Name is invalid"

    Hi all,
    I have a stored like this

    CREATE PROCEDURE fts_insert_service_tasks( @status_no int output, @status_text nvarchar(255) output, @fts_employee char(100) , @fts_SCCode bigint, @fts_TaskDescription ntext) AS

    declare @str_err nvarchar(255)
    declare @err_no int

    set @err_no=0

    if ( isnumeric(@fts_SCCode) = 0 )
    begin
    set @str_err ='The fts Sccode is not a number'
    set @status_text = @str_err
    set @err_no=@err_no+1
    return
    end

    if ( @fts_SCCode = '' )
    begin
    set @str_err ='The fts Sccode can not be null '
    set @status_text = @str_err
    set @err_no=@err_no+1
    return
    end


    if ( len(@fts_employee) > 100)
    begin
    set @str_err ='Maximum Employee length allowed is 100 characters'
    set @status_text = @str_err
    set @err_no=@err_no+1
    return
    end


    if ( @fts_employee = '' )
    begin
    set @str_err ='The employee fiedl can not be null'
    set @status_text = @str_err
    set @err_no=@err_no+1
    return
    end

    if (@err_no=0)
    begin

    INSERT INTO fts_ServiceTasks (fts_employee , fts_Sccode, fts_taskdescription)
    VALUES(@fts_employee, @fts_SCCode, @fts_taskdescription)

    set @status_no=0
    set @status_text = 'Add Service Task Ok'
    end

    else

    begin
    set @status_no=@err_no
    set @status_text = @str_err
    end
    GO


    and I called it from the ASP

    <%function Add_Service_Task(fts_employee,fts_sccode, fts_TaskDescription)
    cm.ActiveConnection = m_conn
    cm.CommandType = 4
    cm.CommandText = "fts_insert_service_tasks"
    cm.Parameters.refresh
    cm.Parameters(3).Value = fts_employee
    cm.Parameters(4).Value = fts_sccode
    cm.Parameters(5).Value = fts_TaskDescription
    on error resume next
    cm.Execute
    if cm.Parameters(1)=0 then
    exec_command=cm.Parameters(2).Value
    else
    call obj_utils.ErrMsg(cm.Parameters(2).Value,3000)
    Response.End
    end if
    if err.number <> 0 then
    call obj_utils.ErrMsg("System error at " & err.number & err.Description & ", please contact the administrator", 5000)
    Response.End
    end if
    Add_Service_Task=exec_command
    end function%>


    I test with SQL 2k, Win2k3 OK
    But with Win2k i got:

    Error Type:
    Microsoft OLE DB Provider for SQL Server (0x80040E30)
    Type name is invalid.
    /fmits/classes/cls_servicecall.asp, line 256


    Please help me!

  2. #2
    Join Date
    Apr 2003
    Location
    Washington DC area
    Posts
    1,770

    Wink ADO Command Call Stored return "Type Name is invalid"

    Try testing it again with the query analyzer

  3. #3
    Join Date
    Apr 2004
    Posts
    8
    The problem is I can't test directly from the win2k server. So, I think this is a bug of ADO

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •