eskalha Posted May 23, 2012 at 06:08 PM Report #457700 Posted May 23, 2012 at 06:08 PM Boa tarde, Eu fiz uma aplicação em C# que usa uma base de dados feita em SQL Server. O meu problema é que se quiser executar a aplicação noutro pc, tenho que andar sempre a mudar a connection string, como o caminho da BD e andar a ver onde está o caminho do SQL Server nesse pc pra colocar no DataSource Não há maneira de contornar isso?
Rechousa Posted May 23, 2012 at 06:18 PM Report #457702 Posted May 23, 2012 at 06:18 PM (edited) Boas, Podes fazê-lo usando as AppSettings do ConfigurationManager. Mais info aqui: http://msdn.microsof...ppsettings.aspx Podes usar tb uma connection string com o ip ou nome do servidor. Estás a usar LOCALHOST ou . ou 127.0.0.1 na connection string? Edited May 23, 2012 at 06:23 PM by Rechousa Acrescentei mais informação Pedro Martins Sharing is Knowledge! http://www.linkedin.com/in/rechousa
eskalha Posted May 23, 2012 at 08:15 PM Author Report #457718 Posted May 23, 2012 at 08:15 PM Tou a usar LOCALHOST! ok vou dar uma olhadela ao link que mandaste 🙂 thanks
eskalha Posted May 23, 2012 at 09:02 PM Author Report #457728 Posted May 23, 2012 at 09:02 PM Outro problema :S a DLL System.Configuration que tenho nao da para aceder ao Configuration Manager :s
bruno1234 Posted May 23, 2012 at 09:46 PM Report #457733 Posted May 23, 2012 at 09:46 PM Vê se não te falta o using Matraquilhos para Android. Gratuito na Play Store. https://play.google.com/store/apps/details?id=pt.bca.matraquilhos
eskalha Posted May 23, 2012 at 10:44 PM Author Report #457741 Posted May 23, 2012 at 10:44 PM Nao, tenho using System.Configuration; o System.Configuration.ConfigurationManager nao aparece neste namespace:S
Caça Posted May 23, 2012 at 11:02 PM Report #457746 Posted May 23, 2012 at 11:02 PM Tens de adicionar essa dll as referencias. Pedro Martins Não respondo a duvidas por PM
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now