on 2011 Aug 11 9:50 AM
I had created and filled a database file on Mac OS X 10.6. I then transfered and use that very same file on Windows 2008 Server. It works fine and I can't see any obvious problems. To be a bit more sure I would like to know if this is fully support by Sybase? What are the experiences regarding creating a database file (and log) on one OS and move it to another OS? I am also wondering about the encoding of the file, line breaks etc., which are different for the different platforms. Is this internally handled?
Best regards, Robert
Yes, moving databases between platforms is fully supported by SQL Anywhere.
All integer data within the file is stored in little endian (but users don't really need to know this).
[n]varchar data is stored in the character set specified when the database was created. Line terminators are up to the application developer to decide - i.e the database just stores the data that is given to it.
HTH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Coming back to your answer concerning the line terminators, if people enter data with Macs and Windows machines and therefor entering different line breaks (LF vs CR and LF), will such text appear as the same (visually) if users look at them on the other platform? Thanks in advance for clarifying, Robert
That depends on your viewer. What are you using to view the text? Many Windows-based text viewers/editors will do the right thing in the absence of the CR character. Some UNIX/Mac-based ones also display the text when there is a CR character. However, most UNIX/Mac-based text viewers/editors will display the CR character as ^M. Web browsers will probably almost always just ignore the CR character. I can't say for sure what Sybase Central or dbisql will do. I suspect they just show the r and n characters as the escape sequence.
If you want to support free-form text entry/extraction, you could probably use a filter.
For example, you could create a stored procedure or a trigger that removes all CR characters (saves space this way) during insert/update. Then you could create a stored procedure that looks at the OS field in the AppInfo connection parameter and adds CR for clients on Windows. All access to the text data would have to go through the stored procedure(s), but at least then you'd have an automatic way to get platform-specific text.
Thanks for the suggestion! I am using Servoy as IDE (www.servoy.com), the result is either a SmartClient which is Java based, i. e. a Java client or a Web Client. We use both, i. e. users enter data via the application (Java Client) and the Web Client. I am going to look how it works as I am not sure if there is also a difference between various (display) types of fields like text, HTML area, ...)
User | Count |
---|---|
73 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.