Hello,
Im having some troubles with strings connecting.

retezec = "" & Session("jmeno") & ")" & " AND (table1.application_ID = " & txtCisloReklamace.Text
            Dim ret As String = "SELECT table.data, table.XX, table2.name FROM table INNER JOIN table2 ON table.kod_vyrobku = table2.kod_vyrobku WHERE (table1.some_value= " & retezec & ")"

When retezec is only one INT number, theres no problem.
But when I try to make retezec something like '11) AND(table1.application_ID = 24' it keeps doing an error.

So mine question is how to make the whole text to be a String. It keep returning an error with invalid type conversion from nvarchar to INT

Conversion failed when converting the nvarchar value 'SELECT ......' to data type int.

So theres an update, string is created properly, but when I try to post it to the label which is source of data for mine SQL query its going to crash. String is data type string, label that I'm sending generated code to has this setup:

<asp:Label ID="lblDotaz" visible="false" runat="server"></asp:Label>
<SelectParameters>
<asp:ControlParameter ControlID="lblDotaz" Name="cislo_rekl_zakazky"
PropertyName="Text" type="string" />
</SelectParameters>

Am I missing something what would enable to post string to this label?