Im trying to write from a text file to a table in SQL . Ive dimmed everything correctly (i Think) but when it comes to write the line into the table the code doesnt accept my VALUE as a string....it thinks it is a number...so ignores what is in the text file (which is a char)
Private Type Fieldattr
Pos As Integer
Len As Integer
Value As String
End Type .......................
Dim ColumnAttr() As Fieldattr
Case "SALESPRICE"
ReDim ColumnAttr(2)
ColumnAttr(0).Pos = 1 'MaterialCode
ColumnAttr(0).Len = 18
ColumnAttr(1).Pos = 19 'List Price
ColumnAttr(1).Len = 11
ColumnAttr(2).Pos = 30 'Price Unit
ColumnAttr(2).Len = 5
End Select .......................
Case "SALESPRICE"
rst.Open "sp_qryAddSalesPriceRecord '" & ColumnAttr(0).Value & "','" _
& ColumnAttr(1).Value & "','" _
& ColumnAttr(2).Value & "'", adoConnection, adOpenDynamic, adLockReadOnly
End Select
Private Type Fieldattr
Pos As Integer
Len As Integer
Value As String
End Type .......................
Dim ColumnAttr() As Fieldattr
Case "SALESPRICE"
ReDim ColumnAttr(2)
ColumnAttr(0).Pos = 1 'MaterialCode
ColumnAttr(0).Len = 18
ColumnAttr(1).Pos = 19 'List Price
ColumnAttr(1).Len = 11
ColumnAttr(2).Pos = 30 'Price Unit
ColumnAttr(2).Len = 5
End Select .......................
Case "SALESPRICE"
rst.Open "sp_qryAddSalesPriceRecord '" & ColumnAttr(0).Value & "','" _
& ColumnAttr(1).Value & "','" _
& ColumnAttr(2).Value & "'", adoConnection, adOpenDynamic, adLockReadOnly
End Select