I changed the file to be UTF-16 but I get an error now. I use the same sql file and manually run it in frontbase, it works. Example of the statement:

update Country set name = 'Belgium/Belgiƫ/Belgique' where country_id = 2;


<main> er.extensions.migration.ERXMigrationFailedException: Migration failed. at er.extensions.migration.ERXMigrator $ERXMigrationAction.doPerform(ERXMigrator.java:420) at er.extensions.ERXEOAccessUtilities $ChannelAction.perform(ERXEOAccessUtilities.java:1347) at er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java: 175) at er.extensions.ERXApplication.finishInitialization(ERXApplication.java: 835)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun .reflect .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25)
        at java.lang.reflect.Method.invoke(Method.java:585)
at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java: 122) at com.webobjects.foundation.NSNotificationCenter $_Entry.invokeMethod(NSNotificationCenter.java:588) at com .webobjects .foundation .NSNotificationCenter.postNotification(NSNotificationCenter.java:532) at com .webobjects .foundation .NSNotificationCenter.postNotification(NSNotificationCenter.java:546)
        at com.webobjects.appserver.WOApplication.run(WOApplication.java:1229)
        at er.extensions.ERXApplication.run(ERXApplication.java:929)
        at com.webobjects.appserver.WOApplication.main(WOApplication.java:548)
        at er.extensions.ERXApplication.main(ERXApplication.java:398)

Caused by: java.sql.SQLException: Syntax error 180. Illegal Direct SQL statement. at com .frontbase .jdbc.FBJErrorMetaData.errorMessageAtIndex(FBJErrorMetaData.java:162) at com .frontbase .jdbc.FBJErrorMetaData.getExceptionChain(FBJErrorMetaData.java:194)
        at com.frontbase.jdbc.FBJStatement.checkMetaData(FBJStatement.java:472)
        at com.frontbase.jdbc.FBJStatement.executeUpdate(FBJStatement.java:262)
at er .extensions.ERXJDBCUtilities.executeUpdateScript(ERXJDBCUtilities.java: 525) at er .extensions .ERXJDBCUtilities .executeUpdateScriptFromResourceNamed(ERXJDBCUtilities.java:579)


Thanks

On Jun 11, 2009, at 4:07 PM, Chuck Hill wrote:


On Jun 11, 2009, at 3:15 PM, Tusker wrote:

Hi,

I'm using project wonder's migrations framework. I'm loading data into a table just fine. The problem is with encoding. How do specify the correct encoding when executing from a sql file? Is there any easy way to do this in wonder or WebObjects?

ERXJDBCUtilities.executeUpdateScriptFromResourceNamed(channel, "myfile.sql", null);


Set the file encoding to UTF-16 in Eclipse.


--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to