Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why I'm getting this error from ASP?
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Why I'm getting this error from ASP?
Divers
Thread ID:
00760164
Message ID:
00760164
Vues:
64
Hi everybody,

I'm getting this error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the varchar value 'Descript1' to a column of data type int.
/nadyatest/TestForm.asp, line 56

In my stored procedure I declared tcDescription as text. Right now I've tried varchar (8000) with the same result.

Here is ASP code:
    with cmd
        .ActiveConnection = dbConn
        .CommandText = "USP_Insert_ShoppingCartInfo"
        .CommandType = adCmdStoredProc        
        .CommandTimeout = 7200

        '@tcUserID  varchar(20),
        '@tnNumOfRecords int,
        '@tcDescription 	text,
        '@tcCreditCategory char(1),
	'@tcSelectionCriteria text,
        '@tcListOfCodes varchar(8000),
        '@tnCartID int OUTPUT       
        
        .Parameters.Append .CreateParameter("Return",adInteger,adParamReturnValue)  
      
        .Parameters.Append .CreateParameter("@tcUserID",adVarChar,adParamInput,20,CreditUserID) 
		
        .Parameters.Append .CreateParameter("@tnNumOfRecords",adInteger,adParamInput,,NumRecs) 
		
        .Parameters.Append .CreateParameter("@tcDescription",adChar,adParamInput,200,cStr(strDescription)) 
		
        .Parameters.Append .CreateParameter("@tcCreditCategory",adChar,adParamInput,1,CreditCategory) 
		
        .Parameters.Append .CreateParameter("@tcSelectionCriteria",adVarChar,adParamInput,8000,SelectionCriteria) 
		
        .Parameters.Append .CreateParameter("@tcListOfCodes",adVarChar,adParamInput,8000,ListOfCodes) 
		
' 7th parameter is Output parameter
        .Parameters.Append .CreateParameter("@tnCartId",adBigInt,adParamOutput, ,CartId)        
        .Execute recs, , adExecuteNoRecords
        retval = .Parameters(0)
        CartID = .Parameters(7)
    end with
        
    CloseCmd(cmd)
    CloseDBConn(dbConn)   
end function
I've tried several modifications with this line:
.Parameters.Append .CreateParameter("@tcDescription",adChar,adParamInput,200,cStr(strDescription))

trying to make it work, but it gives me this error for anything, I've tried. Do you see, what could be wrong?
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform