paulthepaddy
Well-known member
Well Guys The Title Says it all, im getting the error 'The identifier cannot be an empty string' and i cannot for the life of me work this out.
i am hoping i have just been up to long programming and need to sleep, but i really cant find anything wrong in the code
The Table Does Have An ID field But it is on Auto so as far as i know figure out it cant be the ID column
i am hoping i have just been up to long programming and need to sleep, but i really cant find anything wrong in the code
The Table Does Have An ID field But it is on Auto so as far as i know figure out it cant be the ID column
VB.NET:
Dim SQLQuery = <sql>INSERT INTO OrderNumbers (OrderNumber, Dealership_ID, Department_ID, Cars_Reg, Date, Amount, Paid) VALUES (@OrderNumber, @Dealership_ID, @Department_ID , @Cars_Reg, @Date, @Amount, @Paid)"</sql>
Select Case IsConnectionAvailable()
Case False
Using Connection As New SqlServerCe.SqlCeConnection(My.Settings.ClientImageConnectionString)
Using Command As New SqlServerCe.SqlCeCommand(SQLQuery, Connection)
With Command.Parameters
.AddWithValue("@OrderNumber", Me.OrderNumber)
.AddWithValue("@Dealership_ID", Me.DealerID)
.AddWithValue("@Department_ID", Me.DepartmentID)
.AddWithValue("@Cars_Reg", Me.Reg)
.AddWithValue("@Date", Me.DateDone)
.AddWithValue("@Amount", Me.Amount)
.AddWithValue("@Paid", Me.Paid)
End With
'Try
Connection.Open()
[COLOR=#ff0000]Command.ExecuteNonQuery()[/COLOR] 'Error Happening Here The identifier cannot be an empty string Error
Connection.Close()
'Catch ex As Exception
'MessageBox.Show(ex.Message)
'End Try
For Each item In WorkDone
item.AddToDataBase()
Next
End Using
End Using