Hi there, I hope that somebody can help.
I'm working in ASP.NET on what is actually a WCF webservice, but for debugging purposes I'm using a standard Default.aspx to try to establish the problem.
I have a remote MS SQL server, with connection string:
Security Info=True;User ID=fadb;Password=mypass"
This string allows me to write to the database using the Visual Studio 2008 IDE, so I'm fairly confident there are no issues with login / password / etc.
I added a new LINQ to Sql class, DataClasses.dbml, and dragged a test table onto the design surface. Yet when I execute the attached code snippet, the record in the database is not updated. There are no error messages raised and the output on the page indicates that the row was updated:
Row name is currently: John
Updated row to new name.
The DataClasses.dbml properties include:
Serializationmode: Unidirectional (so I can access the service from Silverlight)
Both columns in my test table are set (for debug purposes) to:
Update Check: Never
The structure of my test table is simply:
Int ID (isIdentity=Yes) (No Nulls)
string name (No Nulls)
....but none of this seems to help! I'd be grateful for any assistance.
PS: I have searched the web and found interesting articles at:
but neither are entirely relevant.
protected void Page_Load(object sender, EventArgs e)
DataClassesDataContext db = new DataClassesDataContext();
Response.Write(db.Connection.ConnectionString + "<br>");
tblTest row = db.tblTests.Single(r => r.ID == 1);
if (row != null) // not found - can't update
// Read the row
Response.Write("Row name is currently: " + row.name + "<br>");
// Update the row
row.name = "John Lennon";
Response.Write("Updated row to new name.<br>");