Private Sub GetFileList
.
.
.
ParsedFileName( 4 ) = [COLOR="RoyalBlue"]ConvertToSQLDate[/COLOR]( ParsedFileName( 4 ) )
SQLCommand.CommandText = "INSERT INTO FileNames VALUES ( '" & i & _ [COLOR="SeaGreen"]'Primary Key[/COLOR]
"' , '" & AlFiles.Item( i ) & _ [COLOR="SeaGreen"]'File Path[/COLOR]
"' , '" & ParsedFileName( 0 ) & _ [COLOR="Seagreen"]'Machine Number[/COLOR]
"' , '" & Magazine( 0 ) & _ [COLOR="Seagreen"]'Magazine 0[/COLOR]
"' , '" & Magazine( 1 ) & _ [COLOR="Seagreen"]'Magazine 1[/COLOR]
"' , '" & ParsedFileName( 2 ) & _ [COLOR="Seagreen"]'Order Number[/COLOR]
"' , '" & ParsedFileName( 3 ) & _ [COLOR="Seagreen"]'Batch Number[/COLOR]
"' , '" & ParsedFileName( 4 ) & _ [COLOR="Seagreen"]'Date[/COLOR]
"' )"
SQLCommand.ExecuteNonQuery
.
.
.
End Sub
Private Sub [COLOR="royalblue"]ConvertToSQLDate[/COLOR]( DDMMYYYY )
DateFormat( "dd-mm-yyyy" )
Ticks = DateParse( DDMMYYYY )
DateFormat( "yyyy-mm-dd" )
Return Date( Ticks )
End Sub
Private Sub UpdateTable
.
.
.
SQLCommand.CommandText = "INSERT INTO FilterList " & _
"SELECT ID , MachineNumber , MagazineNumber0 , MagazineNumber1 , OrderNumber , " & _
"BatchNumber , Date([COLOR="Red"]OrderDate[/COLOR]) " & _
"FROM FileNames " & _
"ORDER BY MachineNumber , OrderDate"
SQLCommand.ExecuteNonQuery
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?