Tim§id€ Posted May 8, 2010 at 12:20 AM Report #325949 Posted May 8, 2010 at 12:20 AM Boa noite malta! ? eu estou a gravar este caminho numa base de dados C:\Documents and Settings\rewdfas\Ambiente de trabalho\imgem1.png mas ele ao guardar na base de dados ele guarda sem essa barra \ como e que posso fazer para ele guardar com a barra!? ? C:Documents and Settings ewdfasAmbiente de trabalho angoIcons.png já tentei assim mas da na mesma sem barra textBox_ImgCapaCaminho.Text ="@"+ abrir_img.FileName; (isto utilizando OpenFileDialog) Obrigado.! 👍 [glow=red,2,300][/glow] ...º(>_<)º...
Tim§id€ Posted May 8, 2010 at 10:53 PM Author Report #326077 Posted May 8, 2010 at 10:53 PM Alguém me pode ajudar?!? :dontgetit: ...º(>_<)º...
ByMySlf Posted May 9, 2010 at 09:31 AM Report #326102 Posted May 9, 2010 at 09:31 AM Coloca o código que tens.
Tim§id€ Posted May 9, 2010 at 01:15 PM Author Report #326113 Posted May 9, 2010 at 01:15 PM if (abrir_img.ShowDialog() == DialogResult.OK) { // textBox_ImgCapaCaminho.Text ="@"+ abrir_img.FileName; textBox_ImgCapaCaminho.Text =abrir_img.FileName; } tentei das duas maneiras ma da igual, guarda na BD sem \ ...º(>_<)º...
M6 Posted May 9, 2010 at 01:17 PM Report #326114 Posted May 9, 2010 at 01:17 PM Faz escape da barra, ou seja, substitui a \ por \\. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar."
Tim§id€ Posted May 9, 2010 at 01:24 PM Author Report #326115 Posted May 9, 2010 at 01:24 PM entao e como e que vou substituir o \ por \\ , ou seja o utlizador carrega no butao buscar imagem. ai ele escolhe a imagem que numa texbox.Text=c:\programas\prog\imagens\imagem1.jpg e guarda na BD para substituir o \ por \\ tenho que ser o utilizador mudar as \ pelo \\? ...º(>_<)º...
ByMySlf Posted May 9, 2010 at 02:39 PM Report #326119 Posted May 9, 2010 at 02:39 PM Procuras na string pela \ e fazes o replace por \\.
Tim§id€ Posted May 10, 2010 at 09:39 PM Author Report #326363 Posted May 10, 2010 at 09:39 PM Procuras na string pela \ e fazes o replace por \\. Boas ByMySlf 🙂 eu faço assim x = textBox_ImgCapaCaminho.Text.Replace("\\", "\\\\"); textBox_ImgCapaCaminho.Text = x; e funciona...Obrigado pela ajuda 😁 ...º(>_<)º...
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