QUERY AND INSERT WITH COMBOBOX

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
tomastoteles
Posts: 15
Joined: Mon Jan 12, 2015 7:07 am

QUERY AND INSERT WITH COMBOBOX

Post by tomastoteles » Wed Sep 02, 2015 9:00 am

Hello community.

I'm looking for ways to display data from a database into a combo box, and once the show to insert what is chosen for this.

Could you please help?

Thank you!

GREETINGS!

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: QUERY AND INSERT WITH COMBOBOX

Post by Klaus » Wed Sep 02, 2015 1:17 pm

Hi tomastoteles,

what part is making problems: fetching data from database or putting this data into a combo box?

Sorry, don't understand this part:

Code: Select all

...and once the show to insert what is chosen for this.
?


Best

Klaus

P.S.
Please do not use all caps (thread titles), that is considered SCREAMING on the internet 8)

tomastoteles
Posts: 15
Joined: Mon Jan 12, 2015 7:07 am

Re: QUERY AND INSERT WITH COMBOBOX

Post by tomastoteles » Wed Sep 02, 2015 1:59 pm

Hi Klaus! Thanks for answering.

First of all, an apology, I forgot for a moment the rules of Netiquette lol ...

and well, I want to retrieve data from MySQL and display them in a combobox.

Thanks and best regards!

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: QUERY AND INSERT WITH COMBOBOX

Post by Klaus » Wed Sep 02, 2015 2:07 pm

Hi tomastoteles,
tomastoteles wrote:...and well, I want to retrieve data from MySQL and display them in a combobox.
yes, THAT'S what I understood so far, but does not answer my question:
what part is making problems: fetching data from database or putting this data into a combo box?
since you now already know how to fetch images form a database, you should be able to fetch data from the database in general, right? 8)


Best

Klaus

tomastoteles
Posts: 15
Joined: Mon Jan 12, 2015 7:07 am

Re: QUERY AND INSERT WITH COMBOBOX

Post by tomastoteles » Wed Sep 02, 2015 2:26 pm

Hello Klaus.

Yes, well, you're right ... Apparently yesterday was in no mood to think LOL.

Forget it, and sorry ...

Leave the solution to my problem (very easy), maybe someone will serve:

Code: Select all

  global conID
   put "SELECT *  from Programas" into PSQL
   
   put revDataFromQuery(tab,cr,ConID,pSQL) into pRecords
   
   if pRecords begins with "revdberr" then 
      answer error "Hubo un problema con los datos de la Base de Datos" & pRecords
      exit to top
   end if
   
    put pRecords into btn "Programa"
xD

Greetings! And thanks!

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: QUERY AND INSERT WITH COMBOBOX

Post by Klaus » Wed Sep 02, 2015 2:47 pm

Hi tomastoteles,,

I did not mean NOT to help, just wanted to know what you can solve by yourself! 8)

OK, the script is OK in general, but "select * from tablename" will of course return ALL data
in that table in a TAB and CR delimited list.

And this is something that you CAN put into a button, but does not make sense nor will it be usable. :D
So what data from your table dou you want to display in your button?


Best

Klaus

tomastoteles
Posts: 15
Joined: Mon Jan 12, 2015 7:07 am

Re: QUERY AND INSERT WITH COMBOBOX

Post by tomastoteles » Wed Sep 02, 2015 3:03 pm

Hello Klaus = D.

I know, and really the solution was simple self ... Sometimes confused lol ...

I really wanted to do from the beginning and I did ... And take into account your recommendation ... But the combo box data shows me he wanted from MySql ... Like I said, the solution was in sight, and you helped me realize it = D

Thank you very much, and hope they serve so I stopped in this post = D


Best regards! and thanks again!

Post Reply

Return to “Databases”