Hi,
I am trying to run this code but getting error.
code:
try
{
SqlConnection conn =
new SqlConnection("Data Source = .; " +
"Initial Catalog = users; Persist Security Info = True; " +
"User ID = sa; Password = ***********");
SqlCommand cmd = new SqlCommand("select * from...
Hello,
I get an encoding related error when I want to check if my database connection is working when I press the "Connection" button on my form.
The error is on "conn.Open();".
I have attached my static class which contains the function for connection and the code where I call my function...
I am using Northwind database in Sql Server.
I am using Stored Procedure to connect Visual Studio with Sql Server and draw data from database.
In CRUD operations, I am tring to write a SEARCH button that is using Stored Procedure.
Other CRUD buttons are working okay.
Search button is not...
I have implemented some checks to a settings form in my app to validate some of the data and test DNS resolution and SQL connections.
For some reason, if I purposely enter an incorrect username and password for the SQL database, my test function hangs without catching any exceptions. The app...
What is the format of a SQLConnection connection string that is passed in the constructor method? I have run a search engine search online and all I could find so far is examples like:
"Data Source=(local);Initial Catalog=AdventureWorks; Integrated Security=SSPI;";
or
"User...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.