|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
my.settings and the connectionstringHi, a question
I use a mdb database for my application. The application should be able to handle more than one mdb, so I think I have to change my.settings.ConString (this is my connectionstring) Like this Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\DAT.mdb;Persist Security Info=True;Password=password;User ID=user;Jet OLEDB:System database=c:\security.mdw;Jet OLEDB:Database Password=password The only thing I want to change is the data source element... But this setting is read only and the scope cannot be set to "User" Or am I on the wrong way? Greetings from Germany Andre Hi Andre,
you need to setup a string variable and concatenate it in the connection string. Here is an example from a connection of mine: Me.ConnectionString = _ "Provider=Microsoft.Jet.OLEDB.4.0" & _ ";Data Source=" & Me.InformazioniFileDatabase.NomeFile & _ ";User ID=" & UserId & _ ";Jet OLEDB:Database Password=" & Password & _ ";Mode=Share Deny None" the database property is just for information, once you have connected. -tom Andre Rode ha scritto: Show quoteHide quote > Hi, a question > > I use a mdb database for my application. The application should be able > to handle more than one mdb, so I think I have to change > my.settings.ConString (this is my connectionstring) Like this > Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\DAT.mdb;Persist Security > Info=True;Password=password;User ID=user;Jet OLEDB:System > database=c:\security.mdw;Jet OLEDB:Database Password=password > > The only thing I want to change is the data source element... > > But this setting is read only and the scope cannot be set to "User" > > Or am I on the wrong way? > > Greetings from Germany > Andre tommaso.gasta***@uniroma1.it schrieb:
Show quoteHide quote > Hi Andre, Okay, seems to be another way.> > you need to setup a string variable and concatenate it in the > connection string. > Here is an example from a connection of mine: > > Me.ConnectionString = _ > "Provider=Microsoft.Jet.OLEDB.4.0" & _ > ";Data Source=" & > Me.InformazioniFileDatabase.NomeFile & _ > ";User ID=" & UserId & _ > ";Jet OLEDB:Database Password=" & Password & _ > ";Mode=Share Deny None" > > the database property is just for information, once you have connected. > > -tom > > Andre Rode ha scritto: > >> Hi, a question >> >> I use a mdb database for my application. The application should be able >> to handle more than one mdb, so I think I have to change >> my.settings.ConString (this is my connectionstring) Like this >> Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\DAT.mdb;Persist Security >> Info=True;Password=password;User ID=user;Jet OLEDB:System >> database=c:\security.mdw;Jet OLEDB:Database Password=password >> >> The only thing I want to change is the data source element... >> >> But this setting is read only and the scope cannot be set to "User" >> >> Or am I on the wrong way? >> >> Greetings from Germany >> Andre > But I use the connectionString defined in the settings for binding data to my datagridviews. How will this work? Should the ConnectionString be a global variable? Sorry for the stupid questions, I'm new to ADO.NET, I've worked with DAO till now... I miss my recordsets :( Greetings from Germany André Andre,
I have given you an answer in another newsgroup, Cor Show quoteHide quote "Andre Rode" <Angel-***@gmx.de> schreef in bericht news:e74ava$urf$1@online.de... > Hi, a question > > I use a mdb database for my application. The application should be able to > handle more than one mdb, so I think I have to change > my.settings.ConString (this is my connectionstring) Like this > Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\DAT.mdb;Persist Security > Info=True;Password=password;User ID=user;Jet OLEDB:System > database=c:\security.mdw;Jet OLEDB:Database Password=password > > The only thing I want to change is the data source element... > > But this setting is read only and the scope cannot be set to "User" > > Or am I on the wrong way? > > Greetings from Germany > Andre
How to compare Word Docs?
Changing datagridview cells borders at runtime FolderBrowserDialog hangs in 2005 vs for .Net SUCKS Big Time Integer literals Saving PointF data in MSAccess How can I change a property of a control form Form2 ? Unknown error.... Object reference not set to an instance of an object Help me about Filter |
|||||||||||||||||||||||