473,626 Members | 3,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

mafaisal
142 New Member
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 2984
QVeen72
1,445 Recognized Expert Top Contributor
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 New Member
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 Recognized Expert Expert
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
5751
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 would go something like this: dim qry as dao.querydef set qry = currentdb.querydefs("myquery") qry.parameters("Par1") = "blah"
5
1345
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 button list w/ two items, Student w/ a value of 2 and PrivUser w/ a value of 3. What I do on the click 'Submit' button is set all of the variables and pass them to my Admin class. Below is specifically what I define for the userRole (what I am...
7
9557
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 subroutine Let's say theres a sub that creates buttons and I want it to receive as a parameter the address of the sub that handles the OnClick event for the button being created How do I pass such a parameter Thanks in advance Richar
4
7487
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
2296
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; paramItem.ptrvalue = (char *)malloc(sizeof(int)); sqlfddb(dbName, 1, paramItem, &db2ConnArea); printf("----------------- STAT =============== %d \n", *(int
8
2683
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 which invites will target selected personnel among our customers via email. Each email will provide a custom hyperlink for each respondent using a SQL generated GUID value in the querystring. The GUID will be checked for validity before the user...
7
8551
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) { SqlCommand command = new SqlCommand(strProc, connection); command.CommandType = CommandType.StoredProcedure;
6
1429
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
7051
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 As Integer = 0, _ Optional ByVal Arg2 As Integer = 0, _ Optional ByVal Arg3 As Integer = 0) ' Call my SQL proc with the same signature
0
8268
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8202
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8641
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7199
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5575
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
1512
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.