I moved the application and the datafile to my IIS Server and tested there. I found that my web.config file was working and that trace was running. However the mass amount of information provided no light on why the table is not updating. There was no difference in how the application ran on my local workstation and the web server. I will take a close look at the permissions but I do not think that is the problem.
I was told on the forums.asp.net site that Visual Studio Express generates incorrect code and trys to write to the autonumber field. Visual Studio Express generated the following line.
InsertCommand="INSERT INTO [PhoneListTable] ([ID], [FirstName], [LastName], [ShowInPhoneList]) VALUES (?, ?, ?, ?)"
But that code is not correct because [ID] is an autonumber field and can not be written to. So I removed the [ID] and one of the ? marks. The new line looks like this.
InsertCommand="INSERT INTO [PhoneListTable] ([FirstName], [LastName], [ShowInPhoneList]) VALUES (?, ?, ?)"
I just checked the table and all the fields to make sure that REQUIRED was set to NO. All the fields in the table are correct.
I also removed the lines with the [ID] in them from the
I checked the permissions for the App_Data folder and all accounts have full rights. I even gave Anonymous login with full rights. This still did not resolve the problem so I continue to research what the problem is. I believe it is still something in the code.
No comments:
Post a Comment