Well no. What did you expect?
That isn't a valid string, or even close - if you take out the DataAdapter related bits you can see it more easily:
Dim s As String = "SELECT V_Date, V_Time,("Select Max(ptd.Active), FROM Master As ptd WHERE ptd.Invoice_No = pt.Invoice_No) As "Activate" FROM P_Detail As pt where pt.V_Date =
Try cutting down your use of double quotes:
Dim sql As String = "SELECT V_Date, " &
"V_Time, " &
"(SELECT Max(ptd.Active), " &
"FROM Master As ptd " &
"WHERE ptd.Invoice_No = pt.Invoice_No) As [Activate] " &
"FROM P_Detail As pt " &
"WHERE pt.V_Date = '" & pDate & "' " &
"AND pt.Invoice_No = '" & MNumber & "'"
And use that instead.