how to connect sql server to vb.net

hi friends have connected my database to sql server but the problem is setup file when make a setup file it doest not includes database(tables of that data base) the setup works in that system only if i tried to install the setup file in another pc it does not work..

         the server name of my pc is user-pc if try i try to install to another pc the name of pc sql server  should be user-pc then only it works other wise it does not works ..

please explain me step by step..

pleasseee help to solve the problem....
thanks to all who helped me.........

1 answer

Instead of writing PC Name in the connection string use "(local)".
That means it will take the local PC Name in whichever PC you are running your code.