How to convert a comma seperated file (.csv) into a dataset (C#)

by Manuel 12/13/2007 9:35:00 AM
public DataSet GetCSVFile( string fileName)
{
     string pathName = System.IO. Path .GetDirectoryName(fileName);
     string file = System.IO. Path .GetFileName(fileName);
     OleDbConnection excelConnection = new OleDbConnection
     (@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ pathName + ";Extended Properties=Text;");
     OleDbCommandexcelCommand = newOleDbCommand(@"SELECT * FROM "+ file, excelConnection);
     OleDbDataAdapterexcelAdapter = newOleDbDataAdapter(excelCommand);
     excelConnection.Open();
     DataSetds = newDataSet();
     excelAdapter.Fill(ds);
     excelConnection.Close();
     return ds;
}

Currently rated 5.0 by 3 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

C# | ASP.NET

WSS 3.0 and MOSS 2007 Service Pack 1 (SP1) released.

by Manuel 12/12/2007 3:04:00 AM

Be carefull when installing it on a productive server, use a test environment first. Seems like there are a lot of problems upgrading systems. Also be aware that WSS and MOSS service packs cannot be uninstalled!

Downloads:
WSS 3.0 SP1
MOSS 2007 SP1

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

MOSS 2007 | WSS 3.0

global.asax events

by Manuel 12/6/2007 2:32:00 AM


HttpApplication Events:

Application_AcquireRequestState
Occurs when ASP.NET acquires the current state (for example, session state) that is associated with the current request. 

Application_AuthenticateRequest
Occurs when a security module has established the identity of the user. 

Application_AuthorizeRequest
Occurs when a security module has verified user authorization. 

Application_BeginRequest
Occurs as the first event in the HTTP pipeline chain of execution when ASP.NET responds to a request. 

Application_Disposed
Adds an event handler to listen to the Disposed event on the application. 

Application_EndRequest
Occurs as the last event in the HTTP pipeline chain of execution when ASP.NET responds to a request. 

Application_Error
Occurs when an unhandled exception is thrown. 

Application_PostAcquireRequestState
Occurs when the request state (for example, session state) that is associated with the current request has been obtained. 

Application_PostAuthenticateRequest
Occurs when a security module has established the identity of the user. 

Application_PostAuthorizeRequest
Occurs when the user for the current request has been authorized. 

Application_PostMapRequestHandler
Occurs when ASP.NET has mapped the current request to the appropriate event handler. 

Application_PostReleaseRequestState
Occurs when ASP.NET has completed executing all request event handlers and the request state data has been stored. 

Application_PostRequestHandlerExecute
Occurs when the ASP.NET event handler (for example, a page or an XML Web service) finishes execution. 

Application_PostResolveRequestCache
Occurs when ASP.NET bypasses execution of the current event handler and allows a caching module to serve a request from the cache. 

Application_PostUpdateRequestCache
Occurs when ASP.NET completes updating caching modules and storing responses that are used to serve subsequent requests from the cache. 

Application_PreRequestHandlerExecute
Occurs just before ASP.NET begins executing an event handler (for example, a page or an XML Web service). 

Application_PreSendRequestContent
Occurs just before ASP.NET sends content to the client. 

Application_PreSendRequestHeaders
Occurs just before ASP.NET sends HTTP headers to the client. 

Application_ReleaseRequestState
Occurs after ASP.NET finishes executing all request event handlers. This event causes state modules to save the current state data. 

Application_ResolveRequestCache
Occurs when ASP.NET completes an authorization event to let the caching modules serve requests from the cache, bypassing execution of the event handler (for example, a page or an XML Web service). 

Application_UpdateRequestCache
Occurs when ASP.NET finishes executing an event handler in order to let caching modules store responses that will be used to serve subsequent requests from the cache. 

Application_Init
This method occurs after _start and is used for initializing code.

Application_Start
As with traditional ASP, used to set up an application environment and only called when the application first starts.

Application_End
Again, like classic ASP, used to clean up variables and memory when an application ends.

Session Events:

Session_Start
As with classic ASP, this event is triggered when any new user accesses the web site.

Session_End
As with classic ASP, this event is triggered when a user's session times out or ends. Note this can be 20 mins (the default session timeout value) after the user actually leaves the site.

Profile Events:

Profile_MigrateAnonymous
Occurs when the anonymous user for a profile logs in.

Passport Events:

PassportAuthentication_OnAuthenticate
Raised during authentication. This is a Global.asax event that must be named PassportAuthentication_OnAuthenticate.
 

Possibly more events defined in other HttpModules like:

System.Web.Caching.OutputCacheModule
System.Web.SessionState.SessionStateModule
System.Web.Security.WindowsAuthentication
System.Web.Security.FormsAuthenticationModule
System.Web.Security.PassportAuthenticationModule
System.Web.Security.UrlAuthorizationModule
System.Web.Security.FileAuthorizationModule
System.Web.Profile.ProfileModule

Currently rated 4.5 by 10 people

  • Currently 4.500001/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

C# | ASP.NET

iRobot Roomba - Testbericht / Microsoft Robotics Studio

by Manuel 12/5/2007 2:01:00 PM

 

Gerät: iRobot Roomba 560

Funktionsweise: Roboterstaubsauger

Testurteil: sehr gut Smile

 

Kurzer Testbericht:

Was will man viel sagen, der Roomba macht einfach, was er soll. Nachmittags, wenn niemand zu Hause ist, erwacht er zum Leben und saugt mal eben schnell (ok, er braucht ca. 70min) die Wohnung. Wenn er damit fertig ist, fährt er zurück zu seiner Ladestation und hält ein Nickerchen bis am nächsten Tag. Selbst die langen Haare meiner Freundin sind für ihn kein Problem, allerdings sollte man so alle zwei bis drei Tage den Staubbehälter leeren und die Bürsten reinigen. Der Aufwand dafür beträgt ca. 5 min.

Die Bedienung ist kinderleicht, Roomba erklärt sich über das eingebaute Sprachmodul inklusive Demonstration seiner Fähigkeiten selbst.

Insgesamt macht der Roomba einen sehr ausgereiften Eindruck und ist sein Geld allemal wert, vor allem wenn man bedenkt, was eine Haushaltshilfe für eine vergleichbare Arbeit verlangen würde.

 

Die Goodies:

Der Roomba ist programmierbar! Unter http://www.sparkfun.com/commerce/categories.php?cPath=2_104 gibt es alles was man benötigt, um den Roomba an den PC anzuschliessen. Das Coolste ist, dass der Roomba mit dem Microsoft Robotics Studio (kostenloser Download) kompatibel ist, d.h. er kann ganz einfach mit .NET programmiert werden.

Weitere Links für Entwickler:

http://www.devx.com/dotnet/Article/32729/0/page/3
http://www.sparkfun.com/commerce/categories.php?cPath=2_104
http://www.roombadevtools.com/
http://msdn2.microsoft.com/en-us/robotics/default.aspx
http://msdn2.microsoft.com/en-us/library/bb483025.aspx

Currently rated 5.0 by 5 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Stuff

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Sign in