473,326 Members | 2,134 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,326 software developers and data experts.

Component Creation

Hi All,

I am creating a component library and I have a function that contains
optional parameters. Here's the skeleton code for the function:

Public Function SearchBook(ByVal page as String, Optional ByVal keyword
As String = Nothing, Optional ByVal categoryID As String = Nothing) As Book

' implementation code omitted

End Function

My gripe is with the optional parameters. Specifically, this function
can be used three ways:

1. use take the page and keyword params (omitting the catagoryID param)
2. use the page and categoryID params (omitting the keyword param)
3. use all three params.

Are there any penalties for ignoring only one of the optional
parameters? Must they both be used (because I don't feel like writing
overloaded functions)if one of them is used? Is the order in which
they're placed an issue?

Thanks,
Roshawn
Nov 21 '05 #1
0 711

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alan | last post by:
Gidday people, I had a bit of a problem this morning. I think I've got it sorted now, but I wonder if anyone can shed some light. I have a plain VBS WHS file that instantiates a component that...
2
by: macbul | last post by:
(C++ Builder 6.0 enterprise) I tried to create a TImage component by using this source code: // ---
0
by: Chris | last post by:
Hi, I created a VB.net project with 1 class file as my component. How do I make this component available to other .NET projects so that when I create a new project and click on Add Reference I see...
0
by: acharyaks | last post by:
Hi life saver, I am using excel component for the development. The purpose is to connect to excel through the odbc connection string. Then through the connection extract data into a dataset and...
0
by: Steven Kilby | last post by:
I have a component (inproc dll) written in VB6. I have a client written in C#. If I compile the component to native code everything works fine. I add the necessary type library for my component...
4
by: Roshawn Dawson | last post by:
Hi All, I am creating a component library and I have a function that contains optional parameters. Here's the skeleton code for the function: Public Function SearchBook(ByVal page as String,...
3
by: Michel Smit | last post by:
I'm running into another problem with my component. I'm trying to use .NET remoting to avoid complex firewall issues. I have a webserver which is the client machine and a database server which...
7
by: Joe | last post by:
Is it possible to have a component which is global to the entire application? I need to have a single component act sort of like a server which components in any of the forms can access. For...
7
by: Ben | last post by:
Hi We are looking for a component that offers that offers the below for Tiff files: Image clean-up (deskew, despeckle) Printing capabilities from VB The ability to add text to image, e.g....
0
by: bharathreddy | last post by:
In .Net COM+ components are referred to as serviced components, Namespace: System.EnterpriseServices; Advantage of Serviced Components: object pooling, database connection pooling,
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: 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.