Intellisense for table definition should use INFORMATION_SCHEMA data.
It seems the current implementation parses a CREATE TABLE statement and only shows the columns defined there when you hover over a table name. Columns added later via ALTER TABLE statements do not show up. The intellisense list should be built by querying the CURRENT table structure via INFORMATION_SCHEMA.COLUMNS in order to show all columns.
Please check that you have selected the ‘Automatically refresh suggestions cache’ and ‘Detect changes on a server before refreshing suggestions cache’ options in the ‘Text Editor → Code Completion → General’ section of the ‘Options’ dialog box that can be opened by selecting ‘Tools → Options’ from the main menu.
Please also check that the altered object belongs to the database selected in the ‘Database’ drop-down menu on the ‘SQL’ toolbar.
-
AdminDevart (_, Devart) commented
Could you please provide us the screenshot with the tooltip with the columns being displayed in the SQL document when hoovering over a table name?
You can send a reply straight to our support system at supportATdevartDOTcom, so we will keep further correspondence with you on this issue via e-mail.
-
Eric Mutta commented
Hi Admin, all those settings are on as you have directed, and the objects are in the database selected in the drop-down SQL bar. I am using the query editor in VS2012 on Windows 8.1 Pro with SQL Server 2008.
Here is an example of code where if I hover over TProducts, I only see the columns listed during CREATE TABLE. Those added via ALTER TABLE do not show up:
IF OBJECT_ID('dbo.TProducts') IS NULL
BEGIN
CREATE TABLE dbo.TProducts
(
ID INT NOT NULL IDENTITY(1,1) PRIMARY KEY
,Created DATETIME NOT NULL DEFAULT GETDATE()
,Updated DATETIME NOT NULL DEFAULT GETDATE()
,Name VARCHAR(50) NOT NULL
,BuyingPrice INT NOT NULL
,SellingPrice INT NOT NULL
,StockLevel INT NOT NULL DEFAULT 0,CONSTRAINT CU_ProductNameMustBeUnique UNIQUE(Name)
,CONSTRAINT CK_ProductNameNotBlank CHECK(LEN(LTRIM(RTRIM(Name))) > 0)
,CONSTRAINT CK_BuyingPriceRules CHECK(BuyingPrice >= 0)
,CONSTRAINT CK_SellingPriceRules CHECK(SellingPrice >= 0)
)
END
GOIF dbo.ColumnExists('TProducts', 'IsNonStockItem') = 'FALSE'
BEGIN
ALTER TABLE dbo.TProducts ADD IsNonStockItem BIT NOT NULL DEFAULT 'FALSE'
END
GOIF dbo.ColumnExists('TProducts', 'IsExpiryItem') = 'FALSE'
BEGIN
ALTER TABLE dbo.TProducts ADD IsExpiryItem BIT NOT NULL DEFAULT 'FALSE'
END
GO