Unanswered: Inserting problem with sqlserver and vb.net
hi there i ve got a quick question regarding table and adding primary key and values
Basically i have a empty table called ReligionType and have two fields ReligionID and ReligionName. I would like to add a new data into this table (i set the indentity and identity seed in sql server but when i execute the value in sqladapter it give me error on
"An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll"
This is the code that i wrote in vb.net
con2.Open() //sql connection
Me.SqlInsertCommand2.CommandText() = "Insert into ReligionType(ReligionName) Values (@ReligionName) SELECT @@identity As 'ReligionID' GO"