Home > Software engineering >  Head to fry!!!! "" is not a valid path. To determine the path name is correct, and whether
Head to fry!!!! "" is not a valid path. To determine the path name is correct, and whether

Time:10-08

Want to use in the vc ado technology to access the CSV file, but each run to open here would "path name" is not a valid path to determine whether the path name correctly, and whether it is connected to the storage server , this is what circumstance, the path name is dynamic for sure no problem, is it strpath statements have any problems, or ODBC source to match what driver? New to this stuff, don't understand ah, a great god grant instruction genuflect is begged!
Source:
M_pConnection. CreateInstance (" ADODB. Connection ");

//strpath="Provider=Microsoft. Jet. The OLEDB. 4.0. Data Source="+ STR +"; Extended Properties=\ "Text; FMT=Delimited; HDR=NO \ "";
Strpath="Provider=Microsoft. Jet. The OLEDB. 4.0. Data Source="+ STR +"; Extended Properties='text; HDR=YES; FMT=Delimited '";
//strpath="Driver={Microsoft Text Driver (*.txt. *. CSV)}; Dbq="+ STR +"; Extensions=asc, CSV, TAB, TXT; ";

M_pConnection - & gt; Open (strpath, ""," ", adModeUnknown);

return true;

CodePudding user response:

Direct print database file path, look to whether the correct absolute path

CodePudding user response:

There is something wrong with the connection string, can use ADO assistant try your database connection string and SQL statements,

CodePudding user response:

Or look at this how to obtain a string,

CodePudding user response:

The problem of the connection string? Internet a lot, I have a lot, also is such, or is the external table not expected format, now I look at my computer without Microsoft ODBC driver. Jet. The OLEDB. 4.0 this is a problem of data source?

CodePudding user response:

Toos - & gt; Connect to the Database inside under test is successful, there is a path to the file
  • Related