Link to home
Create AccountLog in
Avatar of zimmer9
zimmer9Flag for United States of America

asked on

How would you rewrite a Trim statement to guard against an empty date field being imported from a CSV file into a SQL Server table?

I am developing an Access 2003 application.

I import a date field into a SQL Server table.

How would you rewrite the following statement to add a date field to a recordset to guard against the date field being empty?

Open "U:\Gim2_extract.txt.csv" For Input As #1
Do While Not EOF(1)
Line Input #1, s
If Len(s) > 0 Then
    s = Replace(s, Chr(34), "")
    vArr = Split(s, "|")
    With rs
               !C_MAX_ACTIVITY_DATE = Trim(vArr(20))
Avatar of mbizup
Flag of Kazakhstan image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account