I currently have a table call fileStorageTbl which has the following columns:
Revision varchar(2)
FileType varchar(50)
Version varchar(4)
Title varchar(255)
User varchar(50)
Name varchar(100)
Date varchar(20)
Time varchar(20)
Picture image(16)
but when I use the following statement it does not work:
Can anyone help?
Simon
Revision varchar(2)
FileType varchar(50)
Version varchar(4)
Title varchar(255)
User varchar(50)
Name varchar(100)
Date varchar(20)
Time varchar(20)
Picture image(16)
but when I use the following statement it does not work:
Code:
Dim strRevision As String
Dim strFileType As String
Dim strVersion As String
Dim strTitle As String
Dim strUser As String
Dim strName As String
Dim strTime As String
Dim strDate As String
Dim strAlias As String
strRevision = Me.comboRev.SelectedItem
strFileType = Me.comboFileType.SelectedItem
strVersion = Me.comboVersion.SelectedItem
strTitle = Me.txtTitle.Text
strName = "simon liddicott"
strTime = "13:43:10"
strDate = "02/02/2005"
strAlias = "lidds"
Dim myConn As New OleDb.OleDbConnection("Provider=sqloledb;Data Source=(local);initial catalog=testdb;user id=admin;password=simon")
Dim myInsertCmd As New OleDb.OleDbCommand("INSERT INTO FileStorageTbl (Revision,FileType,Version,Title,User,Name,Date,Time) VALUES (" & strRevision & "," & strFileType & "," & strVersion & "," & strTitle & "," & strAlias & "," & strName & "," & strDate & "," & strTime & ")", myConn)
myConn.Open()
myInsertCmd.ExecuteNonQuery()
myConn.Close()
Can anyone help?
Simon