More than 60 arguments 
Author Message
 More than 60 arguments

Quote:

> I have a form.  It's a big form.  Indeed, a ridiculously
> large form, but it suits the application.  The form has 63
> fields in it, but I might add some later.

> Like many forms, it's purpose in life is to create a
> record and put it in a database, with 63 fields.

> And, I want one interface for desktop applications, and
> also a web version of the form.  So I have a data layer
> dll that has a function CreateMyRecord (byval arg1 as
> string, bvyal arg2 as double, ... byval arg63 as integer)

> And all of this worked quite well, until the number of
> args hit 61, but VB only allows 60 arguments.

> Is there a good way of creating a dispatch-compatible
> function with more than 60 arguments?  I need the function
> in a dll, created as an activeX dll, and exposed as a com
> interface.  The only thing I can think to do is to cram
> some of my arguments into an array, which would work, but
> I've never done it so I'm not sure how to access it from
> the scripting languages, or split the one call into
> multiple calls, which would create a need for
> transactions, which I definitely want to avoid.

> I'm hoping that there is an obvious solution known to you
> long time VBers.

How about a MyRecord class, with some fields? You then set the fields and
pass the created object to the CreateMyRecord method. Neat, easy, and COM
compatiable!

--
Max Bolingbroke MCP
http://www.*-*-*.com/



Tue, 03 May 2005 00:20:16 GMT  
 More than 60 arguments

Quote:

> It would be com compatible, but would it be ASP compatible
> for my web interface?  It must be, I suppose.  I'm sure
> other people deal with this problem all the time.  But
> somewhere I got the idea that only simple types and arrays
> of those types were dispatch-compatible.Looks like I have
> to learn how to do this stuff.  Ahh..growth.  It's a
> wonderful thing.  Although, meeting a deadline would be
> nice as well.

IDispatch-derived interfaces (which all VB classes have) are also
dispatch-compatible.  They go into the pdispVal field of a VARIANT.


Tue, 03 May 2005 03:48:34 GMT  
 More than 60 arguments
imo, it would be *far* better to have 60 separate properties. I can't
imagine having to write a single line of code that passes 60+ items to a
sub. Other than that, you can pass a single array that contains all
arguments.

--
Ken Halter - MS-MVP-VB - Please keep it in the groups..
http://www.vbsight.com - http://www.vbsight.com/MultiColumn.htm
http://www.vbsight.com/TBGDialogCTL.htm

Quote:
> I have a form.  It's a big form.  Indeed, a ridiculously
> large form, but it suits the application.  The form has 63
> fields in it, but I might add some later.

> Like many forms, it's purpose in life is to create a
> record and put it in a database, with 63 fields.

> And, I want one interface for desktop applications, and
> also a web version of the form.  So I have a data layer
> dll that has a function CreateMyRecord (byval arg1 as
> string, bvyal arg2 as double, ... byval arg63 as integer)

> And all of this worked quite well, until the number of
> args hit 61, but VB only allows 60 arguments.

> Is there a good way of creating a dispatch-compatible
> function with more than 60 arguments?  I need the function
> in a dll, created as an activeX dll, and exposed as a com
> interface.  The only thing I can think to do is to cram
> some of my arguments into an array, which would work, but
> I've never done it so I'm not sure how to access it from
> the scripting languages, or split the one call into
> multiple calls, which would create a need for
> transactions, which I definitely want to avoid.

> I'm hoping that there is an obvious solution known to you
> long time VBers.



Tue, 03 May 2005 00:18:57 GMT  
 More than 60 arguments
It would be com compatible, but would it be ASP compatible
for my web interface?  It must be, I suppose.  I'm sure
other people deal with this problem all the time.  But
somewhere I got the idea that only simple types and arrays
of those types were dispatch-compatible.Looks like I have
to learn how to do this stuff.  Ahh..growth.  It's a
wonderful thing.  Although, meeting a deadline would be
nice as well.

Thank you for the response.

Quote:
>-----Original Message-----

>> I have a form.  It's a big form.  Indeed, a ridiculously
>> large form, but it suits the application.  The form has
63
>> fields in it, but I might add some later.

>> Like many forms, it's purpose in life is to create a
>> record and put it in a database, with 63 fields.

>> And, I want one interface for desktop applications, and
>> also a web version of the form.  So I have a data layer
>> dll that has a function CreateMyRecord (byval arg1 as
>> string, bvyal arg2 as double, ... byval arg63 as
integer)

