Like this:
Since masa is a var it needs to be outside the string (concat). Since you are storeing a dateTime in SQL Server the var needs to be enclosed in single qoutes.Code:Dim command As New SqlCommand("INSERT INTO Customers(Time) VALUES ('" & masa & "')", DataSource)
edit
I would also place Time in Square Brackets ([Time])




Reply With Quote