G
Guest
Hi,
I have the following procedure below:
I am getting 2 errors on compile:
Argument '2': cannot convert from 'System.Data.SqlClient.SqlDataReader' to
'ref System.Data.SqlClient.SqlDataReader'
Argument '3': cannot convert from 'System.Text.StringBuilder' to 'ref
System.Text.StringBuilder'
the PrintChildrenRecursive is a class in a referenced DLL that was written in
VB.NET.
this function takes a dataset and loops through it creating a javastring
using stringbuilder that creates a parent-child tree of html hyperlinks.
the printchildrecursive function accepts the Dr and Sbuilder ByReference.
private static void PrintFromRoot(SqlDataReader Dr, StringBuilder SBuilder)
{
PrintChildren PCR = new PrintChildren();
SBuilder.Append("[");
PCR.PrintChildrenRecursive(1, Dr, SBuilder, false);
SBuilder.Remove(1,2); //remove comma and bracket from beginning of string
SBuilder.Append("];");
}
I don't understand why conversion is occuring because they are already of
the correct type as already indicated by the error messages.
thanks
Chris
I have the following procedure below:
I am getting 2 errors on compile:
Argument '2': cannot convert from 'System.Data.SqlClient.SqlDataReader' to
'ref System.Data.SqlClient.SqlDataReader'
Argument '3': cannot convert from 'System.Text.StringBuilder' to 'ref
System.Text.StringBuilder'
the PrintChildrenRecursive is a class in a referenced DLL that was written in
VB.NET.
this function takes a dataset and loops through it creating a javastring
using stringbuilder that creates a parent-child tree of html hyperlinks.
the printchildrecursive function accepts the Dr and Sbuilder ByReference.
private static void PrintFromRoot(SqlDataReader Dr, StringBuilder SBuilder)
{
PrintChildren PCR = new PrintChildren();
SBuilder.Append("[");
PCR.PrintChildrenRecursive(1, Dr, SBuilder, false);
SBuilder.Remove(1,2); //remove comma and bracket from beginning of string
SBuilder.Append("];");
}
I don't understand why conversion is occuring because they are already of
the correct type as already indicated by the error messages.
thanks
Chris