Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Jesús Alvarez Manrique

Jesús Alvarez Manrique

Scheduled Pinned Locked Moved The Lounge
databasecsharpsql-serverwpfsysadmin
19 Posts 12 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U User 8968497

    Tengo un ComboBox en WPF que relleno mediante la ejecución de un procedimiento almacenado de SQL server, con los nombres de los autores de determinados artículos de prensa. Hasta ahí perfectamente. El problema viene cuando después de seleccionar un autor (Apellidos, Nombre) y solicitar que me descomponga la cadena mediante la función Split(',') me da error al no encontrar el segundo elemento del array. La explicación está en que intenta descomponer el siguiente resultado de la selección en el ComboBox: ComboBoxWPF_LINQ_01.usp_ListadoCompletoAutoresResult, siendo ComboBoxWPF_LINQ_01 el nombre de la Solución y usp_ListadoCompletoAutores el procedimiento almacenado que ejecuto para llenar el ComboBox. El código que utilizo es el siguiente: private void MostrarAutor() {string oAutor, oApellidos, oNombre; string [] CadenaSeparada; DataClasses1DataContext db = new DataClasses1DataContext(); cboAutores.ItemSource = db.usp_ListadoCompletoAutores().ToList(); oAutor = cboAutotes.Text.ToString; CadenaSeparada = oAutor.Split(','); textBox1.Text = CadenaSeparada[0]; textBox2.Text = CadenaSeparada[1]; } Tambien lo he probado con oAutor = cboAutores.SelectedItem.ToString() y tampoco me funciona Las cadenas las necesito para buscar en la base de datos los artículos escritos de cada autor, que figuren en ella. El comboBox se llena perfectamente con cadenas con la siguiente estructura Apellido1 Apellido2, Nombre Apellido1 Apellido2, Nombre Apellido1 Apellido2, Nombre ...................................... (Apellido1 Apellido2, son un sólo campo) Selecciono un Item, y en el texto del combo aparece la cadena seleccionada con la misma estructura, osea, Apellido1 Apellido2, Nombre, y es aquí donde comienzan los problemas, pues cuando hago oAutor = cboAutotes.Text.ToString; ó oAutor = cboAutotes; me devuelve "ComboBoxWPF_LINQ_01.usp_ListadoCompletoAutoresResult", en lugar de devolverme la cadena "Apellido1 Apellido2, Nombre", nada parecido con la realidad.

    Jesús Álvarez Manrique

    W Offline
    W Offline
    Wjousts
    wrote on last edited by
    #4

    Si Señor.

    1 Reply Last reply
    0
    • T TheGreatAndPowerfulOz

      Por favor de postar este pregunta in este forum aqui[^]

      If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams
      You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun
      Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein

      S Offline
      S Offline
      SoMad
      wrote on last edited by
      #5

      Yes, and in English, please. Soren Madsen

      1 Reply Last reply
      0
      • U User 8968497

        Tengo un ComboBox en WPF que relleno mediante la ejecución de un procedimiento almacenado de SQL server, con los nombres de los autores de determinados artículos de prensa. Hasta ahí perfectamente. El problema viene cuando después de seleccionar un autor (Apellidos, Nombre) y solicitar que me descomponga la cadena mediante la función Split(',') me da error al no encontrar el segundo elemento del array. La explicación está en que intenta descomponer el siguiente resultado de la selección en el ComboBox: ComboBoxWPF_LINQ_01.usp_ListadoCompletoAutoresResult, siendo ComboBoxWPF_LINQ_01 el nombre de la Solución y usp_ListadoCompletoAutores el procedimiento almacenado que ejecuto para llenar el ComboBox. El código que utilizo es el siguiente: private void MostrarAutor() {string oAutor, oApellidos, oNombre; string [] CadenaSeparada; DataClasses1DataContext db = new DataClasses1DataContext(); cboAutores.ItemSource = db.usp_ListadoCompletoAutores().ToList(); oAutor = cboAutotes.Text.ToString; CadenaSeparada = oAutor.Split(','); textBox1.Text = CadenaSeparada[0]; textBox2.Text = CadenaSeparada[1]; } Tambien lo he probado con oAutor = cboAutores.SelectedItem.ToString() y tampoco me funciona Las cadenas las necesito para buscar en la base de datos los artículos escritos de cada autor, que figuren en ella. El comboBox se llena perfectamente con cadenas con la siguiente estructura Apellido1 Apellido2, Nombre Apellido1 Apellido2, Nombre Apellido1 Apellido2, Nombre ...................................... (Apellido1 Apellido2, son un sólo campo) Selecciono un Item, y en el texto del combo aparece la cadena seleccionada con la misma estructura, osea, Apellido1 Apellido2, Nombre, y es aquí donde comienzan los problemas, pues cuando hago oAutor = cboAutotes.Text.ToString; ó oAutor = cboAutotes; me devuelve "ComboBoxWPF_LINQ_01.usp_ListadoCompletoAutoresResult", en lugar de devolverme la cadena "Apellido1 Apellido2, Nombre", nada parecido con la realidad.

        Jesús Álvarez Manrique

        S Offline
        S Offline
        Slacker007
        wrote on last edited by
        #6

        42 bacon burritos.

        Mike HankeyM 1 Reply Last reply
        0
        • S Slacker007

          42 bacon burritos.

          Mike HankeyM Offline
          Mike HankeyM Offline
          Mike Hankey
          wrote on last edited by
          #7

          Would you like salsa with that?

          VS2010/Atmel Studio 6.0 ToDo Manager Extension
          Version 3.0 now available. There is no place like 127.0.0.1

          1 Reply Last reply
          0
          • U User 8968497

            Tengo un ComboBox en WPF que relleno mediante la ejecución de un procedimiento almacenado de SQL server, con los nombres de los autores de determinados artículos de prensa. Hasta ahí perfectamente. El problema viene cuando después de seleccionar un autor (Apellidos, Nombre) y solicitar que me descomponga la cadena mediante la función Split(',') me da error al no encontrar el segundo elemento del array. La explicación está en que intenta descomponer el siguiente resultado de la selección en el ComboBox: ComboBoxWPF_LINQ_01.usp_ListadoCompletoAutoresResult, siendo ComboBoxWPF_LINQ_01 el nombre de la Solución y usp_ListadoCompletoAutores el procedimiento almacenado que ejecuto para llenar el ComboBox. El código que utilizo es el siguiente: private void MostrarAutor() {string oAutor, oApellidos, oNombre; string [] CadenaSeparada; DataClasses1DataContext db = new DataClasses1DataContext(); cboAutores.ItemSource = db.usp_ListadoCompletoAutores().ToList(); oAutor = cboAutotes.Text.ToString; CadenaSeparada = oAutor.Split(','); textBox1.Text = CadenaSeparada[0]; textBox2.Text = CadenaSeparada[1]; } Tambien lo he probado con oAutor = cboAutores.SelectedItem.ToString() y tampoco me funciona Las cadenas las necesito para buscar en la base de datos los artículos escritos de cada autor, que figuren en ella. El comboBox se llena perfectamente con cadenas con la siguiente estructura Apellido1 Apellido2, Nombre Apellido1 Apellido2, Nombre Apellido1 Apellido2, Nombre ...................................... (Apellido1 Apellido2, son un sólo campo) Selecciono un Item, y en el texto del combo aparece la cadena seleccionada con la misma estructura, osea, Apellido1 Apellido2, Nombre, y es aquí donde comienzan los problemas, pues cuando hago oAutor = cboAutotes.Text.ToString; ó oAutor = cboAutotes; me devuelve "ComboBoxWPF_LINQ_01.usp_ListadoCompletoAutoresResult", en lugar de devolverme la cadena "Apellido1 Apellido2, Nombre", nada parecido con la realidad.

            Jesús Álvarez Manrique

            J Offline
            J Offline
            Joan M
            wrote on last edited by
            #8

            Jesús, has cometido dos errores garrafales: El primero: estás en un sitio de habla inglesa, por respeto a los demás se habla en inglés siempre, se sea del país que se sea. El segundo: has posteado tu mensaje en el "The Lounge" que es casi el único sitio de "The Codeproject" en el que no se puede hablar de programación. Te recomiendo que postees tu pregunta en la sección "Questions and Answers", sigue el link[^], y que lo hagas en inglés. Si tienes problemas para traducir tu pregunta, puedo traducirla yo por ti. Suerte! ******************************************* Jesús, You've made two big mistakes: 1. You've posted a programming question in "The Lounge", which is almost the only place in :bob: where it is not allowed to do it. 2. You've posted your question in Spanish, this is a site that speaks English and people from around the world speak this language here. I recommend you to post the question in the Questions and answers section, follow the link[^], and do it in English. If you have problems to translate your question to English, let me know it and I will do it for you. Good luck!

            [www.tamautomation.com] Robots, CNC and PLC machines for grinding and polishing.

            A L C 3 Replies Last reply
            0
            • J Joan M

              Jesús, has cometido dos errores garrafales: El primero: estás en un sitio de habla inglesa, por respeto a los demás se habla en inglés siempre, se sea del país que se sea. El segundo: has posteado tu mensaje en el "The Lounge" que es casi el único sitio de "The Codeproject" en el que no se puede hablar de programación. Te recomiendo que postees tu pregunta en la sección "Questions and Answers", sigue el link[^], y que lo hagas en inglés. Si tienes problemas para traducir tu pregunta, puedo traducirla yo por ti. Suerte! ******************************************* Jesús, You've made two big mistakes: 1. You've posted a programming question in "The Lounge", which is almost the only place in :bob: where it is not allowed to do it. 2. You've posted your question in Spanish, this is a site that speaks English and people from around the world speak this language here. I recommend you to post the question in the Questions and answers section, follow the link[^], and do it in English. If you have problems to translate your question to English, let me know it and I will do it for you. Good luck!

              [www.tamautomation.com] Robots, CNC and PLC machines for grinding and polishing.

              A Offline
              A Offline
              Albert Holguin
              wrote on last edited by
              #9

              Good Spanish! ...I'd be happy to translate as well... Muy buen Español! ...yo tambien podria hacer tranducciones si alguien necesita ayuda...

              S 1 Reply Last reply
              0
              • L loctrice

                WTE?!..... -edit- ask this in the correct forum.

                If it moves, compile it

                Z Offline
                Z Offline
                ZurdoDev
                wrote on last edited by
                #10

                The correct response is Como?

                There are only 10 types of people in the world, those who understand binary and those who don't.

                1 Reply Last reply
                0
                • J Joan M

                  Jesús, has cometido dos errores garrafales: El primero: estás en un sitio de habla inglesa, por respeto a los demás se habla en inglés siempre, se sea del país que se sea. El segundo: has posteado tu mensaje en el "The Lounge" que es casi el único sitio de "The Codeproject" en el que no se puede hablar de programación. Te recomiendo que postees tu pregunta en la sección "Questions and Answers", sigue el link[^], y que lo hagas en inglés. Si tienes problemas para traducir tu pregunta, puedo traducirla yo por ti. Suerte! ******************************************* Jesús, You've made two big mistakes: 1. You've posted a programming question in "The Lounge", which is almost the only place in :bob: where it is not allowed to do it. 2. You've posted your question in Spanish, this is a site that speaks English and people from around the world speak this language here. I recommend you to post the question in the Questions and answers section, follow the link[^], and do it in English. If you have problems to translate your question to English, let me know it and I will do it for you. Good luck!

                  [www.tamautomation.com] Robots, CNC and PLC machines for grinding and polishing.

                  L Offline
                  L Offline
                  loctrice
                  wrote on last edited by
                  #11

                  so will google translate, which is how I figured out what he wanted in the first place.

                  If it moves, compile it

                  1 Reply Last reply
                  0
                  • U User 8968497

                    Tengo un ComboBox en WPF que relleno mediante la ejecución de un procedimiento almacenado de SQL server, con los nombres de los autores de determinados artículos de prensa. Hasta ahí perfectamente. El problema viene cuando después de seleccionar un autor (Apellidos, Nombre) y solicitar que me descomponga la cadena mediante la función Split(',') me da error al no encontrar el segundo elemento del array. La explicación está en que intenta descomponer el siguiente resultado de la selección en el ComboBox: ComboBoxWPF_LINQ_01.usp_ListadoCompletoAutoresResult, siendo ComboBoxWPF_LINQ_01 el nombre de la Solución y usp_ListadoCompletoAutores el procedimiento almacenado que ejecuto para llenar el ComboBox. El código que utilizo es el siguiente: private void MostrarAutor() {string oAutor, oApellidos, oNombre; string [] CadenaSeparada; DataClasses1DataContext db = new DataClasses1DataContext(); cboAutores.ItemSource = db.usp_ListadoCompletoAutores().ToList(); oAutor = cboAutotes.Text.ToString; CadenaSeparada = oAutor.Split(','); textBox1.Text = CadenaSeparada[0]; textBox2.Text = CadenaSeparada[1]; } Tambien lo he probado con oAutor = cboAutores.SelectedItem.ToString() y tampoco me funciona Las cadenas las necesito para buscar en la base de datos los artículos escritos de cada autor, que figuren en ella. El comboBox se llena perfectamente con cadenas con la siguiente estructura Apellido1 Apellido2, Nombre Apellido1 Apellido2, Nombre Apellido1 Apellido2, Nombre ...................................... (Apellido1 Apellido2, son un sólo campo) Selecciono un Item, y en el texto del combo aparece la cadena seleccionada con la misma estructura, osea, Apellido1 Apellido2, Nombre, y es aquí donde comienzan los problemas, pues cuando hago oAutor = cboAutotes.Text.ToString; ó oAutor = cboAutotes; me devuelve "ComboBoxWPF_LINQ_01.usp_ListadoCompletoAutoresResult", en lugar de devolverme la cadena "Apellido1 Apellido2, Nombre", nada parecido con la realidad.

                    Jesús Álvarez Manrique

                    E Offline
                    E Offline
                    Emmanuel Medina
                    wrote on last edited by
                    #12

                    Wow so many downvotes poor guy is in the negative points :laugh: . He should've had some time to learn to use CP tho, it seems he has been a member for 4 months now...

                    A 1 Reply Last reply
                    0
                    • J Joan M

                      Jesús, has cometido dos errores garrafales: El primero: estás en un sitio de habla inglesa, por respeto a los demás se habla en inglés siempre, se sea del país que se sea. El segundo: has posteado tu mensaje en el "The Lounge" que es casi el único sitio de "The Codeproject" en el que no se puede hablar de programación. Te recomiendo que postees tu pregunta en la sección "Questions and Answers", sigue el link[^], y que lo hagas en inglés. Si tienes problemas para traducir tu pregunta, puedo traducirla yo por ti. Suerte! ******************************************* Jesús, You've made two big mistakes: 1. You've posted a programming question in "The Lounge", which is almost the only place in :bob: where it is not allowed to do it. 2. You've posted your question in Spanish, this is a site that speaks English and people from around the world speak this language here. I recommend you to post the question in the Questions and answers section, follow the link[^], and do it in English. If you have problems to translate your question to English, let me know it and I will do it for you. Good luck!

                      [www.tamautomation.com] Robots, CNC and PLC machines for grinding and polishing.

                      C Offline
                      C Offline
                      Chris Meech
                      wrote on last edited by
                      #13

                      :thumbsup: :thumbsup: :thumbsup: Offer to help out the OP. Always worth a five. :)

                      Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

                      J A 2 Replies Last reply
                      0
                      • A Albert Holguin

                        Good Spanish! ...I'd be happy to translate as well... Muy buen Español! ...yo tambien podria hacer tranducciones si alguien necesita ayuda...

                        S Offline
                        S Offline
                        Slacker007
                        wrote on last edited by
                        #14

                        Joan is from Spain, you know.

                        1 Reply Last reply
                        0
                        • C Chris Meech

                          :thumbsup: :thumbsup: :thumbsup: Offer to help out the OP. Always worth a five. :)

                          Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

                          J Offline
                          J Offline
                          Joan M
                          wrote on last edited by
                          #15

                          Who would downvote this kind of post? :sigh: Countered...

                          [www.tamautomation.com] Robots, CNC and PLC machines for grinding and polishing.

                          1 Reply Last reply
                          0
                          • C Chris Meech

                            :thumbsup: :thumbsup: :thumbsup: Offer to help out the OP. Always worth a five. :)

                            Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

                            A Offline
                            A Offline
                            Albert Holguin
                            wrote on last edited by
                            #16

                            Countered as well...

                            1 Reply Last reply
                            0
                            • E Emmanuel Medina

                              Wow so many downvotes poor guy is in the negative points :laugh: . He should've had some time to learn to use CP tho, it seems he has been a member for 4 months now...

                              A Offline
                              A Offline
                              Albert Holguin
                              wrote on last edited by
                              #17

                              I think I was a member for like a year or two before I became active on the site...

                              E 1 Reply Last reply
                              0
                              • A Albert Holguin

                                I think I was a member for like a year or two before I became active on the site...

                                E Offline
                                E Offline
                                Emmanuel Medina
                                wrote on last edited by
                                #18

                                Well, yeah, I meant he should realize that the site member's used language is English and should know, just by reading, that the Lounge is not the place for Programming questions; I've been a member since Aug 2007, but only started replying to posts/questions like 3 weeks ago, still, I knew that. Anyway, I've recommended him a site in spanish so he doesn't get a bajillion downvotes every time he asks a question.

                                A 1 Reply Last reply
                                0
                                • E Emmanuel Medina

                                  Well, yeah, I meant he should realize that the site member's used language is English and should know, just by reading, that the Lounge is not the place for Programming questions; I've been a member since Aug 2007, but only started replying to posts/questions like 3 weeks ago, still, I knew that. Anyway, I've recommended him a site in spanish so he doesn't get a bajillion downvotes every time he asks a question.

                                  A Offline
                                  A Offline
                                  Albert Holguin
                                  wrote on last edited by
                                  #19

                                  Was just pointing out the fact that the account was created a while back ago doesn't imply he knows how to use the site. Perhaps he doesn't understand/speak English well so he didn't read the posting rules... ...he's sure gotten flak about it now though... in at least a couple of languages.

                                  1 Reply Last reply
                                  0
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • World
                                  • Users
                                  • Groups