when I hit F5, which is not incorrect, but not what I want (for educational purposes). So how do I get the editor to stop interfering? I tried unchecking IntelliSense and restart VSm but that didn't change anything.
You may want to check out the following Settings within Visual Studio which might help you out (to prevent automatic capitalization and a few other settings) :
Under the Tools Menu, Select Options...
Expand the Text Editor area on the left-hand side
Find and Expand the Transact-SQL area
Select Intellisense
Here you can toggle several settings such as automatic casing for built-in functions, such as DATEADD, FROM, etc.
There are also additional options such as Indenting, Word-wrapping, Tabbing and other settings available there that may possible be what you are looking for.
I don't believe that you can completely remove some of the automatic formatting functionality as it is a default behavior in Visual Studio 2010 and I believe according to Microsoft is "by design".
I'm using VS 2012 and upon answering your question I checked to see if there were any differences between 2010 and 2012 with regards to formatting and it seems that everything is the same. :(
pettrer
Participant
970 Points
469 Posts
avoid reformatting of sql in VS 2010
Jan 22, 2013 03:25 PM|LINK
Hi all,
If I write
select * from kvitto
in VS 2010 Ultimate, I get
SELECT kvittoID, kundID
FROM Kvitto
when I hit F5, which is not incorrect, but not what I want (for educational purposes). So how do I get the editor to stop interfering? I tried unchecking IntelliSense and restart VSm but that didn't change anything.
Thanks!
Petter
Rion William...
All-Star
32244 Points
5234 Posts
Re: avoid reformatting of sql in VS 2010
Jan 22, 2013 03:39 PM|LINK
You may want to check out the following Settings within Visual Studio which might help you out (to prevent automatic capitalization and a few other settings) :
There are also additional options such as Indenting, Word-wrapping, Tabbing and other settings available there that may possible be what you are looking for.
I don't believe that you can completely remove some of the automatic formatting functionality as it is a default behavior in Visual Studio 2010 and I believe according to Microsoft is "by design".
pettrer
Participant
970 Points
469 Posts
Re: avoid reformatting of sql in VS 2010
Jan 22, 2013 03:51 PM|LINK
Thanks, I just found the same info in another thread.
It's amazing, considering that this isn't the case in Mangement Studio (as I recall it). I really hate it! :(
Hope VS 2012 is better in this respect.
Thanks again,
Petter
Rion William...
All-Star
32244 Points
5234 Posts
Re: avoid reformatting of sql in VS 2010
Jan 22, 2013 03:53 PM|LINK
I'm using VS 2012 and upon answering your question I checked to see if there were any differences between 2010 and 2012 with regards to formatting and it seems that everything is the same. :(
oned_gk
All-Star
36280 Points
7394 Posts
Re: avoid reformatting of sql in VS 2010
Jan 23, 2013 07:23 AM|LINK
Select your sqldatasource and goto properties
Suwandi - Non Graduate Programmer