Q
Problem solve Get help with specific problems with your technologies, process and projects.

Connecting to an SQL server without pre-installed SQL

I have created a Windows application where I do an SQL server connection. When I run my application on another computer, the program tells me that SQL server must be installed on that computer. My question is: Do I have to install SQL on the other computer or there is another way to make the connection to the server? I use classes to connect to server, not odbc.
You have to configure the connection so that it points to the proper server. One easy way to do so if you're using a SQLConnection component in the form, is to configure the connection string. Then select the (DynamicProperties) property in the Property Browser. Expand it and select the ConnectionString property. In the form that appears, mark the checkbox for making the value configurable. You can pick an easy-to-remember name for the key.

Now, when you close the dialog and save the form changes, you'll see a little green icon next to the ConnectionString property. If you open the App.config file, you'll find a new <appSettings> section, with a new key with the connection string value. From now on, you can modify the connection to the server just by changing this value in the file. You can reuse the same key from all forms.

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

Close