Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Could anyone help me with a problem

 

I am trying to compile a dll from the command line using vbc.exe.

I am using the following code:

 

vbc /t:Library Catalog.vb /r:System.Data.dll /out:bin/Catalog.dll and I keep getting the error message

 

vbc:?????? BC2001: ????'Catalog.vb'???????

 

Can anyone tell me what the problem is.

 

Many thanks

 

Martin

 

For reference the contents of the Catalog.vb file are as follows:

 

' Catalog.vb

Imports System.Data.SqlClient

NameSpace Worldshop

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

End Namespace

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...