By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,057 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,057 IT Pros & Developers. It's quick & easy.

End of parameter list expected. Cannot define parameters after a paramarray parameter

mafaisal
100+
P: 142
End of parameter list expected. Cannot define parameters after a paramarray parameter.

Public Sub F_Bind(ByVal StrSql As String, ByVal ParamArray Ctrls() As Object,Optional ByVal Row as Integer =0)


End sub

Please give soln for this error
Nov 26 '07 #1
Share this Question
Share on Google+
3 Replies


QVeen72
Expert 100+
P: 1,445
Hi,

If using ParamArray, it should be the Last Argument in the Procedure declarations.

Change the position of the "Row"
Something like this :
Expand|Select|Wrap|Line Numbers
  1. Public Sub F_Bind(ByVal StrSql As String, Optional ByVal Row as Integer =0, ByVal ParamArray Ctrls() As Object)
  2.  
  3. End sub
  4.  
Regards
Veena
Nov 26 '07 #2

mafaisal
100+
P: 142
Hi Thanx for Reply

I trying it but anither error is

Method cannot have both paramarray & optional parameter

so i think this not working

if any other sln ..?

Hi,

If using ParamArray, it should be the Last Argument in the Procedure declarations.

Change the position of the "Row"
Something like this :
Expand|Select|Wrap|Line Numbers
  1. Public Sub F_Bind(ByVal StrSql As String, Optional ByVal Row as Integer =0, ByVal ParamArray Ctrls() As Object)
  2.  
  3. End sub
  4.  
Regards
Veena
Jan 16 '08 #3

Expert 5K+
P: 8,434
Well, I think the answer is inherent in the message you were given. Method cannot have both paramarray & optional parameter. It sounds as though one of them will have to go.
Jan 16 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.