Connecting Tech Pros Worldwide Help | Site Map

Make DB move with EXE

Barkster
Guest
 
Posts: n/a
#1: Nov 21 '05
I don't usually create installers for my projects cause we have dotnet on
all our machines and I normally just copy the exe and any required Dll's to
the folder where I want to run. Normally I just stick
application.startuppath to create dynamic paths but I can't seem to get this
to work on my Oleconnection. If I change it in the form designer generated
code to my application.startuppath etc.. it renames it on rebuild and if I
try and set it on load by setting oleconnection1.connectionstring it doesn't
seem to work either. Is there a way to make this load from the
startuppath\data\ folder?

Thanks


Cor Ligthert
Guest
 
Posts: n/a
#2: Nov 21 '05

re: Make DB move with EXE


Barkster,

I have strugled a longtime with this and it is so easy, just set in the load
event from your form (or whatever place, before the connection object is
used however after that it is initialized) using the connection object you
have created with the designer (and don't change that in the designer
generated code) the connection string.

Someting as
OleDBConnection1.connectionstring = "xxxxxxxxxxxxx" & applicationstartuppath

Mostly those connection strings do not have that difficult as build with the
designer, have a look at these links for them.

http://www.connectionstrings.com/

http://www.able-consulting.com/ADO_Conn.htm

I hope this helps?

Cor

"Barkster" <bdog4@hotmail.com> .[color=blue]
>I don't usually create installers for my projects cause we have dotnet on
> all our machines and I normally just copy the exe and any required Dll's
> to
> the folder where I want to run. Normally I just stick
> application.startuppath to create dynamic paths but I can't seem to get
> this
> to work on my Oleconnection. If I change it in the form designer
> generated
> code to my application.startuppath etc.. it renames it on rebuild and if I
> try and set it on load by setting oleconnection1.connectionstring it
> doesn't
> seem to work either. Is there a way to make this load from the
> startuppath\data\ folder?
>
> Thanks
>
>[/color]


Cor Ligthert
Guest
 
Posts: n/a
#3: Nov 21 '05

re: Make DB move with EXE


Barkster,

I have strugled a longtime with this and it is so easy, just set in the load
event from your form (or whatever place, before the connection object is
used however after that it is initialized) using the connection object you
have created with the designer (and don't change that in the designer
generated code) the connection string.

Someting as
OleDBConnection1.connectionstring = "xxxxxxxxxxxxx" & applicationstartuppath

Mostly those connection strings do not have that difficult as build with the
designer, have a look at these links for them.

http://www.connectionstrings.com/

http://www.able-consulting.com/ADO_Conn.htm

I hope this helps?

Cor

"Barkster" <bdog4@hotmail.com> .[color=blue]
>I don't usually create installers for my projects cause we have dotnet on
> all our machines and I normally just copy the exe and any required Dll's
> to
> the folder where I want to run. Normally I just stick
> application.startuppath to create dynamic paths but I can't seem to get
> this
> to work on my Oleconnection. If I change it in the form designer
> generated
> code to my application.startuppath etc.. it renames it on rebuild and if I
> try and set it on load by setting oleconnection1.connectionstring it
> doesn't
> seem to work either. Is there a way to make this load from the
> startuppath\data\ folder?
>
> Thanks
>
>[/color]


B-Dog
Guest
 
Posts: n/a
#4: Nov 21 '05

re: Make DB move with EXE


Thanks Cor, I think I've got it working now.

"Cor Ligthert" <notmyfirstname@planet.nl> wrote in message
news:unoVY5ToEHA.596@TK2MSFTNGP11.phx.gbl...[color=blue]
> Barkster,
>
> I have strugled a longtime with this and it is so easy, just set in the[/color]
load[color=blue]
> event from your form (or whatever place, before the connection object is
> used however after that it is initialized) using the connection object[/color]
you[color=blue]
> have created with the designer (and don't change that in the designer
> generated code) the connection string.
>
> Someting as
> OleDBConnection1.connectionstring = "xxxxxxxxxxxxx" &[/color]
applicationstartuppath[color=blue]
>
> Mostly those connection strings do not have that difficult as build with[/color]
the[color=blue]
> designer, have a look at these links for them.
>
> http://www.connectionstrings.com/
>
> http://www.able-consulting.com/ADO_Conn.htm
>
> I hope this helps?
>
> Cor
>
> "Barkster" <bdog4@hotmail.com> .[color=green]
> >I don't usually create installers for my projects cause we have dotnet on
> > all our machines and I normally just copy the exe and any required Dll's
> > to
> > the folder where I want to run. Normally I just stick
> > application.startuppath to create dynamic paths but I can't seem to get
> > this
> > to work on my Oleconnection. If I change it in the form designer
> > generated
> > code to my application.startuppath etc.. it renames it on rebuild and if[/color][/color]
I[color=blue][color=green]
> > try and set it on load by setting oleconnection1.connectionstring it
> > doesn't
> > seem to work either. Is there a way to make this load from the
> > startuppath\data\ folder?
> >
> > Thanks
> >
> >[/color]
>
>[/color]


B-Dog
Guest
 
Posts: n/a
#5: Nov 21 '05

re: Make DB move with EXE


Thanks Cor, I think I've got it working now.

"Cor Ligthert" <notmyfirstname@planet.nl> wrote in message
news:unoVY5ToEHA.596@TK2MSFTNGP11.phx.gbl...[color=blue]
> Barkster,
>
> I have strugled a longtime with this and it is so easy, just set in the[/color]
load[color=blue]
> event from your form (or whatever place, before the connection object is
> used however after that it is initialized) using the connection object[/color]
you[color=blue]
> have created with the designer (and don't change that in the designer
> generated code) the connection string.
>
> Someting as
> OleDBConnection1.connectionstring = "xxxxxxxxxxxxx" &[/color]
applicationstartuppath[color=blue]
>
> Mostly those connection strings do not have that difficult as build with[/color]
the[color=blue]
> designer, have a look at these links for them.
>
> http://www.connectionstrings.com/
>
> http://www.able-consulting.com/ADO_Conn.htm
>
> I hope this helps?
>
> Cor
>
> "Barkster" <bdog4@hotmail.com> .[color=green]
> >I don't usually create installers for my projects cause we have dotnet on
> > all our machines and I normally just copy the exe and any required Dll's
> > to
> > the folder where I want to run. Normally I just stick
> > application.startuppath to create dynamic paths but I can't seem to get
> > this
> > to work on my Oleconnection. If I change it in the form designer
> > generated
> > code to my application.startuppath etc.. it renames it on rebuild and if[/color][/color]
I[color=blue][color=green]
> > try and set it on load by setting oleconnection1.connectionstring it
> > doesn't
> > seem to work either. Is there a way to make this load from the
> > startuppath\data\ folder?
> >
> > Thanks
> >
> >[/color]
>
>[/color]


Closed Thread