bencarter78 / odbc Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
In the documentation it says:
In your config/app.php file add the Service Provider to the service providers array like so...
'TCK\Odbc\OdbcServiceProvider',
In Laravel 5.3 I encountered problems (Driver not Found) with this plugin.
This plugin extends the available database drivers and should therefor be called right after the line
Illuminate\Database\DatabaseServiceProvider::class,
in config/app.php
I am getting a driver not found error. I've done some research and from what I can tell, php pdo for odbc comes pre configured. So why am I getting this error??
this product is something great that no body noticed, i created a system management and business insight using this module, but it need grammer for atleast the enterprise db's like db2, oracle or sysbase
with regards
I am getting the following error when doing a query:
>>> \App\FiscalYear::where('FiscalYearName','2016-2017')->get();
Illuminate\Database\QueryException with message 'SQLSTATE[42000]: Syntax error or access violation: 402 [FreeTDS][SQL Server]The data types nvarchar and text are incompatible in the equal to operator. (SQLExecute[402] at /builddir/build/BUILD/php-5.5.35/ext/pdo_odbc/odbc_stmt.c:254) (SQL: select * from "FiscalYear" where "FiscalYearName" = 2016-2017)'
It appears that the default binding is doing it as text, but the data in the database is nvarchar - and apparently MSSQL doesn't like that. How do I define my columns to correctly type themselves in the query bindings?
Dear, I use laravel5.5 link sql server 2000, inquiries out of the data distortion, how to deal with? Look forward to your reply, I have been engaged for several days, the use of iconv one by one, but the impact of performance, extremely grateful!
Trying to upgrade a project to Laravel 6 that requires this package, and I see that it's been 4 years since the last update. Has the project been abandoned?
I'm using your driver outside laravel framework, and it gives an error about the config function used in ODBCConnection. (removing that condition doesn't raise the error). Eg https://github.com/bencarter78/odbc/blob/master/src/TCK/Odbc/ODBCConnection.php#L14
Perhaps the config function is provided by some laravel package not included in composer.json?
PHP 7.2
Laravel 5.7
odbc is installed as a php extension
/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php
* @throws \InvalidArgumentException
*/
protected function createConnection($driver, $connection, $database, $prefix = '', array $config = [])
{
if ($resolver = Connection::getResolver($driver)) {
return $resolver($connection, $database, $prefix, $config);
}
switch ($driver) {
case 'mysql':
return new MySqlConnection($connection, $database, $prefix, $config);
case 'pgsql':
return new PostgresConnection($connection, $database, $prefix, $config);
case 'sqlite':
return new SQLiteConnection($connection, $database, $prefix, $config);
case 'sqlsrv':
return new SqlServerConnection($connection, $database, $prefix, $config);
}
throw new InvalidArgumentException("Unsupported driver [{$driver}]");
}
}
Arguments
"Unsupported driver [odbc]"
The service provider isn't passing $config as the 4th parameter, so any calls to ->getConfig will return nothing and ->config is always empty.
I dont know why but using the sample on readme: DB::connection('odbc')->get('TB_Item_ContratoCliente')->all()
i've get this error: Call to undefined method TCK\Odbc\ODBCConnection::get().
Using the $connection in model work fine.
I'm using a Server with SQL Server 2000 in conjunction with laravel. I have been successfully able to connect with the TCK / ODBC.
Now I have a problem with the -> find () method, which creates a SQL string with the LIMIT statement. Unfortunately the SQL Server 2000 only knows the TOP statement.
Is there a chance to add a method or else so I could use eloquents?
Thanks
Some documentation at least outlining:
How to install
What version of Laravel this is for
If this is even complete
Would have been really appreciated considering this is pretty much the first package you see for "odbc" in packagist.org
I'm writing some stuff in Laravel that will require an ODBC driver for Laravel (or I'll end up writing my own or something I guess). Would you consider putting any documentation up?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.