Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
ASP Question - Why can't I pass a function parameter by name?
I have developed a server side DLL to create disconnected recordsets for an ASP application. In this DLL I have created a class for each of my SQL database tables. For each class I have created a LIST, ADD, EDIT, and DELETE method. The arguments for these methods are Optional. I made these arguments optional so that I do not necessarily have to pass data to the class method when I want to return results. My problem:
I have done all of this planning to make this simple middle tier data access method, but ASP does not seem to allow me to explicitly name arguments in Object methods.
------------- Example --------------
I have a method(ADD) of a class(USER) in the DLL:
Public Function Add(us_user_id, Optional us_username, Optional us_password) As Long
Then in the ASP page I instantiate the object and call the method:
lngResult = objUser.Add(intUserID,strUsername,strPassword)
-----Does not work
lngResult = objUser.Add(us_user_id:= intUserID, us_username:= strUsername, us_password:= strPassword)
Anyone have any idea why this does not work in ASP? Is it just not supported? Any help would be greatly appreciated.
0 · ·