![]() |
Is it possible to connect to a SQL Server database? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Is it possible to connect to a SQL Server database? (/showthread.php?tid=75877) Pages:
1
2
|
Is it possible to connect to a SQL Server database? - alejandro99 - 03-26-2020 Hi everyone. I am starting with CI4 and I would like to know if there is any way to connect to a SQL Server database. Thank you all! ![]() RE: Is it possible to connect to a SQL Server database? - php_rocs - 03-26-2020 @alejandro99 Here is a link that may answer your question https://codeigniter4.github.io/userguide/intro/requirements.html . RE: Is it possible to connect to a SQL Server database? - seunex - 03-26-2020 You can easily set up your database information in your .env file and easily use this function $db = db_connect(); Now variable db as been set to connect to database. RE: Is it possible to connect to a SQL Server database? - alejandro99 - 04-03-2020 (03-26-2020, 02:27 AM)php_rocs Wrote: @alejandro99 Thanks! I didn't know CI4 isn´t supports SQLServer yet. RE: Is it possible to connect to a SQL Server database? - Juliano Santos - 05-28-2020 I use Codeigniter 3 and I'm migrating to CI4, but I'm not able to connect to the SQL Server database, as I used in CI3. In the System directory, I didn't find the drive for sqlsrv, was it removed from that version? The error message is "Class '\ CodeIgniter \ Database \ sqlsrv \ Connection' not found" Are there plans to include this driver in CI4? RE: Is it possible to connect to a SQL Server database? - dave friend - 05-28-2020 Not so much 'removed" as not done yet. Various volunteers have worked on porting from v3 to v4, but so far none have completed the work to a point where it can be included in the framework. Issue history here. RE: Is it possible to connect to a SQL Server database? - InsiteFX - 05-29-2020 To connect to an SQL Server you need to use the DSN field in the database connection properties. RE: Is it possible to connect to a SQL Server database? - dave friend - 05-29-2020 (05-29-2020, 03:20 AM)InsiteFX Wrote: To connect to an SQL Server you need to use the DSN filed in the database connection properties. We are talking about Ci V4 here. There isn't any driver for MS SQL. RE: Is it possible to connect to a SQL Server database? - Juliano Santos - 05-29-2020 (05-28-2020, 02:02 PM)dave friend Wrote: Not so much 'removed" as not done yet. Various volunteers have worked on porting from v3 to v4, but so far none have completed the work to a point where it can be included in the framework. Issue history here. Thank you Dave! But the link refers to the MSSQL driver, I'm using SQLSRV on CI3, which is working perfectly. However in CI4, from what I verified it is not yet supported. I'll have to wait for the community to release a release with support for the sqlsrv drive. RE: Is it possible to connect to a SQL Server database? - dave friend - 05-29-2020 (05-29-2020, 09:33 AM)Juliano Santos Wrote: Thank you Dave! But the link refers to the MSSQL driver, I'm using SQLSRV on CI3, which is working perfectly. However in CI4, from what I verified it is not yet supported. I'll have to wait for the community to release a release with support for the sqlsrv drive. Hi Juliano. The link is about porting the CI3 driver to CI4. Yes, it talks about the MSSQL driver but then the participants realize that starting with PHP v7.0. that driver was removed from PHP. The most recent effort (later in the discussion) uses the SQLSRV driver. It's apparently nearly ready but seems to have stalled again. Feel free to comment on the issue page. Maybe that will shake something loose and get the project rolling again. ![]() |