To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=58313
------- Additional comments from [EMAIL PROTECTED] Fri Dec 9 00:38:28 -0800
2005 -------
Ok, I need to retract what has been said previously regarding this issue.
Please accept my apologies for not having tested this problem out as thoroughly
as it should have been but the symptoms had me fooled.
The following assumptions made previously are incorrect:
1. This is a linux platform problem
2. The problem does not exist on MS Windows
It seems the problem is related to the Universe settings.bas macro not updating
the .odb file with the "special" Universe settings.
On retesting I found that JDBC datasources that had been created prior to OOo
2.0 final release work fine on Windows platform. However, new datasources
created now, exhibit the same problem as reported before (ResultType Error),
even after running the Universe settings.bas macro. I cannot say when this
stopped working as most of the datasources were created on MS Windows at various
beta releases of OOo 2.0
Stepping through the macro it appears to execute fine but the actual .odb file
does not appear to be updated with odb related changes i.e the following
parameters are not being written to the file.
AddDataSourceSetting( oDB, "TableTypeFilterMode", nFilterMode )
AddDataSourceSetting( oDB, "RespectDriverResultSetType", bBeRespectful )
Comparing a "pre-macro" version of the file with a version "post-macro" using
diff on a UNIX system shows very little change and none of the settings expected
- below is the output of the diff
accrec1.odb is the pre-macro version.
$ diff accrec1.odb accrec.odb|more
diff: 0653-827 Missing newline at the end of file accrec1.odb.
diff: 0653-827 Missing newline at the end of file accrec.odb.
1c1
< PK^C^D^Tj6M-^I3M-^Kp^\mimetypeapplication/vnd.sun.xml.basePK^C^D^Tj6M-^I3
META-INF/PK^C^D^Tj6M-^I3½#Y∞µ µ ^Kcontent.xml<?xml version="1.0" encodin
g="UTF-8"?>
---
> PK^C^D^TM-^A9M-^I3M-^Kp^\mimetypeapplication/vnd.sun.xml.basePK^C^D^TM-^A9M-^I
3 META-INF/PK^C^D^TM-^A9M-^I3½#Y∞µ µ ^Kcontent.xml<?xml versi
on="1.0" encoding="UTF-8"?>
32c32
< </office:document-content>PK^C^D^Tj6M-^I3]8h`h^Bh^B^Lsettings.xml<?xml version
="1.0" encoding="UTF-8"?>
---
> </office:document-content>PK^C^D^TM-^A9M-^I3]8h`h^Bh^B^Lsettings.xml<?xml vers
ion="1.0" encoding="UTF-8"?>
38c38
< </office:document-settings>PK^Cj6M-^I3^UMETA-INF/manifest.xml¡M-^R1o┬0^PM-^Ew~
M-^E{╗πv½¼$¿%AB*M-^D!^L^]M-^M}íM-^VM-^Rs^T■}═M-^P╥
---
> </office:document-settings>PK^CM-^A9M-^I3^UMETA-INF/manifest.xml¡M-^R1o┬0^PM-^
Ew~M-^E{╗πv½¼$¿%AB*M-^D!^L^]M-^M}íM-^VM-^Rs^T■}═M-^P╥
42,43c42,43
< "^Z╝O╒M-^NB,╛$°W«╟^PΓ┐≡^S8^U7M-^[╦┐^APKα╪ey^AQ^BPK^T^Tj6M-^I3M-^Kp^\mimetype
PK^T^Tj6M-^I3 BMETA-INF/PK^T^Tj6M-^I3½#Y∞µ µ ^Kicontent.xmlPK^T^T
j6M-^I3]8h`h^Bh^B^Lx
< settings.xmlPKj6M-^I3α╪ey^AQ^B^U
---
> "^Z╝O╒M-^NB,╛$°W«╟^PΓ┐≡^S8^U7M-^[╦┐^APKα╪ey^AQ^BPK^T^TM-^A9M-^I3M-^Kp^\mimetyp
ePK^T^TM-^A9M-^I3 BMETA-INF/PK^T^TM-^A9M-^I3½#Y∞µ µ ^Kicontent.xmlPK
^T^TM-^A9M-^I3]8h`h^Bh^B^Lx
> settings.xmlPKM-^A9M-^I3α╪ey^AQ^B^U
$
Below is the Universe setting.bas macro
REM ***** BASIC *****
Sub Main
oDBC = createUnoService( "com.sun.star.sdb.DatabaseContext" )
oDB = oDBC.getByName( "file:///C:/accrec.odb" )
Dim nFilterMode as Integer
nFilterMode = 0
AddDataSourceSetting( oDB, "TableTypeFilterMode", nFilterMode )
Dim bBeRespectful As Boolean
bBeRespectful = TRUE
AddDataSourceSetting( oDB, "RespectDriverResultSetType", bBeRespectful )
oDB.DatabaseDocument.store()
End Sub
Function AddDataSourceSetting( oDB as Object, sSettingsName as String,
aSettingsValue as Variant ) as Variant
' append the new setting
Dim aInfo as Variant
aInfo = oDB.Info
aInfo = AddInfo( aInfo, sSettingsName, aSettingsValue )
oDB.DatabaseDocument.store()
End Function
Function AddInfo( aOldInfo() as new
com.sun.star.beans.PropertyValue,sSettingsName as String, aSettingsValue as
Variant ) as Variant
Dim nLower as Integer
Dim nUpper as Integer
nLower = LBound( aOldInfo() )
nUpper = UBound( aOldInfo() )
' look if the setting is already present
Dim bNeedAdd as Boolean
bNeedAdd = TRUE
Dim i As Integer
For i = nLower To nUpper
If ( aOldInfo( i ).Name = sSettingsName ) Then
aOldInfo( i ).Value = aSettingsValue
bNeedAdd = FALSE
End If
Next i
' allocate the new array
Dim nNewSize as Integer
nNewSize = ( nUpper - nLower )
If bNeedAdd Then nNewSize = nNewSize + 1
Dim aNewInfo( nNewSize ) as new com.sun.star.beans.PropertyValue
' copy the elements (a simply copy does not work in Basic)
For i = nLower To nUpper
aNewInfo( i ) = aOldInfo( i )
Next i
' append the new setting, if necessary
If ( bNeedAdd ) Then
aNewInfo( nUpper + 1 ).Name = sSettingsName
aNewInfo( nUpper + 1 ).Value = aSettingsValue
End If
AddInfo = aNewInfo()
End Function
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]