PDA

Click to See Complete Forum and Search --> : dll behaviour in database and ASP


Clunietp
May 2nd, 2000, 11:21 AM
Hi Lenin

Change this:
Public Function getItems(lCartID As Long) As ADODB.Recordset

To this:
Public Function getItems(ByVal lCartID As Long) As ADODB.Recordset

The reason is that you are passing a variant as a parameter, and if you use ByVal it will do the type conversion for you. If you don't use ByVal, it will not convert the variable, and you get a type mismatch

In case you care, it appears as though you are using a public connection variable in your VB component (you are calling a connect method, then you are getting the cart item). To properly utilize connection pooling, you should create the connection, do your stuff, then release the connection all in one method call.

enjoy

Tom