Re: [dba-dev] How can I store the default values and column descriptions in odb file?

2009-06-22 Thread Frank Schönheit - Sun Microsystems Germany
Hi Michael,

> I would like to store default values and the column descriptions in the odb
> files as we do not fully support them in the database. Is it right that base
> can do this for us or must the driver implement the functionality to store
> the values in the odb files? I have neither an idea how to tell base to do
> this for me nor how to do it my self in the driver :(

The driver does not need to know about this at all.

Assuming that we talk about the ControlDefault as mentioned by Ocke (the
DefaultValue is effectively unused), this should work automatically: The
table design fills the property with what you enter there, the ODB
export filter retrieves and writes it.
Uhm, trying that with an embedded HSQLDB in OOo 3.1 it seems this isn't
the case ... need to verify that, but it seems that's a general problem
then.

For the description, the same holds: this shouldn't be a concern of your
driver at all, it should all be held in higher layers. (And here it even
worked for me with embedded HSQLDB.)

So, if with your driver, this is lost, I cannot really think of a
reason. However, the object hierarchy in dbaccess/source/core/api is
rather complex, and Ocke knows more about this than I do. Perhaps
depending on certain characteristics of your driver, the wrapper code
behaves differently/wrong.

I suggest you start debugging this in dbaccess/source/ui/tabledesign,
OTableEditorCtrl::SaveData. Check whether the description is properly
propagated there. Then, in TableController::alterColumns, check whether
the proper description is set as PROPERTY_HELPTEXT at the column, and,
more interesting, where this setPropertyValue call actually arrives -
which class implements this property? Compare this with
ODBExport::exportColumns in dbaccess/source/filter/xml: There's a
getPropertyValue( HELPTEXT ) call - where does it arrive, ultimately?
Which implementation provides this value?

(Compiling comphelper/source/property/* and
cppuhelper/source/propshlp.cxx with debug=1 might come handy, to be able
to step through all involved property set helper classes.)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer frank.schoenh...@sun.com -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



AW: [dba-dev] How can I store the default values and column descriptions in odb file?

2009-06-10 Thread Michael Strobel
Hi Fernand,

The information is definitly stored in the odb file, which is organized like a 
zip archiv. On a windows system you might just rename the "whatever.odb" to 
"whatever.zip" and extract it´s contents with the explorer. If you do so, you 
should find a file named "content.xml", that seems to store everything, 
including column width and formats. You should find entries similar to this:

>> 

>> 

I have still no idea what´s needed in our driver to save the default values and 
the column descriptions as well, so any hint is wellcome :)

Best regards,
Micha

-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org

Re: [dba-dev] How can I store the default values and column descriptions in odb file?

2009-06-10 Thread Fernand Vanrie
sorry: must been thiscomponent.datasource.tables.getbyindex(1).columns 
gives  a EMPTY object 



Hi Fernand,

That the behavior I´m expecting, but since the default values and 
column descriptions are not saved to the odb file, I assume there is 
something missing in our driver, but I have no idea what it is. Maybe 
the "ControlDefault" has to be set to the "DefaultValue" when the 
"DetaultValue" property of a column object is changed. On the other 
hand I didn´t see anything like that in the code of the other drivers 
in the connectivity module.


The same "saving to odb problem" appears when I try to change the 
column formatting in the table designer when using our driver, but 
there is a workaround for this. The column formatting is changed 
correctly when I open a table, then rightclick on the column heading 
and use the formatting option from this context menu. This way to get 
it saved to the odb,
OK so far so good but where the hell is this information saved ? in my 
case (MSSQL-ODBC)

when xraying I find all tables correctly named but :
thiscomponent.tables.getbyindex(1).columns gives me a EMPTY object ?

greetz
fernand
 but it is not saved to the odb when it is changed in the table 
designer.


Best regards,
Micha

 

-Original Message-
From: Fernand Vanrie [mailto:s...@pmgroup.be]
Sent: Mittwoch, 10. Juni 2009 09:40
To: dev@dba.openoffice.org
Subject: Re: [dba-dev] How can I store the default values and column
descriptions in odb file?

hallo Michael ,
In the past i did some test  with a odb file connected to a MS SQL
server over ODBC. When I changed column widths and then saved the ODB
file, and after reopening the formating is remembered.
BUT it is still a mistery for me where this info is stored :-)

Fernand

   

Hi Ocke,

still couldn´t find the solution to get the column default values
  

and
   

column descriptions working.


 

We have two default values
1. "DefaultValue" and
2. "ControlDefault"

The 2nd is stored inside the odb file db:default-value. The 1st is
stored inside the database. The problem now was to get the default


value
   

from the database when moving to the insert row. This wasn't


possible,
   

here ControlDefault was invited. So when you use the table designer


to
   

create a table you always insert the ControlDefault. To change for
example the wizard you have to set the DefaultValue at the column
descriptor. The source code for the table designer can be found in
dbaccess/source/ui/tabledesign



I would like to store default values and the column descriptions in
  

the odb
   

files as we do not fully support them in the database. Is it right
  

that base
   

can do this for us or must the driver implement the functionality to
  

store
   

the values in the odb files? I have neither an idea how to tell base
  

to do
   

this for me nor how to do it my self in the driver :(

At the moment the default values and the column descriptions can be
  

set,
   

but they are lost as soon as you close the connection. This is
  

because
   

the corresponding properties of the drivers column objects are set
  

correctly,
   

but there is no code in the driver to save/restore them to/from the
  

odb.
   

Best regards,
Micha


  

-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org




-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org
  



-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



Re: [dba-dev] How can I store the default values and column descriptions in odb file?

2009-06-10 Thread Fernand Vanrie

Michael Strobel wrote:

Hi Fernand,

That the behavior I´m expecting, but since the default values and column descriptions are not saved to the 
odb file, I assume there is something missing in our driver, but I have no idea what it is. Maybe the 
"ControlDefault" has to be set to the "DefaultValue" when the "DetaultValue" 
property of a column object is changed. On the other hand I didn´t see anything like that in the code of the 
other drivers in the connectivity module.

The same "saving to odb problem" appears when I try to change the column 
formatting in the table designer when using our driver, but there is a workaround for 
this. The column formatting is changed correctly when I open a table, then rightclick on 
the column heading and use the formatting option from this context menu. This way to get 
it saved to the odb,
OK so far so good but where the hell is this information saved ? in my 
case (MSSQL-ODBC)

when xraying I find all tables correctly named but :
thiscomponent.tables.getbyindex(1).columns gives me a EMPTY object ?

greetz
fernand

 but it is not saved to the odb when it is changed in the table designer.

Best regards,
Micha

  

-Original Message-
From: Fernand Vanrie [mailto:s...@pmgroup.be]
Sent: Mittwoch, 10. Juni 2009 09:40
To: dev@dba.openoffice.org
Subject: Re: [dba-dev] How can I store the default values and column
descriptions in odb file?

hallo Michael ,
In the past i did some test  with a odb file connected to a MS SQL
server over ODBC. When I changed column widths and then saved the ODB
file, and after reopening the formating is remembered.
BUT it is still a mistery for me where this info is stored :-)

Fernand



Hi Ocke,

still couldn´t find the solution to get the column default values
  

and


column descriptions working.


  

We have two default values
1. "DefaultValue" and
2. "ControlDefault"

The 2nd is stored inside the odb file db:default-value. The 1st is
stored inside the database. The problem now was to get the default


value


from the database when moving to the insert row. This wasn't


possible,


here ControlDefault was invited. So when you use the table designer


to


create a table you always insert the ControlDefault. To change for
example the wizard you have to set the DefaultValue at the column
descriptor. The source code for the table designer can be found in
dbaccess/source/ui/tabledesign



I would like to store default values and the column descriptions in
  

the odb


files as we do not fully support them in the database. Is it right
  

that base


can do this for us or must the driver implement the functionality to
  

store


the values in the odb files? I have neither an idea how to tell base
  

to do


this for me nor how to do it my self in the driver :(

At the moment the default values and the column descriptions can be
  

set,


but they are lost as soon as you close the connection. This is
  

because


the corresponding properties of the drivers column objects are set
  

correctly,


but there is no code in the driver to save/restore them to/from the
  

odb.


Best regards,
Micha


  

-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org




-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org
  



-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



RE: [dba-dev] How can I store the default values and column descriptions in odb file?

2009-06-10 Thread Michael Strobel
Hi Fernand,

That the behavior I´m expecting, but since the default values and column 
descriptions are not saved to the odb file, I assume there is something missing 
in our driver, but I have no idea what it is. Maybe the "ControlDefault" has to 
be set to the "DefaultValue" when the "DetaultValue" property of a column 
object is changed. On the other hand I didn´t see anything like that in the 
code of the other drivers in the connectivity module.

The same "saving to odb problem" appears when I try to change the column 
formatting in the table designer when using our driver, but there is a 
workaround for this. The column formatting is changed correctly when I open a 
table, then rightclick on the column heading and use the formatting option from 
this context menu. This way to get it saved to the odb, but it is not saved to 
the odb when it is changed in the table designer.

Best regards,
Micha

> -Original Message-
> From: Fernand Vanrie [mailto:s...@pmgroup.be]
> Sent: Mittwoch, 10. Juni 2009 09:40
> To: dev@dba.openoffice.org
> Subject: Re: [dba-dev] How can I store the default values and column
> descriptions in odb file?
> 
> hallo Michael ,
> In the past i did some test  with a odb file connected to a MS SQL
> server over ODBC. When I changed column widths and then saved the ODB
> file, and after reopening the formating is remembered.
> BUT it is still a mistery for me where this info is stored :-)
> 
> Fernand
> 
> > Hi Ocke,
> >
> > still couldn´t find the solution to get the column default values
> and
> > column descriptions working.
> >
> >
> >> We have two default values
> >> 1. "DefaultValue" and
> >> 2. "ControlDefault"
> >>
> >> The 2nd is stored inside the odb file db:default-value. The 1st is
> >> stored inside the database. The problem now was to get the default
> value
> >> from the database when moving to the insert row. This wasn't
> possible,
> >> here ControlDefault was invited. So when you use the table designer
> to
> >> create a table you always insert the ControlDefault. To change for
> >> example the wizard you have to set the DefaultValue at the column
> >> descriptor. The source code for the table designer can be found in
> >> dbaccess/source/ui/tabledesign
> >>
> >
> > I would like to store default values and the column descriptions in
> the odb
> > files as we do not fully support them in the database. Is it right
> that base
> > can do this for us or must the driver implement the functionality to
> store
> > the values in the odb files? I have neither an idea how to tell base
> to do
> > this for me nor how to do it my self in the driver :(
> >
> > At the moment the default values and the column descriptions can be
> set,
> > but they are lost as soon as you close the connection. This is
> because
> > the corresponding properties of the drivers column objects are set
> correctly,
> > but there is no code in the driver to save/restore them to/from the
> odb.
> >
> > Best regards,
> > Micha
> >
> >
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
> For additional commands, e-mail: dev-h...@dba.openoffice.org


-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



Re: [dba-dev] How can I store the default values and column descriptions in odb file?

2009-06-10 Thread Fernand Vanrie

hallo Michael ,
In the past i did some test  with a odb file connected to a MS SQL 
server over ODBC. When I changed column widths and then saved the ODB 
file, and after reopening the formating is remembered.

BUT it is still a mistery for me where this info is stored :-)

Fernand


Hi Ocke,

still couldn´t find the solution to get the column default values and
column descriptions working.

  

We have two default values
1. "DefaultValue" and
2. "ControlDefault"

The 2nd is stored inside the odb file db:default-value. The 1st is
stored inside the database. The problem now was to get the default value
from the database when moving to the insert row. This wasn't possible,
here ControlDefault was invited. So when you use the table designer to
create a table you always insert the ControlDefault. To change for
example the wizard you have to set the DefaultValue at the column
descriptor. The source code for the table designer can be found in
dbaccess/source/ui/tabledesign



I would like to store default values and the column descriptions in the odb
files as we do not fully support them in the database. Is it right that base
can do this for us or must the driver implement the functionality to store
the values in the odb files? I have neither an idea how to tell base to do
this for me nor how to do it my self in the driver :(

At the moment the default values and the column descriptions can be set,
but they are lost as soon as you close the connection. This is because
the corresponding properties of the drivers column objects are set correctly,
but there is no code in the driver to save/restore them to/from the odb.

Best regards,
Micha

  



-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



[dba-dev] How can I store the default values and column descriptions in odb file?

2009-06-09 Thread Michael Strobel
Hi Ocke,

still couldn´t find the solution to get the column default values and
column descriptions working.

> We have two default values
> 1. "DefaultValue" and
> 2. "ControlDefault"
> 
> The 2nd is stored inside the odb file db:default-value. The 1st is
> stored inside the database. The problem now was to get the default value
> from the database when moving to the insert row. This wasn't possible,
> here ControlDefault was invited. So when you use the table designer to
> create a table you always insert the ControlDefault. To change for
> example the wizard you have to set the DefaultValue at the column
> descriptor. The source code for the table designer can be found in
> dbaccess/source/ui/tabledesign

I would like to store default values and the column descriptions in the odb
files as we do not fully support them in the database. Is it right that base
can do this for us or must the driver implement the functionality to store
the values in the odb files? I have neither an idea how to tell base to do
this for me nor how to do it my self in the driver :(

At the moment the default values and the column descriptions can be set,
but they are lost as soon as you close the connection. This is because
the corresponding properties of the drivers column objects are set correctly,
but there is no code in the driver to save/restore them to/from the odb.

Best regards,
Micha