Reputation: 162
I have a project in Visual studio 2015 using visual basic. I have Windows 10. My project includes connection with database. My problem is, that when i write a method i expect from intellisense to give me more values than is actually giving. For example i give you this line of code: adpSongs.SelectCommand.Connection = cManager.con
The adpSongs is the sql adapter . This line of code is totally accepted and my programm works in full functionality. But SelectCommand.Connection are not given by intellisense actually what i get by many components are the submethods Equals, GetHashCode, getType, To string. I have tried : delete suo file , reopen, recreate , rebuild , tools->oprions->textEditor->languages->auto list members and parameters information checked. I have update 2 but i cant move on update 3 because of disk space. pls help!
Upvotes: 2
Views: 100
Reputation: 2750
Without Option Infer
turned on for your project, everything defaults to a type of Object
unless specified.
Using
Dim adpSongs = New SqlDataAdapter
will not actually give it a type of SqlDataAdapter
.
The solutions:
Dim adpSongs As New SqlDataAdapter
or slightly longer, but with clearer assignment.
Dim adpSongs as SqlDataAdapter = New SqlDataAdapter
Or turn Option Infer
on in your project (not always recommended)
Upvotes: 1