About

I'm Mike Pope. I live in the Seattle area. I've been a technical writer and editor for over 30 years. I'm interested in software, language, music, movies, books, motorcycles, travel, and ... well, lots of stuff.

Read more ...

Blog Search


(Supports AND)

Google Ads

Feed

Subscribe to the RSS feed for this blog.

See this post for info on full versus truncated feeds.

Quote

Politicians who act from moral certainty, from the sense that any and all opponents are beyond the pale because they're morally reprobate, have no patience for and no commitment to democracy's limitations to power, its provisions for compromise by its inclusion of different viewpoints at the table, and its commitment to the legitimate right of all contending political factions to be in the majority in some instances.

Michael Bérubé



Navigation





<February 2016>
SMTWTFS
31123456
78910111213
14151617181920
21222324252627
282912345
6789101112

Categories

  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  

Contact

Email me

Blog Statistics

Dates
First entry - 6/27/2003
Most recent entry - 2/13/2016

Totals
Posts - 2360
Comments - 2527
Hits - 1,815,014

Averages
Entries/day - 0.51
Comments/entry - 1.07
Hits/day - 393

Updated every 30 minutes. Last: 3:09 PM Pacific


  08:52 AM

Here's a tip that came up on an internal alias today. When you create a database table in WebMatrix, you click the New Table button in the ribbon, define your fields, and then save. The save process gives you your one and only chance to name the table:


If you screw this up, tho, or if you change your mind about the name, you'll find yourself pressing F2 in vain to try to get it to let you rename the table.

However, you can use the sp_rename command to, you know, rename the table. In the Databases workspace, select the database and then in the riboon click New Query. This displays what's basically a free-form edit window. Click inside and enter a command like this:

sp_rename 'Customres', 'Customers'
(note the single quotation marks around the names) and then click Execute in the ribbon.


Assuming everything went well, you'll see a results window:


The larger lesson here is that you can execute arbitrary SQL commands in the New Query window. For info about what-all you can do in SQL Server Compact, have a look at the SQL Reference (SQL Server Compact) page on MSDN. Note that commands for SQL Server Compact have some limitations. For example, sp_rename only lets you rename tables, unlike its equivalent in "big" SQL Server.

[categories]   ,

[1] |