Hi
I have a very simple script that seems to work OK inserting into an
Access table from a CSV file. The problem I have is that the first
column (stored as text) has student ID numbers - some start with 100...
others start with a character like K or M. It inserts the 100... IDs but
not the rest. Anyone any ideas? Here is the code:
set objConn= Server.CreateObject("ADODB.Connection")
strDBPath = Server.MapPath("../DB/Live.mdb")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath
& ";"
Dim csv_path
csv_path = Server.MapPath("./Uploads") & "\"
SQL = "SELECT * INTO Learner FROM [Learner2.csv] IN """ & csv_path &
""" ""TEXT;"""
SQL = "INSERT INTO Learner SELECT * FROM [Learner2.csv] IN """ &
csv_path & """ ""TEXT;"""
'Executing the SQL Statement
ObjConn.Execute SQL
Hope someone has the answer.
CJA