Renamed tbl not viewed in Immed. Window.

  • Thread starter Thread starter Nat
  • Start date Start date
N

Nat

Old table name : tblTimeOption
New table name: tblDefinitionTimes


Keep getting this error for the following
code: "System.Data.SqlClient.SqlException: Invalid object
name 'tblTimeOption'.

However code says this:
Dim sSqlCommand1 As String _
= "Insert Into tblDefinitionTimes (DefId,
StartTime, " _
& "Participant, InsertDate, UpdateDate) Values
(@DefId, @StartTime, " _
& "@Participant, @InsertDate, @UpdateDate)"
Dim cmdTimeOption As New SqlCommand(sSqlCommand1,
conProShop)
Try
If cmdDefinitions.ExecuteNonQuery() > 0 Then

In Immediate Window sSqlCommand1 displays the "old" table
name even though the "new" name is spelled out! Why????
 
No code provided on how and where and when you change the Datatable
name....are you using TableMappings or doing this via the Tablename property
on Datatable?
 
Sorry to inconvience everyone. I found that if one has errors during a
Build causes erroneous events to occur in other web forms or modules.
Once I had a clean build everything seemed to work.
 
Back
Top