Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

You can do it. Here's an example:

ALTER TABLE Import
Alter column [Tot_Val]  DECIMAL(10,2) ;

GO

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top