473,325 Members | 2,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

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

mafaisal
142 100+
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
3 2962
QVeen72
1,445 Expert 1GB
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
142 100+
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
Killer42
8,435 Expert 8TB
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

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

Similar topics

21
by: Marc DVer | last post by:
I am trying to create a query that can be loaded as a querydef object but not having to assign values to the parameters if I don't want to. Normally when using a parameter query in VBA my code...
5
by: Andy G | last post by:
I am getting an error when I try to call my stored procedure. Exception adding account. Procedure 'stpCFSPH_CM_RGST_USER' expects parameter '@USER_DESCR', which was not supplied. I have a radio...
7
by: Richard Grant | last post by:
Hi. In c/C++ i can pass the address of a subroutine to another subroutine as an actual parameter How do I do that in VB .NET What should be the syntax for a parameter to receive the address of a...
4
by: Rob Nicholson | last post by:
Consider the following example class: Public Class ExampleClass ReadOnly Property HelloWorld() As String Get Return "Hello, World" End Get End Property End Class
13
by: P | last post by:
Hi, I'm trying to acquire the parameter MAX_CONNECTIONS by using the API. The following is the code segment I used: struct sqlfupd paramItem; paramItem.token = SQLF_DBTN_MAX_CONNECTIONS;...
8
by: Alec MacLean | last post by:
Hi, I'm using the DAAB Ent Lib (Jan 2006) for .NET 2.0, with VS 2005 Pro. My project is a Web app project (using the WAP add in). Background: I'm creating a survey system for our company, for...
7
by: ashtek | last post by:
Hi, I have a generic function that executes a stored procedure & returns a data table. Code: === public static DataTable ExecuteStoredProcedure(string strProc,SqlParameter paramArray) {...
6
by: HillBilly | last post by:
One question I have not figured out is how to learn which event parameter list is supported by a control? EventArgs, CommandEventArgs, what?
7
by: jamesclose | last post by:
My problem is this (apologies if this is a little long ... hang in there): I can define a function in VB.NET with optional parameters that wraps a SQL procedure: Sub Test(Optional ByVal Arg1...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.