Deployment Problem

  • Thread starter Thread starter Gene
  • Start date Start date
G

Gene

hi guys,
I'm currently using Sql server 2000 for database,
I use the data adapter wizard for most of the connection in vb,
and it is connected to the machine name of my computer,
if i create a setup using for my project,
Is there a problem for my project to use in another machine
using that machine's database?
what can i do to work probably on other machine?
and how to include the database and install on anonther machine
using the setup created?
 
hey

you will always have to point your connection string to the right sql
server.
there are several ways to do this i would suggest that you set the value in
the load of your form, you can hard code it or set a value in your config
file (progname.exe.config) that way you can change it whithout recompiling.

hope it helps

eric
 
i will have to be a bit vague bout that one (i'm working on web forms atm
and thats a bit different)

normally you can add a new item to the project and that shouold be an
application configuration file (it wil be in the templates) if you leave it
like that you will have to recompile to change the values if you put a .exe
behind the name it will take the values without recompiling.


the config file would be something like this. (in your app set the
connection string to SqlConnection1.ConnectionString)
<?xml version="1.0" encoding="utf-8"?>

<configuration>

<appSettings>

<!-- User application and configured property settings go here.-->

<!-- Example: <add key="settingName" value="settingValue"/> -->

<add key="SqlConnection1.ConnectionString" value="data
source=SERVERNAME;database=DBNAME;user id=***;password=*****" />

</appSettings>

</configuration>
 
yes we have it working on a few vb win form apps
in asp it is easyer (you dont have to do anithing special to the config
file)
 
Back
Top