Hi Chad Thanks for the reply. But my question was more about the mapping of the results into objects rather than the sql itself. So my question was that if I have a object inside and object how can I make the some resultset columns ( assuming made a join of two tables) map to the inner java object? Will the control automatically populate the inner object if it has a field mathcing with the column name? I know this works for base java objects, but I want to know it works for inner objects too.
Let me know Thanks Madhu Chad Schoettger <[EMAIL PROTECTED]> 02/01/2006 10:46 AM Please respond to "Beehive Users" <[email protected]> To Beehive Users <[email protected]> cc Subject Re: JDBC Control question Hi Madhu, The JDBC control will pass your SQL statement to the JDBC driver. Any valid SQL statement can be used to do your queries. If the SQL statement is not valid you will get an SQLException from the JDBC driver. So you should be able to use either of the statments below assuming they provide the functionality you need. Let me know if this doesn't answer you question. - Chad On 2/1/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > Hi > I have a ProjectVO which has ClientVO inside it. And my Project table has > ClientID as foreign key referencing Client(ClientID). > > My question is can i write a query in the control like: > How do i write the query so that it get the clientId into the ClientVO > inside ProjectVO? My question is can i do something like this: > > Select ProjectID, ClientID from Project join Client on Project.ClientID = > Client.ClientID > > or if this doesnt work can I do: > > Select ProjectID, ClientID client.ClientID from Project join Client on > Project.ClientID = Client.ClientID. > > assuming that there is a getClient() method declared for client which is > an instance of ClientVO (I am trying to use the alias in the query for > ClientID) > > Please help. > > Thanks > Madhu >
