Im trying to create a dll to use inside SQL Server 2005 and i have a strange problem:
The problem appears at this line:
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
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