TaskVision Smart Client demo app in 2.0

M

moondaddy

I just downloaded the TaskVision smart client app for review. I think it
was built in 1.0, however, i'm runnint 2.0. VS 2005 upgraded it and now I
have a vew compile errors. One I dont know how to resolve is in the class
SQLHelper where its trying to return a sqldatareader from a shared method.
the compile error is:

Error 39 Overload resolution failed because no accessible 'ExecuteReader'
can be called without a narrowing conversion:
'Public Shared Overloads Function ExecuteReader(connectionString As
String, spName As String, ParamArray parameterValues() As Object) As
System.Data.SqlClient.SqlDataReader': Argument matching parameter
'connectionString' narrows from 'System.Data.CommandType' to 'String'.
D:\nwis\Apps\SampleCode\SmartClientApps\TaskVision\Microsoft.ApplicationBlocks.Data\SQLHelper.vb
772 24 Microsoft.ApplicationBlocks.Data


and the method is:

Public Overloads Shared Function ExecuteReader(ByVal connection As
SqlConnection, _
ByVal spName As
String, _
ByVal ParamArray
parameterValues() As Object) As SqlDataReader
'pass through the call using a null transaction value
'Return ExecuteReader(connection, CType(Nothing,
SqlTransaction), spName, parameterValues)

Dim commandParameters As SqlParameter()

'if we receive parameter values, we need to figure out where
they go
If Not (parameterValues Is Nothing) And parameterValues.Length >
0 Then
commandParameters =
SqlHelperParameterCache.GetSpParameterSet(connection.ConnectionString,
spName)

AssignParameterValues(commandParameters, parameterValues)

Return ExecuteReader(CommandType.StoredProcedure, spName,
commandParameters)
'otherwise we can just call the SP without params
Else
Return ExecuteReader(connection,
CommandType.StoredProcedure, spName)
End If

End Function 'ExecuteReader

Any idea on how to resolve this?

Thanks.
 
J

Jeffrey Tan[MSFT]

Hi moondaddy,

Thanks for your post.

Based on the error message, it seems that the ExecuteReader method in
SQLHelper.vb does not have the same parameter type as the data you passed
in. The method requires String type, but the code passed
CommandType.StoredProcedure type in.

I have tried to download the TaskVision VB.net version, then use VS2005 to
convert it. However, I can not reproduce out the error you got. Can you
provide some steps for me to reproduce the problem?

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
M

moondaddy

Thanks. I downloaded, installed, uninstalled, and then re-downloaded and
installed the TaskVison sample app and still got the same error. Part of
the problem is that the version I down loaded was .net 1.0. Then I upgraded
the project to 2.0. Since this error was in the SQLHelper class (which was
probably the original version - 1.0), I replaced it with a copy of SQL
Helper from DAAB 2.0 (.net 1.1). The same method in the new class compiled
OK.

But now I have a new question for you. I just found a place to download a
version of TaskVision that's been updated to .net 2.0 at
http://www.windowsforms.net/default.aspx?tabindex=4&tabid=49.

This is very helpful as its been completely re-written to take advantage of
the new framework. However, this solution doesn't include the web service
project and the WS references link to an online WS at
http://www.notouchdeploy.com/taskvisionws/dataservice.asmx. Is there anyway
I can get a copy of the WS project so I can add it to my solution and have
the whole thing?

Thanks.
 
J

Jeffrey Tan[MSFT]

Hi moondaddy,

I am glad your original problem is resolved.

For the further issue, if the winform product team did not provide this WS
project, I suggest you submit your request as a suggestion in the link
below, our product team will follow up with you suggestion:
http://lab.msdn.microsoft.com/productfeedback/default.aspx

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top