G
Guest
I am using a StringBuilder to create a table in html. This table has so much data that the string builder winds up with a length of 43,124,398. This report takes a long time to render so I created a cache table for it. Unfortunately what worked well (slowly, but well) in a aspx page doesn't want to cache to my db. The problem is that when I add the stringbuilder to the sql to insert like so
Dim myParameter As SqlClient.SqlParamete
myParameter = New SqlParameter("@Cache", SqlDbType.Text
myParameter.Value = cache 'This is the StringBuilde
oCom.Parameters.Add(myParameter
myParameter = Nothin
I get an error "System.InvalidCastException: The SqlParameterCollection only accepts non-null SqlParameter type objects, not StringBuilder objects
So if I try
?cache.ToStrin
In the command window I get
"Unable to evaluate expression
If I use it like so
Dim myParameter As SqlClient.SqlParamete
myParameter = New SqlParameter("@Cache", SqlDbType.Text
myParameter.Value = cache.ToString 'This is the StringBuilde
oCom.Parameters.Add(myParameter
myParameter = Nothin
I get an empty value in my db
Anyone have any ideas how to handle extremly long strings? I appreciate any help
Thanks
-- Anthony
Dim myParameter As SqlClient.SqlParamete
myParameter = New SqlParameter("@Cache", SqlDbType.Text
myParameter.Value = cache 'This is the StringBuilde
oCom.Parameters.Add(myParameter
myParameter = Nothin
I get an error "System.InvalidCastException: The SqlParameterCollection only accepts non-null SqlParameter type objects, not StringBuilder objects
So if I try
?cache.ToStrin
In the command window I get
"Unable to evaluate expression
If I use it like so
Dim myParameter As SqlClient.SqlParamete
myParameter = New SqlParameter("@Cache", SqlDbType.Text
myParameter.Value = cache.ToString 'This is the StringBuilde
oCom.Parameters.Add(myParameter
myParameter = Nothin
I get an empty value in my db
Anyone have any ideas how to handle extremly long strings? I appreciate any help
Thanks
-- Anthony