This question has been asked here a number of times, but I have never found a correct solution.
Basically cake 2.x moved to PDO, effectively dropping support for MSSQL on Linux.
Our existing implementation using FreeTDS and CakePHP 1.3.14 worked fine. Now that I've almost completed the upgrade to 2.4.2 the Mssql support for Linux is a big pain.
The code we have actually connects to both MySQL and MSSQL databases.
My options are:
1) Move to a Windows server, which I don't want to do.
2) Port over the Odbc.php from cake 1.3 into cake 2.4.2 and use that instead
3) Try and hack up Sqlsrv.php (or extend it) and use dblib (sybase) to connect
4) Use the Datasource plugin (branch mssql-2.0). Kind of works, it extends DboSource.php but doesn't implement a number of things properly.
So, not sure where to go from here. Would love to get a hacked PDO solution working.
Anyone in this situation got a resolution?
Searching for the same problem, I came across a post in Nabble that has links to a Linux native ODBC driver for MSSQL recently released by Microsoft.
This may come in handy: http://cakephp.1045679.n5.nabble.com/SQL-Server-Linux-and-CakePHP-2-tp5463357p5464129.html
Related
I'm creating an online game and the client is going to be made using unity as well as the server and I'm wondering whether it's okay for the server to communicate with mysql database via PHP
For simple tasks, there is actually nothing wrong with that.
There is also a example of using this method in the wiki here: http://wiki.unity3d.com/index.php?title=Server_Side_Highscores
But be aware: that is not the fastest solution.
You could make a faster direct connection with a plugin like this one:
https://github.com/Hanslen/Unity-with-MYSQL
And for native unity support on Android and iOS support i would go with a sqlite database plugin: https://github.com/rizasif/sqlite-unity-plugin
I was using Slick 2.0.0-M3 in my project and just upgraded to Slick 2.0.0
ScalaDoc (2.0.0-M3): http://slick.typesafe.com/doc/2.0.0-M3/api/index.html#package
SaclaDoc (2.0.0): http://slick.typesafe.com/doc/2.0.0/api/#package
In the former, the SQLServerDriver Trait is available, whereas in the latter it is gone. Can someone tell me where to optain it again?
Support for non-open-source databases including SQL Server is available as part of the commercial slick-extensions offered by Typesafe. More info here: http://slick.typesafe.com/doc/2.0.0/extensions.html
As of Slick 2.0.0, the SQL Server driver (being a non-open-source database) is not open source any more.
Also you may want to check Freeslick
Is it possible to build desktop application whit small data base on linux/ubuntu? I have try eclipse+derby- not work, driver load, but can't connect to db. Eclipse +sqlite- not work too, No suitable driver. For a week from now i trying and can't connect to my db. If some1 have WORKING tutorial how to do this in ubuntu+eclipse, pls share. 1 week google, so please if some1 pass this to help me.
Now im using SQLite, i have load the sqlitejdbc-v051.jar in build path and use
Class.forName("org.sqlite.JDBC").newInstance();
but the result is: No suitable driver found for jdbc:derby:/home/vasil/MYDB
Have you taken a look at this site? It seems to be a fairly decent walkthrough. Is the db server that you are trying to connect to running and somewhere accessible to your application?
Take a look at this question. It seems to be very similar to yours. I havn't used derby but I have used many other db servers. It sounds like you dont have the driver on your applications classpath.
Also, this tutorial might also be helpful. It shows how to use jdbc to connect to a db.
I'm trying to build a RESTful internal web server at work using node.js, where I'm currently restricted to using a Windows 2003 Server.
I've hit a stumbling block with regards to database support however. Are there any bindings currently available for reading and writing to sqlite, PostgreSQL or MySQL on Windows based machines?
Mariano has mentioned Windows support in the future in these comments, but ideally I'd like to use something available just now as a proof of concept.
I'm author of mysql-native.
Both official (felixge node-mysql) and my driver has been successfully used under windows,
I'm using and developing it under linux/windows 50/50% time . Feel free to contact me if you have any questions
Have you tried mysql-native? It's native (mysql) which means there are no other dependencies, so should run on any platform node supports. Seems to be actively maintained also, and has some examples to show you how to use the library. Link: https://github.com/sidorares/nodejs-mysql-native
I'm about to start on a new WPF application with a Sybase datastore. The team has experience with Nhibernate, but we are not really sure how well it supports Sybase and if there are some major pitfalls we should look out for.
If yes, how about Fluent nhibernate?
If not, do you know any other ORM products that we could use for Sybase in this scenario?
Thanks.
Sybase is officially supported in NHibernate.
From what I've seen, Fluent NH doesn't expose a class for configuring a Sybase DB, but you can probably do that in a just couple of lines (the rest of it is not dependent on the DB)
Are you asking about Sybase ASE or Sybase Anywhere. NHibernate supports both and FluentNHibernate supports neither.
I'd like to correct the statements made here, even though this is an older post. NHibernate does NOT exactly support Sybase.
As a reference for why I say this statment please look here:
http://community.jboss.org/wiki/DatabasessupportedbynHibernate
Granted that post is from 2009. NHibernate has since released version 3.0 which does have dialects available for Sybase:
http://nhforge.org/blogs/nhibernate/archive/2010/12/05/nhibernate-3-0-released.aspx
But the issue here is it is only for Sybase Anywhere, so if you have ASE you will have to refer to Glenn Paulley's independent releases for NHibernate, and I do not believe he is actually affiliated with NHibernate.
All this being said, I've tried for the past few hours to get what is out there working with Sybase ASE 15 and I've been unsuccessful. Looks like I'll just make my own with the .NET drivers provided.
According to this link, I would say that it does. There seems to have known issues, though. But depending on what you need, it might suit your needs.
The SQLAnywhere12Dialect seems to have repaired some of the buggy stuff.
To follow up on Joseph's answer:
I downloaded the binaries for NHibernate 3.2.0.GA about two weeks ago (about 10/5/2011) and it didn't seem to come with ASE 15 support out of the box (no dialect or drivers, closest one maybe being SQL Anywhere).
This issue was reported in their Jira.
Today (10/20/2011) I downloaded the source code for the project to try to add my own and I found out that there are classes now that offer this support, SybaseASE15Dialect.cs and SybaseASEDriver.
I'm not sure if the binaries now have this support, but if not you can just download the source files, build the NHibernate project and use the dlls, or just wait until they make a new release with this.
I've done a similar project using NHibernate, and using ODBC to connect to Sybase SQL Anywhere, it works fine with the "GenericDialect".
Here's some sample code to build your session factory.
var mapper = new ModelMapper();
mapper.AddMappings(Assembly.GetExecutingAssembly().GetExportedTypes());
HbmMapping mapping = mapper.CompileMappingForAllExplicitlyAddedEntities();
NHibernate.Cfg.Configuration cfg = new NHibernate.Cfg.Configuration()
.DataBaseIntegration(db =>
{
db.ConnectionString = connectionStr;
db.Dialect<NHibernate.Dialect.GenericDialect>();
db.Driver<NHibernate.Driver.OdbcDriver>();
});
cfg.AddMapping(mapping);
cfg.BuildSessionFactory();