Reading the text file (Part 3)

knockyo

Well-known member
Joined
Sep 20, 2006
Messages
78
Programming Experience
1-3
here the text file i need to grab
paramtextpu1.jpg


here is the database i need to follow the sequence
paramdbko0.jpg


here is my Insert into SQL command code

VB.NET:
  StrSQL = "INSERT INTO NXP_AM1_ACU_DETAIL " _
                                        & "(FromId,StationId,SerialNo, " _
                                        & "SWBin,HWBin,SystemBinCode, " _
                                        & "TestResult,P001,P002,P003,P004,P005) " _
                                        & "VALUES ('" & UniqueId & "', " _
                                        & "'" & Station & "', '" & aSQL.Count + 1 & "', " _
                                        & "'" & aColumns(1) & "', '" & aColumns(2) & "', " _
                                        & "1, '" & aColumns(3) & "', " _
                                        & "'" & aColumns(4) & "', '" & aColumns(6) & "', " _
                                        & "'" & aColumns(8) & "', '" & aColumns(10) & "', " _
                                        & "'" & aColumns(12) & "')"
                                aSQL.Add(StrSQL)

For eg:
HINTS:
Pxxx (database field column name)
1,2,3....7 (sequence for text file i need to follow)

1 = 8.6182e-01 2 = 1.6626e+00, 3=-4.8683e+01, 4.................................
1 store in DB column P001
2 store in DB column P002
3 store in DB column P003
.
.
.
.
.

Like SQL code show above, any idea to modify my SQL?
 
Last edited:
Back
Top