I'm attempting to parse out a column of data in a table(Table A) into another table(TableB) that has all the fields. In total there are 127 fields that are going to be populated. Can I use a standard SQL INSERT statement to do this or will I reach a max limit on the size of my SQL statement? I was thinking this would happen so I tried inserting records into TableB by way of a recordset. Ithe ActiveX Script Task window, I keep getting an error message saying my ADODB.Recordset does not support updating. Am I missing a piece of logic here?
Dim...
strConnection = "Provider=SQLOLEDB;Integrated Security=SSPI;Initial Catalog=SPA_Dev;Data Source=(local)"
Set rsSource = createobject("ADODB.Recordset"
rsSource.Open "TableA", strConnection, adOpenDynamic
Set rsDest = CreateObject ("ADODB.Recordset"
rsDest.Open "TableB", strConnection, adOpenDynamic
rsSource.movefirst
Do...
strLine = rsSource.fields(0).value
rsdest.addnew
rsDest.fields(0) = mid(strLine,961,1)
rsdest.update
rsSource.movenext
End
Dim...
strConnection = "Provider=SQLOLEDB;Integrated Security=SSPI;Initial Catalog=SPA_Dev;Data Source=(local)"
Set rsSource = createobject("ADODB.Recordset"
rsSource.Open "TableA", strConnection, adOpenDynamic
Set rsDest = CreateObject ("ADODB.Recordset"
rsDest.Open "TableB", strConnection, adOpenDynamic
rsSource.movefirst
Do...
strLine = rsSource.fields(0).value
rsdest.addnew
rsDest.fields(0) = mid(strLine,961,1)
rsdest.update
rsSource.movenext
End