Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...