Algo Rhythm

Algo Rhythm

  • NA
  • 41
  • 0

Inserting Database Record Using DataSource

Aug 25 2010 12:10 PM

This code:
Me
.SqlDataSource1.InsertParameters("@term") = New Parameter("@term", Data.DbType.AnsiString, "test")
Me.SqlDataSource1.InsertParameters("@definition") = New Parameter("@definition", Data.DbType.AnsiString, "test")
Me.SqlDataSource1.Insert()
Gives me this error:

Cannot insert the value NULL into column 'term', table 'GeneralAssembly.dbo.tblGACMSGlossary'; column does not allow nulls. INSERT fails.
The statement has been terminated.


Insert code is defined in data source as
InsertCommand
="INSERT INTO [tblGACMSGlossary] ([term], [definition]) VALUES (@term, @definition)"

Answers (2)