I have a project where we use the SQL queries directly in the code.
Dim strSQL As String = "SELECT P.NAME, C.ID, C.NAME" +
"FROM PERSONS P " +
"INNER JOIN CITIES " +
"ON P.IDCITY = C.ID" +
"WHERE P.ID = {0}"
Is a little bit ennoying to format such a query using "" and "+" Is there a way to write the script "As Is" (from a SQL file), without reformating it?
I'd use
strSQL = My.Resources.SELECT_PERSON_WITH_CITY
but in debug I can't see/modify the original query.
I know, I know, this is not a best practice using SQL directly, but however, I use what I have.
PS.
As Conor Gallagher mentioned, in C# there is a way to achieve this:
string x = @"
my
name
is {0}";
string y = string.Format(x, "jimmy");
Does anyone know a VB.NET equivalent?