Support for Sybase UDFs in Rapid SQL 7.7 - sap-ase

I am new to Sybase and having coded in Oracle server for so many years I wanted to pack some reusable code into a function in Sybase ASE 15.
Based on what I have found, functions or User Defined Functions (UDFs) as they called in the Sybase world is a new feature in Sybase 15 ASE. I use Embarcadero Rapid SQL 7.7 for my coding and it does not even seem to have a node for Functions (as it does for Procedures and other database objects under a database tree).
I am able to create a simple function but it does not show-up anywhere in the left hand side organizer panel of Rapid SQL. Am I missing something basic as I am new to Rapid SQL or the tool - Rapid SQL, in its current version 7.7- is not designed to support functions in Sybase as functions are new to Sybase?
Though Sybase ASE 15 supports functions if it is not visible in the tool I do not want to use it as it makes it harder for maintenance. Is Rapid SQL planning to support UDFs in Sybase in the future?
Is there a work around for using a stored procedure as a function in Sybase ASE 15?

I recommend you to use Sybase Central.
With that, check the Functions Folder under the Database and they will be there!

Rapid SQL 8.0 does indeed have support for UDF's. Visit the enbarcadero site to download the 8.0.2 version of Rapid SQL. Shoot me an email if you have any issues getting it. scott.walz#embarcadero.com

Related

Use SQL Server CE with node-webkit

I need to work on an old application written with WPF and MS SQL Server Compact Edition. As a requirement the app is executed from an USB stick (where also all the data is persisted) and the same should apply for the new system.
In the new application I would like to use NoSQL db to store the data (node-sqlite3 or npm-nosql). However the records currently stored on the SQL CE database must be migrated to the new db or the same SQL CE database used again (even if I prefer to avoid this option). In the latter case, I have seen there is node-mssql as database connector, but SQL Server CE is not among the supported databases.
The current SQL CE schema is extremely simple, only 4 tables and less than 300 records in total. The application is executed locally by a single user.
Is there a way to export the SQL CE database so that I can import it into the new database? Are there better databases to be used with node-webkit other than the ones aforementioned?
The driver you're looking for is:
https://www.npmjs.com/package/ce-mssql
However - I'm afraid you'll need to fork a nodejs process from your webkit application, and feature your queries through web API - this will put you at home with Angular.

Attempting to make an existing SQL Server database compatible with the Windows Azure platform using SSDT

I'm attempting to make my existing SQL Server 2008 database compatible with the Windows Azure platform by using SSDT, however I am getting a whole bunch of errors when I build the project due to TVFs and views looking for an external database that sits in the same instance in SSMS.
I've added the database that its looking for into Azure, which wasn't a problem.
I've found that if I load the offending piece of code I can add the Azure server address to the FROM statement which resolves the error (shown below), however I have a huge number that rely on the external db and hoped there may be a quicker way?
FROM [myAzureserver.database.windows.net.ExternalDBName.dbo.TableName] as ALIAS
I understand that this issue would not exist if I merged the databases, however this isn't possible at present.
Thanks a lot for your help.
Why are you trying to make your local SQL Server Azure compliant? Are you planning to move it at some point in the cloud? If so, you won't be able to use linked servers. Your FROM clause will work as long as the database remains on an on-premise SQL Server instance.
Assuming that's what you want to do, you are asking if there is quicker way to change your references to point to the cloud database, right? I am not sure if this will work for you but I had a similar issue on another project and ended up using synonyms. Check our synonyms here: http://msdn.microsoft.com/en-us/library/ms177544.aspx. Although you can't create a synonym for a server, you can create synonyms for tables/views/procs.
Again, this may not work for you, but let's try this...
Assuming you have your primary database called DB1, the secondary database called DB2, and the cloud database of DB2 called AzureDB2, you could create synonyms in DB2 to point to the cloud database without changing any SQL statement from DB1.
So assume you have this statement today in DB1:
SELECT * FROM DB2.MyTable
You could create a synonym in DB2 called MyTable:
CREATE SYNONYM MyTable FOR [myAzureserver.database.windows.net.ExternalDBName.dbo.TableName]
DB2 becomes a bridge basically. You don't need to change any statement in DB1; just create synonyms in DB2 that point to the cloud database.
Hopefully this works for you. :)

