|
i'm wanting to pass the values of 2 textboxes in a form in the connectionstring as uid and pwd. i've already created a new Login in SQL Server but when i'm passing the textBox1.text and the textBox2.text with the & concatenate operator the compiler yells at me
this is the code in my app.Config file where i stored the connectionstring
<? xml version="1.0" encoding="utf-8" ?>
< configuration>
<appSettings>
<add key ="connectionString" value="Address=valid ip addess;Trusted_Connection = true; Database=Northwind; uid=" & textBox1.Text & "; pwd=" & textBox2.Text & " " />
</appSettings>
</ configuration>
An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in system.dll
Additional information: The '&' character, hexadecimal value 0x26, cannot begin with a name. Line 4, position 115.
i desired each user of this application to authenticate against SQL Server and be granted access to their schema
please i need help
thanks |