Source language: Translate to:

Question for the command dbpExecSQL and dbpSetColumnTitles

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Question for the command dbpExecSQL and dbpSetColumnTitles

Postby Stefan » Tue May 06, 2008 4:38 am

I make a dbpExecSQL command and save the result in a temporary table.
Now i want show the table, but will have my own titles with the command dbpSetColumnTitles and my own Column Widths with the command dbpSetColumnsWidths. But i can't set the titles and Widths.

My Code:

dbpExecSQL "mysql_gsc" "SELECT stuckliste.gruppe, stuckliste.sorte, stuckliste.farbe, stuckliste.groesse, stuckliste.breite, material.bez_d, material.bild FROM stuckliste left join (material) ON (material.gruppe=stuckliste.gruppe and material.sorte=stuckliste.sorte and material.farbe=stuckliste.farbe) WHERE stuckliste.artikelnr=[artikelnr] and stuckliste.flnr=[flnr] and stuckliste.variante=[#39][variante][#39]" "stueckliste"

dbpSetColumnTitles "mysql_gsc" "stueckliste" "stuckliste.gruppe=[text28];stuckliste.sorte=[text29];stuckliste.farbe=[text30];stuckliste.groesse=[text31];stuckliste.breite=[text32];material.bez_d=[text9];bild=[text11]"

dbpSetColumnWidths "mysql_gsc" "stueckliste" "stuckliste.gruppe=70;stucklistesorte=70;stucklistefarbe=70;stucklistegroesse=70;stucklistebreite=0;material.bez_d=150;bild=90"

What must i do, that i can set the titles?
Thanks!
Stefan
 
Posts: 35
Joined: Mon Dec 03, 2007 7:00 am

Postby Gaev » Tue May 06, 2008 5:13 am

Stefan:

Your primary input table is stuckliste and your (temporary) results table is stueckliste.

a) In your dbpSetColumnTitles command you specify fields like ... stuckliste.gruppe ... but stuckliste is the input table.

b) In your dbpSetColumnWidths command you specify fields like ... stuckliste.gruppe ... and also fields like stucklistesorte ... no dot to separate tablename from fieldname ... and finally, a field named material.bez_d


According to the Help file ... an example of dbpSetColumnWidths is ..
Code: Select all
dbpSetColumnWidths "AddrBook" "Contacts" "FirstName=90;LastName=90;Company=90;Street=150;City=90;State=90;Zip=90; Country=90;Telephone=90;EMail=90;WebSite=90;Comments=350"

.. note that the ...

- the first parameter identifies the database
- the second parameter identifies the tablename
- the third parameter identifies JUST the fieldnames (NOT tablename.fieldname !)

Similarly for the dbpSetColumnTitles command.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Stefan » Tue May 06, 2008 7:50 am

Thanks, fine, all works.
Stefan
 
Posts: 35
Joined: Mon Dec 03, 2007 7:00 am


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 3 guests