node.js sybase driver

I am developing an app using node.js express framework and would need to connect to sybase ASE database. I did enough search and couldn't find the sybase driver for node.js. doesn't node.js support sybase or should I use something like a generic driver?
An exhaustive list of database drivers is on the node.js wiki here:
https://github.com/joyent/node/wiki/Modules#wiki-database
But no Sybase so that leaves using an ODBC driver which, if on *nix, then you have the option of:
https://github.com/w1nk/node-odbc
Alternatively, Sybase ASE has it's own web services engine which exposes SQL and stored procedures through a SOAP API. Your best option may be to just roll your own SOAP client in node against that API, perhaps using node-soap.
As of 2015, a non-odbc implementation based on Jconnect is available. It requires Java.
You can install it with
npm install sybase
More info:
https://www.npmjs.com/package/sybase
I know it has been a while, but if you are still looking, try this:
https://www.npmjs.org/package/sqlanywhere
node.js comes with no DB support at all.
DB connectors are out of the scope of the node.js distribution. But the cummunity fills the gap here e.g. for mysql there is node-mysql.
Problem here is that you want to use a DB without a big (open source) community, so, after some googeling, there is no node.js connector.
If you want to create a connector for sybase ASE you might have a look at node-mysql to get startet. But this is nothing you do in one weekend.

SubSonic-based app that connects to multiple databases

I currently developed an app that connects to SQL Server 2005 database, so my DAL objects where generated using information from that DB.
It will also be possible to connect to an Oracle and MySQL db, all with the same table structures (aside from the normal differences in fields, such as varbinary(max) in SQL Server and BLOB in Oracle, and so on). For this purpose, I already defined multiple connection strings and multiple SubSonic providers for the different DB's the app will run on.
My question is, if I generated my objects using a SQL Server database, should the generated objects work transparently with the other DB's or do I need to generate a different DAL for each database engine I use? Should I be aware of any possible bugs I may encounter while performing these operations?
Thanks in advance for any advice on this issue.
I'm using SubSonic 2.2 by the way....
From what I've been able to test so far, I can't see an easy way to achieve what I'm trying to do.
The ideal situation for me would have been to generate SubSonic objects using SQL Server for example, and just be able to switch dynamically to MySQL by just creating at runtime the correct Provider for it along with its connection string. I got to a point where my app would correctly connect from SQL Server to a MySQL DB, but there's a point where the app fails since SubSonic internally generates queries of the form
SELECT * FROM dbo.MyTable
which MySQL doesn't support obviously. I also noticed queries that enclosed table names with brackets ([]), so it seems that there are a number of factors that would limit the use of one Provider along multiple DB engines.
I guess my only other option is to sort it out with multiple generated providers, although I must admit it does not make me comfortable knowing that I'll have N copies of basically the same classes along my project.
I would really love to hear from anyone else if they've had similar experiences. I'll be sure to post my results once I get everything sorted out and working for my project.
Has any of this changed in 3.0? This would definitely be a worthy reason for me to upgrade if life is any easier on this matter...

Oracle linux front end

Is there any Oracle database ( around version 10 ) front end that we can use in Linux, free or open source?
I am currently using Ubuntu 8.10 and if possible I just want it to need the thin JDBC to connect to oracle and not the whole (huge) client of oracle installed in it.
I use Oracle SQL Developer which is similar to TOAD (which is not free). SQL Developer is free and supported by Oracle. Make sure you get the latest version as they're improving it all the time. It has a nice graphical UI and support for editing PL/SQL stored procedures. I think there are even plugins for other databases (like MySQL).
Its a Java application and there is a Linux distribution, though I use the Windows version. It does not require an Oracle client, though it does support one, like the Oracle Instant Client, should you have it installed.
seems like http://tora.sourceforge.net/ is the opensource version of toad
also there is http://oss.oracle.com/sqldeveloper.html
Pretty much any JDBC tool will be able to talk compentantly to Oracle.
I've used SQuirrel SQL Client, SQL Workbench, DbVisualizer (free edition).
There's even plug-ins for jEdit that can talk to a database.

Resources