BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

picklist will not populate from database

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Databases
View previous topic :: View next topic  
Author Message
Peter Wetjens
Guest





PostPosted: Wed Apr 19, 2006 8:03 pm    Post subject: picklist will not populate from database Reply with quote



using Jbuilder2005, working on a application with Jdataexpress in
combination with a Mysql-database.
tried to rewrite the picklist example from Borland to my own needs, no luck.
the app knows exactly how many records there are in the "picklist"-dataset,
but doesn't display the actual data, just an empty column, in the right
place, with length = number of rows.

thanks for your help,

Peter
Back to top
Kevin Dean [TeamB]
Guest





PostPosted: Thu Apr 20, 2006 10:04 pm    Post subject: Re: picklist will not populate from database Reply with quote



Peter Wetjens wrote:

Quote:
using Jbuilder2005, working on a application with Jdataexpress in
combination with a Mysql-database.
tried to rewrite the picklist example from Borland to my own needs, no
luck. the app knows exactly how many records there are in the
"picklist"-dataset, but doesn't display the actual data, just an empty
column, in the right place, with length = number of rows.

Have you set the display column to a column that actually has non-null data?

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Back to top
Peter Wetjens
Guest





PostPosted: Fri Apr 21, 2006 5:04 pm    Post subject: Re: picklist will not populate from database Reply with quote



Hello Kevin, and others

Nice of you to take some time for this.
Below I included my code, because I don't understand your question. My
guess, the answer is "yes".
I had some println's in it to check what's coming in from the sql-server.
Data comes in fine.
In the database, both fields (template_name in template and user_template in
user) are of the same type and length.

I hope you can help, the project i'm working on is for my graduation as
bachelor.

Thanks,

Peter

"Kevin Dean [TeamB]" <NkOdSePaAnM (AT) datadevelopment (DOT) com> schreef in bericht
news:xn0el7k2whrik001-kdean (AT) www (DOT) teamb.com...
Quote:
Peter Wetjens wrote:

using Jbuilder2005, working on a application with Jdataexpress in
combination with a Mysql-database.
tried to rewrite the picklist example from Borland to my own needs, no
luck. the app knows exactly how many records there are in the
"picklist"-dataset, but doesn't display the actual data, just an empty
column, in the right place, with length = number of rows.

Have you set the display column to a column that actually has non-null
data?

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Back to top
Kevin Dean [TeamB]
Guest





PostPosted: Fri Apr 21, 2006 10:04 pm    Post subject: Re: picklist will not populate from database Reply with quote

Peter Wetjens wrote:

Quote:
Below I included my code, because I don't understand your question. My
guess, the answer is "yes".

There's no code in your post.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Back to top
Peter Wetjens
Guest





PostPosted: Sat Apr 22, 2006 9:03 am    Post subject: Re: picklist will not populate from database Reply with quote

Sorry, see below

database1.setConnection(new ConnectionDescriptor(
"jdbc:mysql://10.0.0.199:3306/rooster", "user", "password",
false,
"com.mysql.jdbc.Driver"));
jdbTable1.setDataSet(queryDataSet1);
jdbStatusLabel1.setText("jdbStatusLabel1");
dBDisposeMonitor1.setDataAwareComponentContainer(this);
queryDataSet1.setQuery(new
com.borland.dx.sql.dataset.QueryDescriptor(
database1, "SELECT * FROM USER", null, true, Load.ALL));
queryDataSet2.setQuery(new QueryDescriptor(database1,
"SELECT TEMPLATE_NAME FROM TEMPLATE", null, true,
Load.ALL));
column1.setColumnName("USER_TEMPLATE");
column1.setDataType(com.borland.dx.dataset.Variant.STRING);
column1.setPickList(new com.borland.dx.dataset.PickListDescriptor(
queryDataSet2, new String[] {"TEMPLATE_NAME"},
new String[] {"TEMPLATE_NAME"},
new String[] {"USER_TEMPLATE"}, null, false));
column1.setPrecision(30);
column1.setTableName("USER");
column1.setServerColumnName("USER_TEMPLATE");
column1.setSqlType(12);
contentPane.add(jdbStatusLabel1, java.awt.BorderLayout.SOUTH);
contentPane.add(jdbNavToolBar1, java.awt.BorderLayout.NORTH);
contentPane.add(jScrollPane1, java.awt.BorderLayout.CENTER);
jScrollPane1.getViewport().add(jdbTable1, null);
queryDataSet1.setColumns(new Column[] {column1});

"Kevin Dean [TeamB]" <NkOdSePaAnM (AT) datadevelopment (DOT) com> schreef in bericht
news:xn0el8ypl3m92t000-kdean (AT) www (DOT) teamb.com...
Quote:
Peter Wetjens wrote:

Below I included my code, because I don't understand your question. My
guess, the answer is "yes".

There's no code in your post.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Back to top
Peter Wetjens
Guest





PostPosted: Tue Apr 25, 2006 6:04 pm    Post subject: Re: picklist will not populate from database Reply with quote

Sorry, see below


