runtime error project source code not found and invalid string null exception? [closed]

本秂侑毒 提交于 2019-12-08 15:32:02

问题


My code was running and i compiled and executed many times in 3days but suddenly error appears sourrce code not found i resolved it by installing extension of source code assembly but still there is 1 error

even i have removed connection string class but still runtime error while starting a project

check image the error appears qwhen project is run or build

code for subnew

 Public Sub New()
    InitializeComponent() 

    End Sub

回答1:


You have to use One More Slash in Your Connection String To get rid of escape Sequence as

Public DBConn As String = @"Data Source=.\SQLEXPRESS;Initial Catalog=Quotient;Integrated Security=True"

OR

Public DBConn As String = "Data Source=.\\SQLEXPRESS;Initial Catalog=Quotient;Integrated Security=True"

You must put "@" sign before Connection String as it there is a Escape Sequence ("\") in Connection String




回答2:


The problem is solved by recreating form and copy pasting contents from form1 to form3 new and then renaming it to FORM1 and deleting existing form1



来源:https://stackoverflow.com/questions/34465702/runtime-error-project-source-code-not-found-and-invalid-string-null-exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!