sghimire
298
12
Eloquent

Truncates Text data from SQL Server

Posted 1 year ago by sghimire

When querying to get data from MSSQL database, its text field data is truncating, and not able to display in the website.

I am using both databases connection (as below) to fetch the data from mssql database, and dumping in mysql database.

'connections' => [

    'mssqlMilan' => array(
        'driver'   => 'sqlsrv',
        'host'     => env('DB_DIAGDOMERO_HOST', ''),
        'port'     => env('DB_DIAGDOMERO_PORT', ''),
        'database' => env('DB_DIAGDOMERO_DB', ''),
        'username' => env('DB_DIAGDOMERO_USERNAME', ''),
        'password' => $pwd,
        'charset' => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'   => '',

    ),

    'mysqlMilan' => [
        'driver' => 'mysql',
        'host' => env('DB_DIAG_HOST', ''),
        'port' => env('DB_DIAG_PORT', '3306'),
        'database' => env('DB_DIAG_DATABASE', ''),
        'username' => env('DB_DIAG_USERNAME', ''),
        'password' => $pwd,
        'charset' => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix' => '',
        'strict' => false,
        'engine' => null,
    ],

],

I have also updated my php.ini file and it is set to (mssql.textlimit' , '2147483647' and 'mssql.textsize' , '2147483647') but no luck.

Please can you help.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.