Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8977991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:30:08+00:00 2026-06-15T19:30:08+00:00

I am trying to connect CakePHP 2.2.2 stable version with MS SQL database. Below

  • 0

I am trying to connect CakePHP 2.2.2 stable version with MS SQL database.

Below is db connection that I’m using:

public $default = array(
    'datasource' => 'Database/Mssql',
    'persistent' => false,
    'host' => '192.192.1.1',
    'login' => 'username',
    'password' => 'password',
    'database' => 'dbname',
    'prefix' => '',
    //'encoding' => 'utf8',
);

When I connect with CorePHP – it works, So all credentials I use are correct however when I connect with CakePHP 2.2.2 version, returns below error:

Cake is NOT able to connect to the database.
Datasource class Mssql could not be found.

I have following files in my dbo library on path: cakephp/lib/Cake/Model/Datasource/Database

Mysql.php
Postgres.php
Sqlite.php
Sqlserver.php

So I believe that all files required for MS SQL Server connection is present in my Cake version.

Let me know what I am missing or having problem with.

Thanks in advance !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:30:10+00:00Added an answer on June 15, 2026 at 7:30 pm

    i think the correct datasource string is ‘Sqlserver’ and not ‘mssql’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While trying to connect to a database that's set to read only, the connection
I am trying to connect to a MySQL 5.5 database as follows: public void
I'm using HostMonster as my web host and I'm trying connect to a database
I am trying to implement facebook Connect to my cakephp Application. i am using
I am trying connect to MySQL database from ASP.net code. some my connection is
When trying to connect to my database using PHP I am getting an error.
I am trying to connect to a MySQL Server using JDBC tool in java
I am trying to connect the JSF to database. This are the files web.xml
I'm trying to connect to a FTP using Apaches FTPSClient but I keep getting
im currently trying to connect CakePHP with ExtJs4 but i face the following problem:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.