Excel to Access using ASP
Jim wrote:
Anyone know an ASP script for transferring data from an Excel sheet
to an
Access table, some of the fields of which contain names which have an
apostrophe (') in them.
"INSERT INTO tblResults Values(0,'" & rsExcel("FeisID") & "' , '" &
rsExcel("CompNo") & "' , '" & rsExcel("Entry") & "' , '" &
rsExcel("Name") &
"' , '" & rsExcel("School") & "' , '" & rsExcel("Position") & "' ,
'0' , '"
& Done & "')"
You may not need the recordset e.g. something like this:
INSERT INTO
FeisID, CompNo,
Entry, Name, School,
[Position], text_col, Done
SELECT
FeisID, CompNo,
Entry, Name, School,
[Position], '0' Done
FROM
[Excel 8.0;Database=C:\MyBook.xls;].[MySheet$];
Jamie.
--
|