visual-studio-2015

Visual Studio 2015 VB.net How to find record in MS Access database and disable button in form?

梦想的初衷 提交于 2020-01-07 03:06:30
问题 i am trying to load a form, but when loading must go to a access database and check if a record with the button text and today date exist, if it exist then disable the button. I have about 50 button in the form. NOTE: check my codes below, they works for 4 or 5 but the other ones not working. i have no error message. Maybe if someone have a better way to do this i will be very thanks full .This is my loading form Imports System.Data.OleDb Public Class Wells Dim provider As String Dim dataFile

Visual Studio 2015 VB.net How to find record in MS Access database and disable button in form?

耗尽温柔 提交于 2020-01-07 03:06:09
问题 i am trying to load a form, but when loading must go to a access database and check if a record with the button text and today date exist, if it exist then disable the button. I have about 50 button in the form. NOTE: check my codes below, they works for 4 or 5 but the other ones not working. i have no error message. Maybe if someone have a better way to do this i will be very thanks full .This is my loading form Imports System.Data.OleDb Public Class Wells Dim provider As String Dim dataFile

ModelConfiguration does not exist in the namespace 'System.Data.Entity'

别来无恙 提交于 2020-01-07 03:03:48
问题 I'm trying to get a template working that will correctly rename my navigation properties in the entity framework. Here are first five lines of the template: <#@ template language="C#" debug="true" hostSpecific="true" #> <#@ include file="EF.Utility.CS.ttinclude"#> <#@ assembly name="System.Text.RegularExpressions"#> <#@ import namespace="System.Text.RegularExpressions" #> <#@ import namespace="System.Data.Entity.ModelConfiguration.Mappers" #> However when I try to "Run the Custom Tool" I get

Force authorization to basic in web test for performance

梦想与她 提交于 2020-01-07 03:02:32
问题 I'm using Visual Studio 2015 for our performance testing. I'm using a web test to make a call to an API endpoint. Using fiddler and HTTPRequester I can connect to the API with no problem. When I use the webtest I receive a 401 unauthorized. The difference between the webtest and everything else is the webtest is using Authorization: Negotiate instead of Authorization: Basic. How, in Visual Studio 2015 can I force the Authorization to Basic instead of negotiate? Here is the header as the

Visual Studio formatting Strings as VB.NET code

醉酒当歌 提交于 2020-01-07 02:50:18
问题 I have some MySQL written as String in my VB.NET application. Sometimes Visual Studio (2015 Community) changes the format of some parts of the string that it thinks its a keyword. Example.: Command.CommandText = "DROP TABLE IF EXISTS `table_name`" is changed to: Command.CommandText = "DROP TABLE If EXISTS `table_name`" In this case it is just annoing and not harmful, but I can think of situations where this could cause some problems. Case sensitive string comparison, for instance. Another

Cannot access User.Identity.GetUserId() inside Login action of AccountController in MVC 5

旧街凉风 提交于 2020-01-07 02:26:04
问题 Current Environment Visual Studio 2015, MVC5, Asp.net Identity 2.0, Entity Framework 6.0 Problem I was trying to get User.Identity.GetUserId() after user is just authenticated, but got "Object reference not set to an instance of an object" in the browser. Expectation If it is possible, I want to User.Identity.GetUserID() at the same position. And I wander where the start point is that I can access User.Identity.GetUserId() in the project. Code // // POST: /Account/Login [HttpPost]

embedding image in body of email from vb.net

爷,独闯天下 提交于 2020-01-06 23:48:13
问题 I have rigorously searched for a soln on this but cannot get this to work. I am trying to send an email from within a vb.net application where an image is embedded in the body of the email. I get it to work as an attachment but in outlook and other email clients, the image does not show. The image is stored locally and I wonder if that has anything to do with it. I tried adding the image within a string first and that did not work; emailString.AppendLine() emailString.AppendLine() emailString

Correct parameter types for select queries that use table valued functions

可紊 提交于 2020-01-06 20:18:09
问题 My SQL Server 2012 contains a function Get_Schedule : CREATE FUNCTION Get_Schedule( @pProject_Id AS INT, @pPeriod_Start AS DATETIME2, @pPeriod_End AS DATETIME2) RETURNS TABLE WITH SCHEMABINDING AS RETURN ( SELECT 42 AS Val1, 'Foo' AS Val2); Visual Studio 2015's SQL Server Object Explorer shows the function parameters with the types as defined. However when dragging the function to the strongly typed dataset designer the DATETIME2 parameters are changed to ANSISTRING instead of System.DateTime

Location of dlls and other files when a VSTO AddIn project is built in Visual Studio

◇◆丶佛笑我妖孽 提交于 2020-01-06 19:54:50
问题 As explained in this MSDN tutorial, when you run/build an MS Word VSTO project in Visual Studio, it creates your custom office Word AddIn in Word application. You can later remove that AddIn using VS as follows: Cleaning up the Project (quoted from the last section of the above MSDN Tutorial) When you finish developing a project, remove the VSTO Add-in assembly, registry entries, and security settings from your development computer. Otherwise, the VSTO Add-in will continue to run every time

How to check-in to TFS when all files have been replaced/removed

天大地大妈咪最大 提交于 2020-01-06 19:36:21
问题 I am new to team foundation server and visual studio. I have a non-VS project that I need to version control through TFS because of company policies. I use a different tool than TFS to edit my project, so when I was ready to push my changes I just checked out the project from TFS and cleaned out the local directory to replace with the new version of the project. I am now unable to check-in the changes because TFS is looking for the files that I deleted. If I need to clean out and replace all