Closed IP-Developer closed 6 years ago
Hello, could you detail what is happening to you?
Can you attach any log or screenshot?
Also, an example of a DSN would be very welcome :)
Hola @WrongWay,
According to the picture above, please add this code to your composer.json after "config" section:
"minimum-stability": "dev",
"prefer-stable": true
About DSN, what is your operating system?
If Windows is your operating system, please follow this instruction:
Open Control Panel -> Administrative Tools -> ODBC Data Sources (32-bit) or (64-bit) (according to your php bit version, if you are using XAMPP usually it's 32-bit, but if you use Laragon, it depends on your laragon installation, mine is 64-bit).
For example we will use 64-bit version, double click on ODBC Data Sources (64-bit).
Choose Add.
Choose Microsoft Access Driver (.mdb, .accdb), press Next.
Fill the Data Resource Name column, for example mine is "CyberBilling", and fill the Description column (optional).
In Database section, choose Select..., and locate your access file location. For example, mine is D:\Database\database.mdb.
If your Access file has password, please press Advanced..., and in Login name column, please type your username, and in Password column, please type your password. Then press OK.
Then add conenction to your config/database.php in connections section:
'access' => [
'driver' => 'pdo_access',
'connection_string' => 'dsn={namedsn}',
'username' => '',
'password' => '',
'table_prefix' => '',
]
Change the {namedsn} to your Data Resource Name, according to the example above, i will change it to CyberBilling
'access' => [
'driver' => 'pdo_access',
'connection_string' => 'dsn=CyberBilling',
'username' => '',
'password' => '',
'table_prefix' => '',
]
That's it, if you found something, please tell us.
Still doesn't work
Also tried to change "prefer-stable"
to false
or "minimum-stability"
to dev-master
with no success.
Hola @WrongWay,
Hmm, that's weird.
This is my composer.json, take a look at minimum-stability section. Can you post your composer.json screenshot?
How about the DSN, does it work?
@rizaldywirawan it works fine now, thanks for the help :) But I also encountered another problem with the encoding. Instead of Cédric
I get C?dric
. Any way to fix this ?
Hola @WrongWay,
Can you post a picture about it? Haven't heard about that before.
Have you read about this article ? I hope that's what you looking for.
@rizaldywirawan this is a problem with the ODBC connection itself, not the display (I have utf8 set everywhere). I don't know how to set the encoding of the database and/or the connection. I don't even know which encoding is used in the Access database.
Hola @WrongWay,
Aw, sorry about that.
Did you succeed to show data from database? Sorry for stupid question here, have you uncomment extension=php_pdo_odbc.dll at php.ini file?
I guess, the only one who can answer this question is @zoilomora.
@rizaldywirawan yes, I uncommented the extension and the connection works well (except the encoding, of course). Looks like I will need to export everything as CSV to get proper encoding :(
Hola @WrongWay,
Aw, sorry to hear that, i hope you will get the solution soon, of course without export to CSV.
@rizaldywirawan for a one-time export/import csv is not a problem for a small database. Although it would be a lot better to use this package for that :)
Hola @WrongWay,
I agree with you, straight to the db is the best option, at least for me :p.
I guess your main problem (install this package) already solved, how about close this issues?
@rizaldywirawan yeah, sure. Thanks for help :)
Hola @WrongWay,
You're welcome, success for your project ;), and i hope @zoilomora will find and way to fix the encoding problem.
Hello, I have been indisposed this weekend, sorry for the absence.
Thank you very much @rizaldywirawan for your great help.
@WrongWay I'm sorry that this package did not work for you. Could you send me an example database where it happens to you to analyze the problem?
@zoilomora Hi, the package works fine, I can select anything from the database, but there is a problem with the diacritics being converted to question marks (like plain question marks, not the squared ones). The text in the database is french. Laravel is all set up to use UTF-8. I'll try to upload an example db today.
@WrongWay I will write it down in the TODO file to take it into account for the next version. ;)
Laravel 5.4