Support the ongoing development of Laravel.io →
posted 10 years ago
Database
Last updated 2 years ago.
0

I had the same problem and would up changing a few lines in the vendor/ccovey/odbc-driver-l4/src/Ccovey/ODBCDriver/ODBCDriverConnection.php file and it works:

<?php namespace Ccovey\ODBCDriver;

use Illuminate\Database\Connection;
//use Illuminate\Database\Query\Grammars\Grammar;
//use Illuminate\Database\Schema\Grammars\Grammar;

class ODBCDriverConnection extends Connection
{
	/**
	 * @return Query\Grammars\Grammar
	 */
	protected function getDefaultQueryGrammar()
	{
		$grammarConfig = $this->getGrammarConfig();

		if ($grammarConfig) {
			$packageGrammar = "Ccovey\\ODBCDriver\\Grammars\\" . $grammarConfig; 
			if (class_exists($packageGrammar)) {
				return $this->withTablePrefix(new $packageGrammar);
			}
		
			$illuminateGrammar = "Illuminate\\Database\\Query\\Grammars\\" . $grammarConfig;
			if (class_exists($illuminateGrammar)) {
				return $this->withTablePrefix(new $illuminateGrammar);
			}
		}

		return $this->withTablePrefix(new Illuminate\Database\Query\Grammars\Grammar);
	}

	/**
	 * Default grammar for specified Schema
	 * @return Schema\Grammars\Grammar
	 */
	protected function getDefaultSchemaGrammar()
	{
		return $this->withTablePrefix(new Illuminate\Database\Schema\Grammars\Grammar);
	}

	protected function getGrammarConfig()
	{
		if ($this->getConfig('grammar')) {
			return $this->getConfig('grammar');
		}

		return false;
	}
}
Last updated 2 years ago.
0

Basically two classes were used with the same alias so I removed the "use" statements and just replaced with the full namespaced classes.

Last updated 2 years ago.
0

Thank you very much stechnique, now it appears the following error

Class 'Lamb\LaravelGenericDatabase\GenericDatabaseServiceProvider' not found

I'm leaving very little, you will not have any place to connect to this documented as the basis Intersystems Cache?

Cordially Mauro

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

malturria malturria Joined 3 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.