>> And all of this worked quite well, until the number of
>> args hit 61, but VB only allows 60 arguments.

>> Is there a good way of creating a dispatch-compatible
>> function with more than 60 arguments?  I need the
function
>> in a dll, created as an activeX dll, and exposed as a
com
>> interface.  The only thing I can think to do is to cram
>> some of my arguments into an array, which would work,
but
>> I've never done it so I'm not sure how to access it from
>> the scripting languages, or split the one call into
>> multiple calls, which would create a need for
>> transactions, which I definitely want to avoid.

>> I'm hoping that there is an obvious solution known to
you
>> long time VBers.

>How about a MyRecord class, with some fields? You then
set the fields and
>pass the created object to the CreateMyRecord method.
Neat, easy, and COM
>compatiable!

>--
>Max Bolingbroke MCP
>http://www.bolingbroke.net/novanet/

>.



Tue, 03 May 2005 00:31:05 GMT  
 More than 60 arguments
I have a form.  It's a big form.  Indeed, a ridiculously
large form, but it suits the application.  The form has 63
fields in it, but I might add some later.

Like many forms, it's purpose in life is to create a
record and put it in a database, with 63 fields.  

And, I want one interface for desktop applications, and
also a web version of the form.  So I have a data layer
dll that has a function CreateMyRecord (byval arg1 as
string, bvyal arg2 as double, ... byval arg63 as integer)

And all of this worked quite well, until the number of
args hit 61, but VB only allows 60 arguments.

Is there a good way of creating a dispatch-compatible
function with more than 60 arguments?  I need the function
in a dll, created as an activeX dll, and exposed as a com
interface.  The only thing I can think to do is to cram
some of my arguments into an array, which would work, but
I've never done it so I'm not sure how to access it from
the scripting languages, or split the one call into
multiple calls, which would create a need for
transactions, which I definitely want to avoid.

I'm hoping that there is an obvious solution known to you
long time VBers.



Tue, 03 May 2005 00:07:56 GMT  
 More than 60 arguments


Quote:
> I have a form.  It's a big form.  Indeed, a ridiculously
> large form, but it suits the application.  The form has 63
> fields in it, but I might add some later.

> Like many forms, it's purpose in life is to create a
> record and put it in a database, with 63 fields.

> And, I want one interface for desktop applications, and
> also a web version of the form.  So I have a data layer
> dll that has a function CreateMyRecord (byval arg1 as
> string, bvyal arg2 as double, ... byval arg63 as integer)

Don't take this the wrong way (really...it's not meant derogatorily),
but....

You CAN'T be serious!  You are really going to pass 63 (and apparently want
more) arguments to a method?  I'm sorry, but if nobody else will come right
out and say it, then I will:  that's just plain ludicrous. If this DLL is
one you're writing for other programmers to use, they're NOT going to WANT
to use it (but they may have no choice).  If the DLL is going to be used by
yourself, it's not going to take long before YOU get tired of having to
specify 63 (or actually, the apparent limit of 60) arguments to this method.
It's just....<ughs and shudders>...{*filter*}, cruel, and inhuman. Hey, if
nothing else, I'm not opposed to telling what I'm really thinking.  <g>

You need to come up with some kind of object model....classes which have
properties (or even just one class with 63 properties) for all these
database fields.  Don't make it a requirement that every property get
assigned.  The properties should default to something so that if you don't
have data for a particular property (i.e. database field), you don't have to
assign anything to that property (you might just default to a NULL for the
database field).

Mike



Tue, 03 May 2005 12:44:34 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Why does 24*60*60 = overflow ?

2. 7 * 24 * 60 * 60 = OverFlow !?

3. Filesize to 60% by /decompile

4. LOOKUP BOX > 60 OBJECTS-NO SCROLL

5. Error 800a0011 - CommonDialog 60 on Excel user form

6. Visual Studio Net 60 Day Trial DVD

7. Ann: Zeus Programmers Editor V3.60

8. Ann: Zeus Programmers Editor V3.60

9. Re - Crystal reports(V4.60) problem in Client/server App

10. Sleep API is using up 60% CPU time in the DLL

11. Adding the numbers 1 - 60 to a combobox.....

12. Visual basic 60 service pack 4

 

 
Powered by phpBB® Forum Software