Friday, May 28, 2010

C#.NET : Return XML Document using a DataSet?

here is the code snippet to return XML document from Dataset :


XmlDocument xd = new XmlDocument();

xd.LoadXml(ds.GetXml()); // ds is the data set

return xd;

Friday, May 14, 2010

Error when trying to do full text search with SQL Server 2008

This was the first time I gone with FULL TEXT SEARCH IN SQL server.and I got....

SQL Server encountered error 0x80070422 while communicating with full-text filter daemon host (FDHost) process. Make sure that the FDHost process is running. To re-start the FDHost process, run the sp_fulltext_service 'restart_all_fdhosts' command or restart the SQL Server instance.

anyways!I wasn't worried about it.After a deep R&D I found the solution :)
The problem was that the actual FTS service was disabled (but not just that.......)
So go into your services and make sure that this one is running:

SQL Full-text Filter Daemon Launcher (MSSQLSERVER)

But even after I set this up running things weren't working.More research led me to find out that there was an issue with the fact that we run our SQL Server under a domain account and the full text search was not running as that same user.

So I configured this service to run as the same user and restarted the service.

Then in SQL Server I ran this:

EXEC sp_fulltext_service 'restart_all_fdhosts'

to restart things.

Also right click on the FTS catalog (under databasename / Storage / Full Text Catalog), picked properties, and then selected the option to rebuild catalog.

OLE DB Connection String to an Excel File(.xls or .xlsx)

To Extract the extension:

string _connectionString= string.Empty;

// pathToFile is fully qualified file path

string Extension = Path.GetExtension(pathToFile);

// Pass the extension to Switch Module
switch (Extension)
{
case ".xls": //Excel 97-03
_connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + pathToFile + @";Extended Properties=""Excel 8.0;HDR=YES;IMEX=1;""";

// If there is no header set HDR to NO

break;

case ".xlsx": //Excel 07
_connectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + pathToFile + @";Extended Properties=""Excel 12.0;HDR=YES;IMEX=1;""";

break;

}

Thursday, May 13, 2010

Manually register ASP.NET if IIS is installed after the .NET Framework

Framework installation installs ASP.NET automatically only if IIS is already installed.if you install IIS after the Framework you need to manually register ASP.NET.

Go To C:\WINDOWS\Microsoft.NET\Framework\VERSION
[here C:\ is Windows installation drive on your machine.]
(e.g. VERSION is v2.0.50727)

You'll see there aspnet_regiis.exe.
Run that on command line with -i switch (e.g "aspnet_regiis -i"). That'll register ASP.NET to your machine as well as creates the ASPNET user.

Wednesday, May 12, 2010

Mobile applications development

In this era, there are huge business opportunities in mobile area. All solutions will include mobile capabilities.
The market is huge and fast-growing.
If you are interested or have already plans to create mobile apps , windows applications,office automation tools,web scrapping tools with HIGH QUALITY at LOW COSTS, we can be your best partner. Please take time to go through below text to learn how you can benefit from our resources and capabilities.
I’m now looking for opportunities of helping you to turn your great ideas and plans into wonderful products.
We are strong expertise and rich resources in developing mobile software(app & game) for iPhone etc. and have successfully delivered couple of mobile projects. We have been working with global customers. We are capable to develop complicated iPhone applications involving advanced UI effects . and windows application programming with database integration and office automation with high security & performance.

We have been always keeping pace with edge-cutting new technologies.As an integrated team ,We have established development processes involving R&D, architecture QA, performance testing, unit testing, code reviews. We adopt best practices such as iterative development, prototyping,agile, etc.

By working with us, you can get all you need – Quality in time at low cost.