LinqPad now showing table if a SP has same name
There seems to be some problems with LINQPAD when an SP and Table has the same Name, but written differently (Capital letters)
If you run these 2 SQL scripts, you will only see the SP as an option in linqpad:
CREATE TABLE [dbo].[VIPs](
[ID] [int] IDENTITY(1,1) NOT NULL,
[MobileNumber] varchar NULL
)
CREATE PROCEDURE [search].[Vips]
(
@where VARCHAR(max)
,@index INT = 0
,@count INT = 10
,@JSONDATA NVARCHAR(MAX) OUTPUT
)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON
SET @JSONDATA = 'Test'
END
If you change the Procedure to have exact name as the table written like "VIPs" both are shown.
How come? This seems to be a bug?
Are there any ways to force LINQPAD to always set "Scheme" in front of a method?
Comments
Wow that's weird. I've confirmed it here. Same capitalisation all ok. Change the caps only the SP shows.
I suggest it is likely a likely a problem with the driver when it builds out the typed data context.
I don't know of any ways to force the driver to set the Scheme.
Sorry not much help, I suppose the easy fix is just to ensure SP's and tables have unique names ?
Thanks for the repro. I'll get a fix into the next beta.