Well, for mass imports of data I usually script something with AutoIT, before I prepare the lists and create a CSV file.
Here is a small example on how to connect to the database and perform changes:
#include <_CSVLib_V1.3.au3>
#include <Array.au3>
$path = @ScriptDir & "\datafile.csv"
Func _SQLCon($scIP, $scUser, $scPass, $scDB)
$Objconn = ObjCreate("ADODB.Connection")
$Objconn.Open ("Provider=SQLOLEDB; Data Source=" & $scIP & "; User ID=" & $scUser & "; Password=" & $scPass & "; database=" & $scDB & ";")
Return $Objconn
EndFunc ;==>_SQLCon
Func _SQLQuery($oConnectionObj, $iQuery)
If IsObj($oConnectionObj) Then
Return $oConnectionObj.Execute($iQuery)
EndIf
EndFunc ;==>_SQLQuery
Func _SQLEnd($Objconn)
If IsObj($Objconn) Then
$Objconn.close
EndIf
EndFunc ;==>_SQLEnd
$sql = _SQLCon("Server\instance", "lssqluser", "password", "Database")
$records=_CSVFileReadRecords($path)
$numrecords = _CSVRecordsGetFieldValue($records, 0, 0)
For $f = 1 To $numrecords
$computername=_CSVRecordsGetFieldValue($records, 1, $f)
$username=_CSVRecordsGetFieldValue($records, 2, $f)
$sqlstring= "UPDATE tblCustInventory SET UserName = '"& $username & "' WHERE (ComputerName = '" & $computername & "')"
$query = _SQLQuery($sql, $sqlstring)
Next
_SQLEnd($sql)
I'm importing something similar, putting all data together into the new table "tblCompCustom" and I guess it will work greatly this way.
😉