... but not in sample code.
Tutorial says:whereas the code has the necessary extra line (as I discovered when I tried to run the code, and was explained by the desktop IDE message)Mike.
If Reader.ReadNextRow = False Then ' No table with this name in the database. ' Create one. Command.CommandText = "CREATE TABLE t_orders (ID INTEGER PRIMARY KEY, Sum REAL, TableNum INTEGER," & _ "SeatNum INTEGER, Hamburger INTEGER, French INTEGER, Coke INTEGER, Water INTEGER, " & _ "isServed INTEGER, Time TEXT)" Reader.Close Command.ExecuteNonQuery Else 'Close reader anyhow Reader.Close End If
' No table with this name in the database. ' Create one. But first close the reader. Reader.Close