Giter VIP home page Giter VIP logo

odbc-driver's People

Contributors

azrijamil avatar ccovey avatar domex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

odbc-driver's Issues

Core Dump on Find

When I try to query a table using the find method inside a phpunit test I see an error "Segmentation fault (core dumped)".
If I try to run the code inside laravel I just get a white screen in the browser.
I'm using ccovey odbc driver version v1.1.2 (reference: cc3b4ec)
Laravel 4.1

My Model looks like this:

class Customer extends Eloquent {
    protected $connection = 'odbc';
    protected $primaryKey = "CUSTOMER_ID";
    protected $table = "CUSTOMERS";
    public $incrementing = false;
    public $timestamps = false;
}

When I try any of the following code:

$customer = Customer::find("ABC1");
$customer = Customer::findOrfail("ABC1");
$customer = Customer::where("CUSTOMER_ID", "=", "ABC1")->get();
$customer->save();

I get the message "Segmentation fault (core dumped)".

The following methods do work:

$customer = new Customer;
$customer = Customer::first();
$customer = Customer::whereRaw("customer_id = 'ABC1'");

If I switch my model to use a mysql connection everything works fine. What could be the issue here?

Error datasource name not found

Hello,

I'm receiving the error:
SQLSTATE[IM002] SQLDriverConnect: 0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified

when trying to use an eloquent model based on this driver. I'm not really sure where to begin troubleshooting. We have an installed and working odbc driver for iseries/db2. The driver is configured with UnixODBC. We are using the MySQL driver for i as well but the performance is not as good as straight db2.

Here is my model:

class ODBCCustomer extends Eloquent {
    protected $connection = 'odbc';
    protected $table = 'table_name';

}

Here is the code I'm using to create the model:

$test = ODBCCustomer::where('customer_number', '=', '12345');

And here is the relevant section of my database.php

'odbc' => array(
            'driver'   =>   'odbc',
            'dsn'      =>   'Driver={iSeries Access ODBC Driver};SYSTEM=ip_address;',
            'grammar'  =>   'DB2',
            'username' =>   'username',
            'password' =>   'password',
            'database' =>   '',
        ),

Problem with ODBCDriverConnection

I've updated the last commit and now I get a issue: Declaration of Ccovey\ODBCDriver\ODBCDriverConnectionFactory::createConnection() should be compatible with Illuminate\Database\Connectors\ConnectionFactory::createConnection($driver, PDO $connection, $database, $prefix = '', array $config = Array)

How can I fix it?

Slight tweak to documentation

Hi Cody,

Could you please update your readme to show the package name of "ccovey/odbc-driver-l4": "dev-master". It's just missing the -l4.

Thanks

[Bug] getDefaultSchemaGrammar trying to instantiate inexistent class

In this portion of the code:

protected function getDefaultSchemaGrammar()
{
    return $this->withTablePrefix(new Schema\Grammars\Grammar);
}

Since there is no Ccovey\\ODBCDriver\\Schema\\Grammars\\Grammar, we changed it to

protected function getDefaultSchemaGrammar()
{
    return $this->withTablePrefix(new \Illuminate\Database\Schema\SqlServerGrammar);
}

And it worked fine. Sorry for not sending a PR, I don't (think I) have a database I could access via ODBC here.

Getting "the requested PHP extension pdo-odbc is missing from your system" on composer update

Apologies if this is just user error, but at this point I'm just spinning my wheels. I'm basically getting the same error as the fellow here:

http://stackoverflow.com/questions/22838307/laravel-4-odbc-class-cannot-find-php-extension

I've verified that the extension is loaded on my system by doing a phpinfo() page and php -m. I'm wondering if this could be something as simple a casing issue. My reasoning is that the extension's name show us as PDO_ODBC in both places.

Change this:

    "require": {
        ...
        "ext-pdo_odbc": "*"
    },

To this:

    "require": {
        ...
        "ext-PDO_ODBC": "*"
    },

I'm sure there's a way to test this locally, but until I figure that out, I thought I'd ask here. Thanks in advance for taking the time to read this!

Cannot use Illuminate\Database\Schema\Grammars\Grammar as Grammar because the name is already in use in

Having errors in running the package on laravel 4.1.X
Below is the error message, Thanks in advanced!
PHP Fatal error: Cannot use Illuminate\Database\Schema\Grammars\Grammar as Grammar because the name is already in use in /Users/andrew/Desktop/odbc/vendor/ccovey/odbc-driver-l4/src/Ccovey/ODBCDriver/ODBCDriverConnection.php on line 5
{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Cannot use Illuminate\Database\Schema\Grammars\Grammar as Grammar because the name is already in use","file":"/Users/andrew/Desktop/odbc/vendor/ccovey/odbc-driver-l4/src/Ccovey/ODBCDriver/ODBCDriverConnection.php"

ErrorException - Declaration of Ccovey

There is a strong chance this is a user issue, I apologize if it is

  1. Create a Brand New Laravel 4.1 project via Composer
  2. Add ccovey
    "require": {
    "laravel/framework": "4.1.*",
    "ccovey/odbc-driver-l4": "1.1.x"
    },
  3. Composer Install
  4. Replace Driver: 'Ccovey\ODBCDriver\ODBCDriverServiceProvider',
  5. Add database config.

Windows 7/64, Xampp, php 5.4

Refresh application and get the following error exception.

ErrorException
Declaration of Ccovey\ODBCDriver\ODBCDriverConnectionFactory::createConnection() should be compatible with Illuminate\Database\Connectors\ConnectionFactory::createConnection($driver, PDO $connection, $database, $prefix = '', array $config = Array)

I have an issue with UTF8 chars

Laravel return this error The Response content must be a string or object implementing __toString(), "boolean" given. when im trying to get data with á or Ñ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.