Home > database >  Join SQL server. The mappath () cannot run, with the actual absolute path is normal
Join SQL server. The mappath () cannot run, with the actual absolute path is normal

Time:09-18

Plagued the afternoon
Is in the asp

Insert into table
Select * FROM OpenDataSource (' Microsoft. ACE. The OLEDB. 12.0 ', 'Data Source="& amp; Server. The mappath (fileName) & amp; "; Extended properties=Excel 12.0 ')... [Sheet1 $]

This code hinting "external table not expected format"
If the server. The mappath (fileName) into an absolute path, are sure
But the value of the fileName must be true, because the output the SQL directly, copying out perform on

If change the
Insert into OpenDataSource (' SQLOLEDB ', 'Data Source=ServerName; User ID=sa; Password=sa '). DBS. Dbo. Table
Select * FROM [Sheet1 $]
Asp tip insert into near a syntax error
Also, this sentence in the SQL server to perform normal

Good strange things
  • Related