Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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

asked 11 Aug '11, 08:50

robert's gravatar image

robert
853475468
accept rate: 0%


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

permanent link

answered 11 Aug '11, 08:53

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297
accept rate: 41%

It helps me a lot, thanks very much! Regards, Robert

(11 Aug '11, 13:08) robert

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

(12 Aug '11, 09:08) robert
Replies hidden
4

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.

(12 Aug '11, 09:29) Phil Mitchell

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, ...)

(14 Aug '11, 03:57) robert
Replies hidden

Hi Robert, I sent an email to the general email box on your website about your application and how it works. We are looking at doing something similar (desktop application with web client option) and it would be great to talk to someone who has already done it.

(15 Aug '11, 09:50) Siger Matt
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×22
×9

question asked: 11 Aug '11, 08:50

question was seen: 2,308 times

last updated: 15 Aug '11, 09:50