database connection without a datasource
-
Hello all, I am using an sql server for my application. I am creating the sql connection and modifying the database as I like. the connection is as follows.
SqlConnection conn = new SqlConnection("Data Source=" + Environment.MachineName + "\\WINCC;Integrated Security=SSPI;Initial Catalog=Logger; Packet Size = 32766;");
the application runs perfectly fine where the sql server is installed I want to make sure that this application runs on a machine where sql server is not installed
Keshav Kamat :) India
-
Hello all, I am using an sql server for my application. I am creating the sql connection and modifying the database as I like. the connection is as follows.
SqlConnection conn = new SqlConnection("Data Source=" + Environment.MachineName + "\\WINCC;Integrated Security=SSPI;Initial Catalog=Logger; Packet Size = 32766;");
the application runs perfectly fine where the sql server is installed I want to make sure that this application runs on a machine where sql server is not installed
Keshav Kamat :) India
How is that possible ? What do you expect to do ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Hello all, I am using an sql server for my application. I am creating the sql connection and modifying the database as I like. the connection is as follows.
SqlConnection conn = new SqlConnection("Data Source=" + Environment.MachineName + "\\WINCC;Integrated Security=SSPI;Initial Catalog=Logger; Packet Size = 32766;");
the application runs perfectly fine where the sql server is installed I want to make sure that this application runs on a machine where sql server is not installed
Keshav Kamat :) India
What do you want to do? :confused: If you want to connect to a database on a machine called XXXYYY every time, you will have to replace Environment.MachineName with XXXYYY. How do you expect to connect to a database that doesn't exist?
Cheers, Vikram.
The cold will freeze our stares We won't care...
-
Hello all, I am using an sql server for my application. I am creating the sql connection and modifying the database as I like. the connection is as follows.
SqlConnection conn = new SqlConnection("Data Source=" + Environment.MachineName + "\\WINCC;Integrated Security=SSPI;Initial Catalog=Logger; Packet Size = 32766;");
the application runs perfectly fine where the sql server is installed I want to make sure that this application runs on a machine where sql server is not installed
Keshav Kamat :) India
I suspect you are creating the SqlConnection somewhere else from where you actually need it. If you can handle not having a SQL Server installed in some places in your code, then the connection object shouldn't be known to those sections of code. What I mean is, only create a SqlConnection directly inside the code that uses it.