<%
Set oConn = Server.CreateObject("ADODB.connection")
oConn.Open "Driver={Microsoft Excel Driver (*.xls)};DBQ=" & Server.Mappath("050208.xls") & ";"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.open "SELECT * FROM [sheet1$]", oConn
dim mySQL, conntemp, rstemp
do until RS.EOF
mySQL="INSERT INTO users (uname,subid) VALUES ('" &RS.fields(0)& "','" &RS.fields(1)& "')"
call updateDatabase(mySQL, rstemp, "addsxe.asp")
RS.movenext
Loop
RS.Close
oConn.Close
Set RS = Nothing
Set oConn = Nothing
%>
|