all groups > vb.net upgrade > september 2006 >
You're in the

vb.net upgrade

group:

Code Advisor


Code Advisor jez123456
9/18/2006 3:53:01 AM
vb.net upgrade:
Hi, I'm quite new to VB and have been tasked with converting a VB6 dll to
VB.Net.

I ran the VB6 Code Advisor and it reported the following:-

'FIXIT: Declare 'CreateItem' and 'Arg1' and 'Arg2' and 'Arg3' with an
early-bound data type FixIT90210ae-R1672-R1B8ZE
Public Function CreateItem(Inst As ApplicationInstanceItem, Request As
String, Optional Arg1 As Variant, Optional Arg2 As Variant, Optional Arg3 As
Variant) As Variant

Const csFunctionName As String = "CreateItem"

'FIXIT: Declare 'Args' with an early-bound data type
FixIT90210ae-R1672-R1B8ZE
Dim Args() As Variant
Dim MyRequest As String


Do you have any advice on how I solve issues like this. I'm not sure why the
Variant data type was used, pressumably the original coders did not know.

Re: Code Advisor Paul Clement
9/20/2006 11:03:03 AM
[quoted text, click to view]

¤ Hi, I'm quite new to VB and have been tasked with converting a VB6 dll to
¤ VB.Net.
¤
¤ I ran the VB6 Code Advisor and it reported the following:-
¤
¤ 'FIXIT: Declare 'CreateItem' and 'Arg1' and 'Arg2' and 'Arg3' with an
¤ early-bound data type FixIT90210ae-R1672-R1B8ZE
¤ Public Function CreateItem(Inst As ApplicationInstanceItem, Request As
¤ String, Optional Arg1 As Variant, Optional Arg2 As Variant, Optional Arg3 As
¤ Variant) As Variant
¤
¤ Const csFunctionName As String = "CreateItem"
¤
¤ 'FIXIT: Declare 'Args' with an early-bound data type
¤ FixIT90210ae-R1672-R1B8ZE
¤ Dim Args() As Variant
¤ Dim MyRequest As String
¤
¤
¤ Do you have any advice on how I solve issues like this. I'm not sure why the
¤ Variant data type was used, pressumably the original coders did not know.

Variant should probably be converted to Object or the actual data type that is being returned.

It's my guess they used Variant because the component was either used by an ASP app or because the
function returned different types of objects or data types.


Paul
~~~~
AddThis Social Bookmark Button