Previously i used vba to change characters in a table.
example:
'Start the converter
Dim c As New ADODB.Recordset
Set db = DBEngine(0)(0)
ReDim chararray(256) As Integer
For x = 1 To 256
chararray(x) = 0
Next x
chararray(161) = 165
chararray(165) = 188
chararray(169) = 138
chararray(171) = 141
chararray(177) = 185
chararray(181) = 190
chararray(183) = 162
chararray(185) = 154
chararray(187) = 157
chararray(162) = 161
chararray(166) = 140
chararray(172) = 143
chararray(174) = 142
chararray(182) = 156
chararray(188) = 159
chararray(190) = 158
c.Open "tbl_char_converter", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
lcount = 0
Do Until c.EOF
lcount = lcount + 1
lcountscr = lcount
[Forms]![Frm_int_afp_selection].Repaint
flen = Len(c![Line])
For x = 1 To flen
changechar = 0
If chararray(Asc(Mid(c![Line], x, 1))) > 0 Then
c![Line] = Mid(c![Line], 1, x - 1) & Chr(chararray(Asc(Mid(c![Line], x, 1)))) & Mid(c![Line], x + 1, flen)
c.Update
End If
Next x
c.MoveNext
Loop
Now instead of using vba and a table, i have a copy of the data in a table held in the database. I would like to be able to carry out the same function using AWK in UNIX.
Is this possible ??
Please help.
example:
'Start the converter
Dim c As New ADODB.Recordset
Set db = DBEngine(0)(0)
ReDim chararray(256) As Integer
For x = 1 To 256
chararray(x) = 0
Next x
chararray(161) = 165
chararray(165) = 188
chararray(169) = 138
chararray(171) = 141
chararray(177) = 185
chararray(181) = 190
chararray(183) = 162
chararray(185) = 154
chararray(187) = 157
chararray(162) = 161
chararray(166) = 140
chararray(172) = 143
chararray(174) = 142
chararray(182) = 156
chararray(188) = 159
chararray(190) = 158
c.Open "tbl_char_converter", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
lcount = 0
Do Until c.EOF
lcount = lcount + 1
lcountscr = lcount
[Forms]![Frm_int_afp_selection].Repaint
flen = Len(c![Line])
For x = 1 To flen
changechar = 0
If chararray(Asc(Mid(c![Line], x, 1))) > 0 Then
c![Line] = Mid(c![Line], 1, x - 1) & Chr(chararray(Asc(Mid(c![Line], x, 1)))) & Mid(c![Line], x + 1, flen)
c.Update
End If
Next x
c.MoveNext
Loop
Now instead of using vba and a table, i have a copy of the data in a table held in the database. I would like to be able to carry out the same function using AWK in UNIX.
Is this possible ??
Please help.