Welcome Guest, Not a member yet? Register   Sign In
Can't select MSSQL table
#1

(This post was last modified: 12-10-2018, 12:40 PM by wuk986.)

I am connected to a MSSQL Server (10.50.2550.0) and I want to select a table from a database where I have read permission.

The database configuration looks like this:
Code:
$db['lardis_mssql'] = array(
   'dsn'    => '',
   'hostname' => '192.168.120.xxx',
   'username' => 'username',
   'password' => 'password',
   'database' => 'LardisLog',
   'dbdriver' => 'sqlsrv',
   'dbprefix' => '',
   'pconnect' => FALSE,
   'db_debug' => (ENVIRONMENT !== 'production'),
   'cache_on' => FALSE,
   'cachedir' => '',
   'char_set' => 'utf8',
   'dbcollat' => 'utf8_general_ci',
   'swap_pre' => '',
   'encrypt' => FALSE,
   'compress' => FALSE,
   'stricton' => FALSE,
   'failover' => array(),
   'save_queries' => TRUE
);

The connection is successfull and the database has the following tables:
  • dbo.Events
  • dbo.Users
  • dbo.Networks
The query in the model looks like this:

Code:
$query = $this->db->get('Events');
//$query = $this->db->query("SELECT * FROM Events");
return $query->result_array();

The result looks like this:

Quote:A Database Error Occurred
Error Number: HY000/1
no such table: Events
SELECT * FROM "Events"
Filename: C:/xampp/htdocs/ci3/system/database/DB_driver.php
Line Number: 691

When I leave "database" in the database.php empty, I get the same result. Therefore I think there is an misconfiguration at the sql server.
could this be possible or where could be the error?

Thanks in advance

PS: In the SQL Server Management Studio the standard database of my user is "LardisLog" and the sorting is "Latin1_General_CI_AS"
Reply


Messages In This Thread
Can't select MSSQL table - by wuk986 - 12-10-2018, 11:26 AM
RE: Can't select MSSQL table - by InsiteFX - 12-11-2018, 09:28 AM
RE: Can't select MSSQL table - by wuk986 - 12-11-2018, 10:51 AM
RE: Can't select MSSQL table - by InsiteFX - 12-11-2018, 12:53 PM
RE: Can't select MSSQL table - by wuk986 - 12-15-2018, 07:25 AM
RE: Can't select MSSQL table - by InsiteFX - 12-15-2018, 09:51 AM
RE: Can't select MSSQL table - by wuk986 - 12-15-2018, 10:38 AM
RE: Can't select MSSQL table - by wuk986 - 12-18-2018, 11:55 AM
RE: Can't select MSSQL table - by oliverfinn556 - 12-24-2018, 12:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB