Greetings!
I'm new to a company and will be doing some dataconversions. To get familiar with the data structure (and to dump it into rs) I've come up with:
'Loop through tables in Source to populate Result
catTbl.ActiveConnection = cn
j = catTbl.Tables.Count
For i = 1 To j
If Left(catTbl.Tables(i).Name, 3) <> "sys" Then
If Left(catTbl.Tables(i).Name, 4) <> "TEMP" Then
For k = 0 To catTbl.Tables(i).Columns.Count - 1
strSQL = "INSERT INTO TS_BASE ( TableName, FieldName, DataType, FieldSize, FieldPrecision, SourceDB ) " & _
"Values ('" & catTbl.Tables(i).Name & "', '" & catTbl.Tables(i).Columns(k).Name & "', '" & catTbl.Tables(i).Columns(k).Type & "', '" & catTbl.Tables(i).Columns(k).DefinedSize & "', '" & catTbl.Tables(i).Columns(k).Precision & "', 'RWC');"
cnResult.Execute strSQL
Next k
End If
End If
Next i
What do I need so I can find out if the column will not accept nulls?
Thanks
I'm new to a company and will be doing some dataconversions. To get familiar with the data structure (and to dump it into rs) I've come up with:
'Loop through tables in Source to populate Result
catTbl.ActiveConnection = cn
j = catTbl.Tables.Count
For i = 1 To j
If Left(catTbl.Tables(i).Name, 3) <> "sys" Then
If Left(catTbl.Tables(i).Name, 4) <> "TEMP" Then
For k = 0 To catTbl.Tables(i).Columns.Count - 1
strSQL = "INSERT INTO TS_BASE ( TableName, FieldName, DataType, FieldSize, FieldPrecision, SourceDB ) " & _
"Values ('" & catTbl.Tables(i).Name & "', '" & catTbl.Tables(i).Columns(k).Name & "', '" & catTbl.Tables(i).Columns(k).Type & "', '" & catTbl.Tables(i).Columns(k).DefinedSize & "', '" & catTbl.Tables(i).Columns(k).Precision & "', 'RWC');"
cnResult.Execute strSQL
Next k
End If
End If
Next i
What do I need so I can find out if the column will not accept nulls?
Thanks