Welcome Guest, Not a member yet? Register   Sign In
HELP: db-connection settings for ODBC to MSSQL
#9

[eluser]Unknown[/eluser]
[quote author="mikeejay" date="1210615904"][quote author="falloutphil" date="1202708359"]Hi,

This now works:
$this->db->query("SELECT * FROM Cycle");

But this doesn't:
$this->db->get('Cycle');

An Error Was Encountered

Error Number: 42000

[DataDirect][ODBC Sybase Wire Protocol driver][SQL Server]Incorrect syntax near '`'.

SELECT COUNT(*) AS `numrows` FROM `Cycle`


Hope this helps,

Phil.[/quote]

$this->db->get(’Cycle’); works with mysql with $active_record = TRUE in database config
At least with MYSQL ODBC. But not with MSSQL ODBC =([/quote]

-----------------------------------------------------------------------------
Hi, anybody could help me pls...

I am new to CI and i want my PHP to connect to Sybase Tables in Windows XP OS
I think i successfully connected to my Database but when I run it,
Error occurs,

this is the error: Fatal error: Call to a member function num_rows() on a non-object

I changed the database.php like this below code:
------------------------------------------------
$db['default']['hostname'] = "10.195.1.32";
$db['default']['username'] = "giba";
$db['default']['password'] = "butingting";
$db['default']['database'] = "MyDevDb";
$db['default']['dbdriver'] = "odbc";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
------------------------------------------------

Here below is my controller to retrieve data from the database:

if($qry_ups->num_rows() >0){ <<<<------Fatal error: Call to a member function num_rows() on a non-object

foreach($qry_ups->result() as $row){
$this->table->add_row($row->UPS_INDEX,
$row->UPS_BRAND,
$row->UPS_MODEL);
}

hoping for your help with this matter.

Thank You very much,
GiBa
}


Messages In This Thread
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-01-2008, 02:05 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-01-2008, 04:02 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-01-2008, 04:19 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-10-2008, 05:39 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-10-2008, 10:47 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-10-2008, 11:58 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-11-2008, 12:15 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 05-12-2008, 07:11 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 05-29-2009, 01:17 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 03-24-2010, 12:30 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 03-25-2010, 06:45 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 09-26-2010, 11:30 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 03-08-2012, 03:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB