Archive for July, 2009

48 Hour Game Programming Challenge: Ludum Dare August 28th – 30th

I just found this site Ludum Dare (as a linkback, haha). Looks pretty cute! Now you can test your uber terriffic game programming skills by competing against other game programing fiends. Looks like they have fairly decent participation. The idea is simple, you’re given a theme and you have 48 hours to create and submit a game for judging.  The contest runs on the August 28th – 30th weekend. Looks like it could be fun. If I can squeeze in time between my other current game projects maybe I’ll give it a try.

Add comment July 28, 2009

ASP Binary Upload Fix: Request.BinaryRead Operation Not Allowed

IIS also has a maximum request size that will need to be reset if you’re uploading documents larger than about 200kb.

1) Open IIS Manager by going to start > control panel > administrative tools. Right click on the server name > properties. Click on enable direct metabase edit. If this box isn’t checked you won’t be able to edit the metabase.xml file.

2) Open my computer. In the address bar put this and hit enter: %SYSTEMROOT%\system32\inetsrv

3) Find the metabase.xml file and open it with some kind of text editor

4) Search for the line that says AspMaxRequestEntityAllowed. Change that to your max file upload size.

5) Go back to IIS and uncheck direct edit metabase checkbox.

2 comments July 17, 2009

SQL Tutorial: Select, Update & Delete Syntax

Select Statements

General Syntax

  • SELECT [column], [column], [column] FROM [tablename] WHERE [column] = [value]

Select All Columns

  • SELECT * FROM [tablename]

Limit # of Records Returned – MSSQL

  • SELECT TOP [number] * FROM [tablename]

Limit # of Records Returned – SQL

  • SELECT * FROM [tablename] LIMIT [# from], [# to]
    • this one works well for pagination. You can select results 0 – 30, then 31 to 60, etc.
  • SELECT * FROM [tablename] LIMIT [number]
    • use this one if you just want to cut off the number of records returned

Sum A Field By Status ID

  • SELECT sum([column]), status_id FROM [tablename] WHERE [column] = [value] GROUP BY status_id

Count A Field

  • SELECT count([column]) FROM [tablename] WHERE [column] = [value]

Sort By A Field Ascending or Descending

  • SELECT [column], [column] FROM [tablename] WHERE [column] = [value] ORDER BY [column] DESC, [column] ASC

Complex Where Values

  • SELECT [column], [column] FROM [tablename] WHERE ([column] = [value] AND [column] = [value]) OR ([column] = [value] AND [column] = [value])

Select From Result Subset

  • SELECT [column], [column] FROM [tablename] WHERE [column] IN ([value], [value], [value])

Select From Select Subset

  • SELECT [column] FROM [tablename] WHERE [column] IN (SELECT [column] FROM [tablename])

Inner Join Select All – records must exist in table B and table A matching on conditions

  • SELECT * FROM [tablename] A INNER JOIN [tablename] B ON A.[column] = B.column WHERE A.[column] = [value]

Left Join Select All – records must exist in table A

  • SELECT * FROM [tablename] A LEFT OUTER JOIN [tablename] B on A.[column] = B.[column] WHERE B.[column] = [value]

Inner Join Select All From One Table, Select Fields From Another

  • SELECT A.*, B.[column], B.[column] FROM [tablename] A INNER JOIN [tablename] B ON A.[column] = B.column WHERE A.[column] = [value]

Unions – results and columns must match in both SQL statements

  • SELECT A.*, B.[column], B.[column] FROM [tablename] A INNER JOIN [tablename] B ON A.[column] = B.column WHERE A.[column] = [value] UNION SELECT C.*, D.[column], D.[column] FROM [tablename] C INNER JOIN [tablename] D ON C.[column] = D.column WHERE C.[column] = [value]

Delete Statements

Always do a select statement first to make sure the records you’re about to delete are the ones you want. Also consider any triggers that may be fired as a result of deleting these records.

General Syntax

  • DELETE FROM [tablename] WHERE [column] = [value]

Check Yourself

  • SELECT * FROM [tablename] WHERE [column] = [value]
  • Now replace the text in red with the text in blue below to delete the records you found
  • DELETE FROM [tablename] WHERE [column] = [value]

Update Statements

Make sure you do a select statement before attempting to update records to ensure you only update the records you intended. Also consider any triggers that may be fired as a result of updating these records.

General Syntax

  • UPDATE [tablename] SET [column]=[value], [column]=[value], [column]=[value] WHERE [column]=[value]

Check Yourself

  • SELECT * FROM [tablename] WHERE [column] = [value]
  • Replace the blue section with what’s in red below, then add the columns and values you want to update as seen in green below
  • UPDATE [tablename] SET [column]=[value], [column]=[value], [column]=[value] WHERE [column]=[value]

Add comment July 16, 2009

Previous Posts


Cool Sites

Free Code

Game Developer

Game Engines

Game Jobs

Music & Sound

Second Life

Sprites

Lost In Oblivion

July 2009
M T W T F S S
« Jun   Aug »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Top Posts

Recent Posts

Archives

Feeds