views:

296

answers:

2

I am trying to programmatically drop a column in a table inside of an access database and found myself unable to do so! Is it at all possible? it makes me think that i don't have any clear idea of things linq to sql can't do. Any ideas?

+2  A: 

There's nothing in LINQ to SQL that allows you to do that without writing T-SQL, no.

Similarly, you can't do straight updates or deletes without selecting the data you want to alter first and manipulating the objects. You'd have to write stored procedures for those things and add them to your model to be called. See this MSDN page for an overview.

Using DataContext.ExecuteQuery should also work if you don't mind T-SQL in your source code.

Thorarin
A: 

I have not tested it, but you might try this to issue the actual SQL command:

http://msdn.microsoft.com/en-us/library/bb399403.aspx

KM