SQLCLr problem

Puiu

Well-known member
Joined
Oct 6, 2004
Messages
90
Im trying to create a dll to use inside SQL Server 2005 and i have a strange problem:

Code:
Imports System
Imports System.Data
Imports System.Data.Sql
Imports System.Data.SqlClient
Imports Microsoft.SqlServer.Server
Imports System.Data.SqlTypes


Public Class SQLCLR


    <Microsoft.SqlServer.Server.SqlProcedure()> _

    Public Shared Sub MySub(ByVal SomeString As String, ByVal DI As Date)

        Dim cmd As New SqlCommand

        Dim PrimaPrima As String
        Dim j As Integer

        Using connection As New SqlConnection("context connection=true")
            connection.Open()
            cmd.Connection = connection

            While SomeString.Length > 0
                j = SomeString.IndexOf(",")
                PrimaPrima = SomeString.Substring(0, j)
                de pus update command
                cmd.CommandText = "UPDATE Prime SET" & _
                                   "DI =" & DI.ToString & " where idPrima =" & _
                                    PrimaPrima
                cmd.CommandType = CommandType.Text
                cmd.ExecuteNonQuery()

                SomeString = SomeString.Substring(j + 1, SomeString.Length - j - 1)
            End While
        End Using
    End Sub


End Class


The problem appears at this line:

Code:
<Microsoft.SqlServer.Server.SqlProcedure()> _


It says that

Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement.


Any ideeas why? I have nono
thanks
 
Back
Top