"David" <david@orbitcoms.com> wrote in message
news:qazEc.71562$sj4.10264@news-server.bigpond.net.au...
> Thanks again for the replies.
>
> I have tried a hard-coded option of connection and it worked.
>
> ie.
>
> TRY
> sqlconnectionstring = ........
originalmachinename.......password=..."
> CATCH
> sqlconnectionstring = ........ newmachinename.......password=..."
> END TRY
>
> I tried to hook this into a config file but I had trouble(I used the
wizard
> in VB.NET to make the connection string and edited it but the area the
code
> was placed did not seem to like me playing with the code adding file open
> command etc.
>
> I will try by completely coding the connection in the main form load
> routine.
> Like this
>
> TRY
> Load my original instance for development and test
> CATCH
> read registry and see if validconnect string exists
> if so then try to connect else
> prompt user for PC name
> save name to registry
> try to connect
> FINALLY
> give up
> END TRY
>
> would this approach seem reasonable ?
>
> "John Bell" <jbellnewsposts@hotmail.com> wrote in message
> news:_FyEc.6675$%N6.73110644@news-text.cableinet.net...
> > Hi
> >
> > To connect to a different instance/server that is running your database
> then
> > the connection string will need to be changed. Quite often this sort of
> > thing is held in the registry and you configure it on installation.
> > Alternatively you may want to provide a small application to configure
the
> > settings.
> >
> >
http://www.microsoft.com/sql/msde/techinfo/MSDEintegration.asp > >
> > John
> >
> > "David" <david@orbitcoms.com> wrote in message
> > news:YNvEc.71214$sj4.25491@news-server.bigpond.net.au...
> > > I am writing SQL data apps using VB.NET 2003, MSDE is being used as
the
> > > server.
> > >
> > > When I create and instance of the server, it has a the format
> > > machinename/instancename
> > >
> > > This is fine for the developement machine but how does my code connect
> to
> > > the server when it is on another machine ? When an instance of MSDE is
> run
> > > on the target, it will produce...
> > > anotherPCname/instancename
> > >
> > > Thanks for any help
> > >
> > >
> > >
> > >
> >
> >
>
>