vendredi 17 avril 2015

Visual basic throw "Format of the Initialization" error when connecting to DB

I need to upload an excel file, read its content and insert it to my DB.


I always get this error :



Format of the initialization string does not conform to specification starting at index 186.



I found some solutions (although most of them use C#), i tried to apply them but no success :



connString = ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & path & ";Extended Properties=""Excel 12.0;HDR=NO;"")")


I also tried :



connString = ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & path & ";Extended Properties=Excel 12.0;)")


But none of them work. This is the path :



"C:\Users\tama\Documents\Visual Studio 2008\Projects\uploader\uploader\File\Plan TEST.xlsx"


And i have make sure that the path is correct and the file format is xlsx so i use version 12.0.


Aucun commentaire:

Enregistrer un commentaire