Hi guys!
I have created two table valued multi-statement functions using SQL Server 2000 and am now trying to develop a VB.NET front end application where I run the functions and pass string parameters to them.
When I run the function in SQL Server Query Analyzer, it works, but when I run the function through VB.NET using this code
Private Sub ViewCustomers()
conn.Open()
Dim SQLComm = New SqlCommand("SELECT * FROM ViewCustomers(" & vRegion & ")", conn)
Dim r As SqlDataReader()
r = SQLComm.ExecuteReader()
dgCustomers.DataSource = r
conn.Close()
End Sub
So when I'm trying to run the solution to test the code, the error pointer points to the " r = SQLComm.ExecuteReader()" line and I get the error ''CITY' is not a recognized optimizer lock hints option.
'CITY' is one of the strings that would be assigned to the variable vRegion.
How do I get rid of this Optimizer lock hints option error? :icon_confused: