Opened 11 years ago

Closed 11 years ago

#2191 closed defect (fixed)

Maestro - ODBC Configuration Reset is Not Saved

Reported by: crispinatime Owned by: jng
Priority: medium Milestone: Maestro-5.0
Component: Maestro Version:
Severity: major Keywords:
Cc: External ID:

Description

When clicking the 'Reset' button on an ODBC feature source the configuration file generated is not saved.

Change History (3)

comment:1 by crispinatime, 11 years ago

Suggested fix.

OdbcProviderCtrl.cs, line 358 DoDocumentReset() function modification to add null check for the message and actually set the content to save!

        private void DoDocumentReset()
        {
            _fs.SetConfigurationContent(null);
            _fs.ConfigurationDocument = null;
            _service.SyncSessionCopy();
            _doc = null;
            BuildDefaultDocument();

            if (null != _doc)
            {
                _fs.ConfigurationDocument = "config.xml";
                _fs.SetConfigurationContent(_doc.ToXml());
                MessageBox.Show(Strings.ConfigurationDocumentReset);
            }
        }

comment:2 by crispinatime, 11 years ago

Close! When I now try and manually edit/save the config document from the built-in editor I get the BOM problem "There is no Unicode byte order mark. Cannot switch to unicode" message coming up.

Is there a different way required to set the configuration content from the XML?

comment:3 by jng, 11 years ago

Resolution: fixed
Status: newclosed

I applied your suggested fix in r7683

Regarding the error message

There is no Unicode byte order mark. Cannot switch to unicode

Check the XML prolog, it probably is saying utf-16 instead of utf-8. I currently don't know why this happens (why the XML is generated with utf-16), but changing utf-16 back to utf-8 fixes this error.

Note: See TracTickets for help on using tickets.