Only 1 person will be using it, no need for multiple users or it being hosted. It's going well so far apart from 1 error which I can't seem to get past.I experimented earlier with inserting the contents of a textbox into my SQL lite database, it worked fine. Now I've come to doing it with multiple textboxes under 1 button click procedure, it's not playing ball. I'm getting this (a apparently very generic error): Value cannot be null.Parameter name: sMy code is as follows:Public Class frmMaterials Dim SQLStr As String Private ConnString As String Private strSLA As String Private Sub chkYes_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkYes.CheckedChanged ' If the Yes checkbox state changes: If Yes is checked, No is invisible. If Yes is unchecked, No is visible. If chkYes.Checked = True Then chkNo.Visible = False End If If chkYes.Checked = False Then chkNo.Visible = True End If ' Make 'SLA Included?' a string and set the Yes/No value according to which checkbox is checked. If chkYes.Checked Then strSLA = "Yes" ElseIf chkNo.Checked Then strSLA = "No" End If End Sub Private Sub chkNo_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkNo.CheckedChanged ' If the No checkbox state changes: If No is checked, Yes is invisible. If No is unchecked, Yes is visible. If chkNo.Checked = True Then chkYes.Visible = False End If If chkNo.Checked = False Then chkYes.Visible = True End If ' Make 'SLA Included?' a string and set the Yes/No value according to which checkbox is checked. If chkYes.Checked Then strSLA = "Yes" ElseIf chkNo.Checked Then strSLA = "No" End If End Sub Private Sub txtUnitCost_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtUnitCost.TextChanged ' When the Unit Cost field changes; If the value of the Quantity field is more than -1, then Total Cost = Quantity * Cost If txtQuantity.Text <> -1 Then txtTotalCost.Text = CDbl(txtQuantity.Text) * CDbl(txtUnitCost.Text) End If End Sub Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click ' Set connection string ConnString = "data source=C:\Users\xxxx.Number2\Documents\Visual Studio 2010\Projects\BCSC\BCSC\Materials;page size=1500;cache size=2300;Password=xxxxxxxx" ' Set connection variables: Connection and Command properties Dim SQLConn As New SQLite.SQLiteConnection() Dim SQLCmd As New SQLite.SQLiteCommand() SQLConn.ConnectionString = ConnString SQLCmd.Connection = SQLConn SQLCmd.CommandText = SQLStr ' Set Textbox properties to strings Dim strCustomer As String = txtCustomer.Text Dim strDescription As String = txtCustomer.Text Dim strMake As String = txtMake.Text Dim strModel As String = txtModel.Text Dim strSupplier As String = txtSupplier.Text Dim strMOQ As String = txtMOQ.Text Dim strQuantity As String = txtQuantity.Text Dim strUnitcost As String = txtUnitCost.Text Dim strTotalcost As String = txtTotalCost.Text 'Set the SQL command SQLStr = "INSERT INTO materials (Customer, SLAIncluded, Description, Make, Model, Supplier, MOQ, Quantity, UnitCost, TotalCost) VALUES ('" & strCustomer & "', '" & strSLA & "', '" & strDescription & "', '" & strMake & "', '" & strModel & "', '" & strSupplier & "', " & CDbl(strMOQ) & ", " & CDbl(strQuantity) & ", " & CDbl(strUnitcost) & ", " & CDbl(strTotalcost) & ")" ' Open the connection to the SQL Lite database and store record SQLConn.Open() SQLCmd.ExecuteNonQuery() SQLConn.Close() End SubEnd ClassThe part commented as ' Set the SQL command is likely where there error is from. But when I submit the form, the error is thrown from the SQLCmd.ExecuteNonQuery()
line.Any help would be massively appreciated!Thanks