Thursday, March 8, 2012

Access to sql server

I am writed handreds page in my wwwroot use Access Database,and I install a SQL server yestoday,What should I do after move my database to sql server .
thanks!With the Access Database you are probably using OleDbDataAdapters and OleDbCommands. With SqlServer you should use SqlDataAdapters and SqlCommands because they are more efficient. The syntax between the two is very similar so mostly you'll just need to change the class names (OleDbxxx to Sqlxxx).

If you're using any Access specific Sql commands you will have to modify them for SqlServer. For example Access uses "IIF(x,y,z)" while Sql Server uses "CASE WHEN x THEN y ELSE z END".

No comments:

Post a Comment