I have an outdated version of SQL Anywhere that runs only on Windows XP. I would like to purchase a new version with a registration key that supports procedural static SQL views (in the schema). I have written several C apps that make use of SQL Anywhere's procedural views that I run now under Windows 7's XP virtual machine emulator. I would like to run them directly on Windows 7 and eventually on Windows 10. |
I cannot find the posting where I asked the procedural views question and uploaded an example file in this thread. I don't know why that is because it was there last night. I also cannot find any way re upload the example file again in this thread. How do I upload a PDF file now? |
FWIW, you may check the free SQL Anywhere 17 Developer Edition first to see what might need to be changed in your application and/or database.
Here's a donwload link...
> I have an outdated version of SQL Anywhere that runs only on Windows XP.
What does SELECT @@VERSION display?
FWIW I regularly test with SQL Anywhere 6 through 17 on Windows 10.
...Version 5.5 is another story, but the V6 engine can run a 5.5 file on Windows 10. Here's what Foxhound says when you do that:
My point is this, if you are having problems running V6 or higher software on Windows 10, maybe it isn't a SQL Anywhere problem... tell us what the exact symptom is.
SELECT @@VERSION yields "5.5.04 Build #1880"
The exact problem is that DBENG50.EXE won't run on any operating system above Windows XP which is why I run it under the XP Virtual Machine on Windows 7 PRO. Your comment that V6 can run a 5.5-created DB under all Windows from 7-10 is encouraging, but I have to know that for V17 - what I can buy now. I also posted a question here about whether V17 still supports procedural Views defined in the schema and I uploaded an example of one of the, I use. I have not received an answer to that yet.
I need to know that because that is the reason to remain with SQL Anywhere. My C++ apps connect and manipulate databases through the ODBC interface so I could actually use almost any RDBMS engine, but then I would have to recode the procedural aspects of reading through my procedural views that I simply rely upon the SQL Anywhere SQL engine to to do for me now.
The last SQL Anywhere version that can run a v5.5 database is v9. V10 introduced a new file format, so pre-v10 databases have to be rebuilt for v10 and above. In other words: v17 cannot run a 5.5 database, it has to be rebuilt first.
What do you mean by "procedural views"?
FWIW, even on the ancient v5.5 product line, build 5.5.04.1880 is a rather old one. IIRC, the last build on v5.5 was 5.5.05.2787 or the like...
There are If, else, endif conditional executions in a Procedural View. I uploaded an example of a complex Procedural View in a PDF file which seems to have disappeared into a black hole. Here's a simple one.
CREATE VIEW "dba".accnts_payees_view ( account_code, payee_key, payee ) AS SELECT accnts_payees_join.account_code, payee_key, IF accnts_payees_join.payee_key=0 THEN accnts_payees_join.text ELSE bnk_payees.payee ENDIF FROM "dba".accnts_payees_join LEFT OUTER JOIN "dba".bnk_payees ON accnts_payees_join.payee_key=bnk_payees.primary_key go
The create view.pdf file I uploaded to somewhere has a much more complex example. I was logged in as malletKATman at the time I uploaded it in the process of creating this thread. So, can anyone instruct me how I can upload it again so it will show here?
BTW: what is this "Don't forget to vote" business all about that appears in every email I get when someone posts to this thread?
Ah, this is simply an IF expression within your query - yes, this is of course still valid syntax in all newer versions of SQL Anywhere, just like the similar CASE expression.
AFAIK, almost all v5.5 queries should run with v17, unless they make use of rare and now obsolete stuff like Transact-SQL star joins or some "sluggish" expressions that newer parsers reject.
But you will also get a wealth of new possibilities for your queries and views, for example
and much more.
FWIW, this forum supports different kind of postings: Questions, answers and (possibly nested) comments. I turned your last answers into comments as they were no actual answers but responses to other comments.
> The create view.pdf file I uploaded
As far as I know, this forum no longer supports uploads of any files at all, not even images. I say "as far as I know" because I gave up trying a long time ago. I think it has to do with security.
You can, however, post links to images and text files stored on other websites:
This is a link to a text file.
Here is the raw HTML that you can type into your postings here...
If the SQL is shorter than a few thousand characters, you can just post it inside a pair of PRE tags, right inside your message.
> what is this "Don't forget to vote" business
Sadly, this forum uses one of those "social credit points systems", sometimes called "reputation systems" or "gamification", based on the goofy theory called "the wisdom of crowds".
In other words, until you get some points, there are limits on what you can do... see the FAQ for the rules.
FYI, here's the code that was used to include that image:
<img src="https://pbs.twimg.com/media/D8bbqphUIAA5wPk.jpg" width="200">