jdbTable1.setDataSet(queryDataSet1);
jdbStatusLabel1.setText("jdbStatusLabel1");
dBDisposeMonitor1.setDataAwareComponentContainer(this);
queryDataSet1.setQuery(new
com.borland.dx.sql.dataset.QueryDescriptor(
database1, "SELECT * FROM USER", null, true, Load.ALL));
queryDataSet2.setQuery(new QueryDescriptor(database1,
"SELECT TEMPLATE_NAME FROM TEMPLATE", null, true,
Load.ALL));
column1.setColumnName("USER_TEMPLATE");
column1.setDataType(com.borland.dx.dataset.Variant.STRING);
column1.setPickList(new com.borland.dx.dataset.PickListDescriptor(
queryDataSet2, new String[] {"TEMPLATE_NAME"},
new String[] {"TEMPLATE_NAME"},
new String[] {"USER_TEMPLATE"}, null, false));
column1.setPrecision(30);
column1.setTableName("USER");
column1.setServerColumnName("USER_TEMPLATE");
column1.setSqlType(12);
contentPane.add(jdbStatusLabel1, java.awt.BorderLayout.SOUTH);
contentPane.add(jdbNavToolBar1, java.awt.BorderLayout.NORTH);
contentPane.add(jScrollPane1, java.awt.BorderLayout.CENTER);
jScrollPane1.getViewport().add(jdbTable1, null);
queryDataSet1.setColumns(new Column[] {column1});

"Kevin Dean [TeamB]" <NkOdSePaAnM (AT) datadevelopment (DOT) com> schreef in bericht
news:xn0el8ypl3m92t000-kdean (AT) www (DOT) teamb.com...
Quote:
Peter Wetjens wrote:

Below I included my code, because I don't understand your question. My
guess, the answer is "yes".

There's no code in your post.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Back to top
Kevin Dean [TeamB]
Guest





PostPosted: Tue Apr 25, 2006 9:03 pm    Post subject: Re: picklist will not populate from database Reply with quote

Peter Wetjens wrote:

Quote:
Sorry, see below

That looks fine; I just verified it against one of my own applications and
the only difference I can see is that you're explicitly setting the lookup
display column to null. Try setting that parameter to "TEMPLATE_NAME" and
see if it makes a difference.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Back to top
Peter Wetjens
Guest





PostPosted: Wed Apr 26, 2006 11:04 am    Post subject: Re: picklist will not populate from database Reply with quote

the steps I took:

changed display column to "TEMPLATE_NAME"
started app
jumped into pull-down list -> no difference
after closing app -> error "0>=0" (arrayindex out of bounds)
started app again
jumped into pull-down list -> no difference
changed from pull-down column to another column on same row ->error "no
unique row-id"
closed app
as described in the error, I disabled metadataupdate.row_id on queryset ans
set row_id on a column with unique values (created column 2)
started app again
jumped up and down in table, no difference, no errors, the picklist shows no
values, but knows exactly how many elements came in with the (sub)query.

"Kevin Dean [TeamB]" <NkOdSePaAnM (AT) datadevelopment (DOT) com> schreef in bericht
news:xn0elejaw2q6n4000-kdean (AT) www (DOT) teamb.com...
Quote:
Peter Wetjens wrote:

Sorry, see below

That looks fine; I just verified it against one of my own applications and
the only difference I can see is that you're explicitly setting the lookup
display column to null. Try setting that parameter to "TEMPLATE_NAME" and
see if it makes a difference.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Back to top
Kevin Dean [TeamB]
Guest





PostPosted: Wed Apr 26, 2006 12:03 pm    Post subject: Re: picklist will not populate from database Reply with quote

Peter Wetjens wrote:

Quote:
the steps I took:

At this point I don't think I can help any further without getting a
detailed look at the database, sorry.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Back to top
Peter Wetjens
Guest





PostPosted: Wed Apr 26, 2006 3:04 pm    Post subject: Re: picklist will not populate from database Reply with quote

Hey Kevin, and others

I was setting up a mysql database on my server, for you to poke around with.
Just before posting some info like where to find it and how to login to
phpmyadmin, I was thinking: let's try one more time. No need to guess what:
it worked. What did I do different? I defined all the fieldnames in the DB
in uppercase !

The only thing I had to resolve was the error message concerning the row-id.

Thanks for your support.

Peter

"Kevin Dean [TeamB]" <NkOdSePaAnM (AT) datadevelopment (DOT) com> schreef in bericht
news:xn0elfjch1hd3b000-kdean (AT) www (DOT) teamb.com...
Quote:
Peter Wetjens wrote:

the steps I took:

At this point I don't think I can help any further without getting a
detailed look at the database, sorry.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Back to top
Peter Wetjens
Guest





PostPosted: Thu Apr 27, 2006 3:04 pm    Post subject: Re: picklist will not populate from database Reply with quote

Hey Kevin, and others

I was setting up a mysql database on my server, for you to poke around with.
Just before posting some info like where to find it and how to login to
phpmyadmin, I was thinking: let's try one more time. No need to guess what:
it worked. What did I do different? I defined all the fieldnames in the DB
in uppercase !

The only thing I had to resolve was the error message concerning the row-id.

Thanks for your support.

Peter

"Kevin Dean [TeamB]" <NkOdSePaAnM (AT) datadevelopment (DOT) com> schreef in bericht
news:xn0elfjch1hd3b000-kdean (AT) www (DOT) teamb.com...
Quote:
Peter Wetjens wrote:

the steps I took:

At this point I don't think I can help any further without getting a
detailed look at the database, sorry.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.