tbcmartinharvey Posted October 17, 2005 Posted October 17, 2005 Can anyone help me with this: I am trying to compile a dll from the commnd line with the following code: vbc /debug /nologo /t:library /out:\worldshopdevelopement\bin\Catalog.dll /r:System.dll /r:System.Data.dll \worldshopdevelopement\Catalog.vb The vbc compiler is returning the message: C:\worldshopdevelopement\Catalog.vb(11) : error BC30451: ?? 'CommandType' ?????? ????? command.CommandType = CommandType.StoredProcedure ~~~~~~~~~~~ C:\worldshopdevelopement\Catalog.vb(15) : error BC30451: ?? 'CommandBehavior' ?? ????????? Return command.ExecuteReader(CommandBehavior.CloseConnection) ~~~~~~~~~~~~~~~ C:\worldshopdevelopement\Catalog.vb(20) : error BC30451: ?? 'ConfigurationSettin gs' ??????????? Return ConfigurationSettings.AppSettings("ConnectionString") I Would be really grateful if someone could tell me where i am going wrong Many Thanks Martin For reference the .vb page is as follows: Imports System.Data.SqlClient Public Class Catalog Public Shared Function SP_GetBB() As SqlDataReader ' Create the connection object Dim connection As New SqlConnection(connectionString) ' Create and initialize the command object Dim command As New SqlCommand("SP_GetBB", connection) command.CommandType = CommandType.StoredProcedure ' Open the connection connection.Open() ' Return a SqlDataReader to the calling function Return command.ExecuteReader(CommandBehavior.CloseConnection) End Function Private Shared ReadOnly Property connectionString() As String Get Return ConfigurationSettings.AppSettings("ConnectionString") End Get End Property End Class Quote
Administrators PlausiblyDamp Posted October 17, 2005 Administrators Posted October 17, 2005 (edited) You will also need to import the System.Configuration and System.Data namespaces. Edited October 17, 2005 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.