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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

An unhandled data type was encountered.

Status
Not open for further replies.

Mayoor

Programmer
Jan 16, 2004
198
GB
When trying to execute this code, specifically Response.Write(strCheckBoxSubscript) the following error is returned

Response object error 'ASP 0106 : 80020005'

Type Mismatch

/login/calendarchanges.ex.asp, line 0

An unhandled data type was encountered.

Code:
For vItem = 1 to Request.Form.Count            
		 if left(Request.Form.Key( vItem),3) = "fld" then
			strCheckBoxSubscript = Split( Request.Form.Key( vItem ), "_" )
			Response.Write(strCheckBoxSubscript) ' the problem lies here......
			Response.end

			aryParams( 0 ) = Array( "@PlayerID", VAR_INTEGER, PARAM_In, 4, session("PlayerId") )
			aryParams( 1 ) = Array( "@TournamentId", VAR_INTEGER, PARAM_In, 8, Request.Form("TournamentID_" & strCheckBoxSubscript))
			aryParams( 2 ) = Array( "@TournamentDetailID", VAR_INTEGER, PARAM_In, 4, Request.Form("TournamentDetailID_" & strCheckBoxSubscript))
			aryParams( 3 ) = Array( "@ChangeDate", VAR_VarChar, PARAM_In, 8, Request.Form("ChangeDate_" & strCheckBoxSubscript))
			aryParams( 4 ) = Array( "@TournamentChangeTypeID", VAR_VarChar, PARAM_In, 4, Request.Form("TournamentChangeTypeID_" & strCheckBoxSubscript))
  			Dba_ExecProcedureNonSelect "sp_InsertCalenderChangesViewed", aryParams, "baseline" 
			
		End if     	 
    Next
 
Any idea what it may be?

Any ideas appreciated!
 
Hi can you explain how it is an array?

the decalration in my code is as follows..

Code:
Dim vItem 
Dim strCheckBoxSubscript
Dim aryParams(4)
 
right all I want to do is hold the vlaue of what ever is on the right side of the "_" in the variable strCheckBoxSubscript.

Any ideas how I can do this without using the array on the right. I take what your getting at is the fact that the Split( Request.Form.Key( vItem ), "_" ) is of type array?

 
split will create an array. so the right hand side will be
Code:
strCheckBoxSubscript(1)
or
Code:
mid(Request.Form.Key( vItem ), instr(Request.Form.Key( vItem ),"_" ) +1)
or
Code:
right(Request.Form.Key( vItem ), len(Request.Form.Key( vItem ))- instr(Request.Form.Key( vItem ),"_" ))

take your pick

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top