Using SQL Server Management Studio 2012
So i have a text box and a button, I would like to type something into the text box and have it inserted into a specific table when i click the button. Here is what i have so far.
I found something a lot easier to read
Public Shared Sub InsertDealer(ByVal DealerName As String, _
ByVal DealerState As String)
Dim dc = New DataworldDataContext.DataworldDataContext
Try
Dim cust As New tblDealer With {.DealerName = "John", _
.DealerState = "TX"}
dc.tblDealers.InsertOnSubmit(cust)
dc.SubmitChanges()
Catch ex As Exception
Throw ex
End Try
End Sub
error is "tblDealer is not defined"
Thanks