DCount function of MSAccess in Visual Studio project not declared - dcount

I want to use the DCount function in my Visual Studio Project but DCount gets underlined with a squiggly line and the tooltip says "Not declared" What is the solution?

I don't know which language you are using in Visual Studio (I suspect VB.NET), but DCount is not available neither VB.NET nor C#, it is an Access VBA function. It can't be used in SQL queries either, when you want to retrieve data from Access.
You can count the number of records however by using a SQL expression like
SELECT COUNT(*) FROM ExampleTable WHERE FieldToCount = 'SpecificSelection'
or using LINQ.

Related

Intellisense not working in Visual Studio for Sql Server Data Project

I am trying to switch from SSMS to Visual Studio using Sql Server Data Project, as I like the Project/Solution structure to organize related scripts.
However, I seem to be unable to get Intellisense to work as expected.
I am expecting to be able to connect to a database, and then type
Select * from Account a where a. and get a list of fields for the account table. This works just fine in SSMS.
However, in VS, I get no list of fields.
I have ensured that Intellisense is enable for Sql Server Data Projects here:
Am I doing something wrong? Or is this type of Intellisense not supported?

Oracle Developer Tools for Visual Studio, how to setup intellisense

I'am staring using Oracle Developer Tools for Visual Studio Code but miss something versus what i did in past with sql server tools:
Let's say i have a table whit this name
T_PREFIX_TABLENAME
I'am used to type part of TABLENAME and find it: simply typiyng "TABL" make intellisense working and finding corrispondent result with a like operation, with ODT this does not work and i have to type the initial part of the table name to find it, let's say "T_PREFIX_TABL" to find same results
Since all table have a long common prefix (databas is not mine so cannot change this) i have to write large part of text making intellisense quite unuseful.
I try even Oracle Developer Tools for Visual Studio 2019 with visual studio 2019 professional but in this case intellisense simple does nothing.
I try other way: drag & drop table or comlumn from server explorer to query windows but in visual studio 2019 an entire select query in created while in vs code nothing appens.
Is there a way to have intellisense smart like the sql server tools one's?
Thanks
I believe this issue with autocomplete incorrectly doing a "begins with" search, was a bug introduced in Oracle Developer Tools for VS Code version 19.3.3. It has since been fixed in 19.3.4.

Is there any tool to get the original query from linq in visual studio 2012?

I searched for the above title many times and I cannot match any tool in visual studio 2012 that can get the original query from linq , I tried Microsoft.VisualStudio.DebuggerVisualizers.dll and others but not working
What I generally do when I need to see the SQL generated, I put a breakpoint on the LINQ line, hover over LINQ expression and copy it.

LINQ-to-SQL "unsupported data provider" error with SQL Server 2000

I have been using LINQPad to prototype some queries against a SQL 2000 database, and thought that since I am using LINQPad's built in LINQ to SQL provider, I would be able to generate the same typed data context in a Visual Studio project.
I added a new data connection to Visual Studio Server Explorer in VS2010. It forced me to use "Microsoft SQL Server (OLE DB)" because "Microsoft SQL Server (SqlClient)" only works with SQL 2005 and above. Then I tried to drag tables onto my dbml surface, but I get the following message:
The selected object(s) use an unsupported data provider
I have found a very hacky workaround by copying the TypedDataContext dll that LINQPad itself builds into the Temp folder, and also referencing LINQPad.exe itself (which is needed for the typed data context base class). But really I would rather get LINQ to SQL working properly in my project.
Am I doing something wrong or stupid (this is my first time using LINQ to SQL)? Is there a way of me generating the same typed data classes that LINQPad can? This answer indicates that it ought to be possible.
You could duplicate the schema onto a SQL 2005/2008 box, and then use that to create the typed DataContext in VS. Once you've got the typed DataContext, you should be able to feed it a SQL 2000 connection string.
It seems that this is a limitation of Visual Studio 2010. If you create the dbml in Visual Studio 2008 it connects to SQL Server 2000 with no problems and can create the LINQ to SQL typed DataContext.

Is there a way to get Visual Studio to provide intellisense for late-bound objects in classic ASP?

I'm working on a Classic ASP (with VB Script) project where I'm instantiating an object from an ActiveX control like so:
Dim objHelper
Set objHelper = Server.CreateObject("HelperLib.HelperObj")
Visual Studio 2005 provides intellisense for the first "layer" of properties and methods, but it can't seem to see properties and methods that are members of the main objects. For example:
objHelper. 'Properties and methods show up after the period '
objHelper.FirstProperty. 'No properties and methods are shown after the period'
Is there a way to "help" Visual Studio in some way to see these object types so that I can work in a more strongly-typed environment?
Unfortunately, 2005 does not do this. 2008 does a very good job of it, however. Once you install sp1, that is.

Resources