Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
256 views
in Technique[技术] by (71.8m points)

c# - What is IMEX within OLEDB connection strings?

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=localhost;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=2"

What is the purpose of IMEX=2 in the above connection string?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

From ConnectionStrings

"If you want to read the column headers into the result set (using HDR=NO even though there is a header) and the column data is numeric, use IMEX=1 to avoid crash.

To always use IMEX=1 is a safer way to retrieve data for mixed data columns. .."

Please note that the IMEX value can be very important when you need to write back data to the Excel. A fast search on Internet on IMEX found numerous articles about problems with various IMEX values


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...