The Blog of Travis Gneiting
  • Home
KEEP IN TOUCH

Monthly archives for February, 2010

Microsoft Suggested Naming Conventions

Feb24
2010
1 Comment Written by admin

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

Posted in Uncategorized

Entity Framwork Query Examples

Feb24
2010
Leave a Comment Written by admin
var selectCustomer = from c in dbContext.Customer.Include(“Invoice.Product”)
where c.Id == id
select c
Posted in Uncategorized

SQL Server Import of Country, State, Zip, From GeoNames.Org

Feb12
2010
2 Comments Written by admin

A few post have been made with complex solutions for importing information from GeoNames.org into SQL Server.  These involved downloading converters to change the file from UTF-8 encoding and downloading additional software (EditPad Pro) to complete the conversion to UTF-16.

A much simpler way is to open the txt file in Microsoft Excel. Let Excel perform it’s magic on the tab delimited file.

Add the headers to the top row:

The main 'geoname' table has the following fields :
---------------------------------------------------
geonameid         : integer id of record in geonames database
name              : name of geographical point (utf8) varchar(200)
asciiname         : name of geographical point in plain ascii characters, varchar(200)
alternatenames    : alternatenames, comma separated varchar(5000)
latitude          : latitude in decimal degrees (wgs84)
longitude         : longitude in decimal degrees (wgs84)
feature class     : see http://www.geonames.org/export/codes.html, char(1)
feature code      : see http://www.geonames.org/export/codes.html, varchar(10)
country code      : ISO-3166 2-letter country code, 2 characters
cc2               : alternate country codes, comma separated, ISO-3166 2-letter country code, 60 characters
admin1 code       : fipscode (subject to change to iso code), see exceptions below, see file admin1Codes.txt for display names of this code; varchar(20)
admin2 code       : code for the second administrative division, a county in the US, see file admin2Codes.txt; varchar(80)
admin3 code       : code for third level administrative division, varchar(20)
admin4 code       : code for fourth level administrative division, varchar(20)
population        : bigint (4 byte int)
elevation         : in meters, integer
gtopo30           : average elevation of 30'x30' (ca 900mx900m) area in meters, integer
timezone          : the timezone id (see file timeZone.txt)
modification date : date of last modification in yyyy-MM-dd format

Then save the Excel file. Use SQL Server import to import the Excel file and your done.
Posted in SQL Server

Microsoft Certified Technology Specialist (MCTS)

Feb11
2010
Leave a Comment Written by admin

http://www.microsoft.com/learning/en/us/certification/mcts.aspx#tab3

Posted in Uncategorized

Use PRG pattern for data modification

Feb10
2010
Leave a Comment Written by admin

Use PRG pattern for data modification

“PRG stands for Post-Redirect-Get to avoid the classic browser warning when refreshing a page after post.  Whenever you make a POST request, once the request complets do a redirect so that a GET request is fired.  In this way when the user refresh the page, the last GET request will be executed rather than the POST thereby avoiding unnecessary usability issue.”

Posted in Uncategorized

How to get the DataKey Primary Key value from a GridView RowCommand Sub

Feb08
2010
1 Comment Written by admin

Dim index As String = e.CommandArgument
Dim pk As String = GridView1.DataKeys(index).Value.ToString

Posted in GridView

Entity Framework Links

Feb04
2010
Written by admin

Mozilla Development Center - https://developer.mozilla.org/en/Web_Development 

MSDN – Entity Framework - http://msdn.microsoft.com/en-us/library/bb386964.aspx 

Entity Framework – http://naspinski.net/post/Getting-started-with-Linq-To-Entities.aspx 

MSDN – The ADO.NET Entity Framework- http://msdn.microsoft.com/en-us/data/aa937723.aspx 

MSDN – .Net Framework Class Library - http://msdn.microsoft.com/en-us/library/ms229335.aspx 

MSDN – Data Development Videos (Entity Framework) – http://msdn.microsoft.com/en-us/data/cc300162.aspx 

MSDN – When to use Linq to SQL vs When to use Linq to Entity - http://msdn.microsoft.com/en-us/library/cc161164.aspx

Eight Entity Framework Tutorials on DataDeveloper.NET - http://thedatafarm.com/blog/data-access/eight-entity-framework-tutorials-on-datadeveloper-net/ 

Application Scenarios (Entity Framework) – http://msdn.microsoft.com/en-us/data/bb738689.aspx 
http://code.msdn.microsoft.com/EFDocSamples2008

Posted in Software Engineering, Uncategorized

XtraReport Bindings

Feb04
2010
Written by admin

Change

Private WithEvents bindingSource1 As System.Windows.Forms.BindingSource

To

Public WithEvents bindingSource1 As System.Windows.Forms.BindingSource

Also the bindingSource Datasource needs to be changed in the report code.

Me.bindingSource1.DataSource = GetType(TypeofObject)

For the report viewer, again bind the bindingSource Datasource

Dim objects As objects
objects = GetAllObjects()
Dim Report1 As New XtraReport1
Report1.bindingSource1.DataSource = objects
ReportViewer1.Report = Report1
Posted in Software Engineering - Tagged DevExpress

Programming

  • ASP.NET
  • MSDN
  • Visual Studio Offical Website
  • www.w3.org

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Welcome to My Programming Blog

This is my brain dump. I use it to post thing I may use again, interesting things I have run into and programming helps.

Tags

.net Agile Software Development Engineering ASP.NET attack Beginner Blueprint CSS Database Deployment DevExpress Framework Functional hacked Hotmail How to test software HTTP IIS Javascript JQuery MIME New Website Checklist PHP querystring Software Testing Specification spoof Status Codes Testing Trace Debug ASP.NET Tutorial Velocity webmethod Website Testing Zend

Blog Archive

  • January 2012
  • November 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • February 2011
  • January 2011
  • November 2010
  • October 2010
  • August 2010
  • July 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • February 2009
  • January 2009
  • November 2008
  • September 2008
  • August 2008
  • July 2008
  • April 2008

EvoLve theme by Theme4Press  •  Powered by WordPress The Blog of Travis Gneiting