My World

My World

MS Technology and My World

Windows Phone Emulator – ERROR – couldn’t determine the host IP address

While developing Windows Phone 8 app, in case you have come across an error with following details
“The Windows Phone Emulator wasn’t able to connect to the Windows Phone operating system:
The emulator couldn’t determine the host IP address, which is used to communicate with
the guest virtual machine.
Some functionality may be disabled.”

Solution:
1. Started Hyper-V manager
2. Virtual Switch Manager
3. Removed the “Windows Phone Emulator Internal Switch” from the list, and applied the changes.

Error: The ‘Microsoft.Jet.OLEDB.4.0′ provider is not registered on the local machine.

This issue happens where you are using the Jet.OLEDB.4.0 driver, and error occurs you try to run it on 64 bit system. Install the new driver Microsoft Access Database Engine 2010 Redistributable

http://www.microsoft.com/download/en/details.aspx?id=13255

Change the connection string from “Provider=Microsoft.Jet.OLEDB.4.0; “ to “Provider=Microsoft.ACE.OLEDB.12.0;”

Happy Coding!

ASP.NET: FileWrite Error: The network name cannot be found

In case we come across situation we are trying to store/ write to file share and face “The network name cannot be found ” even though you can open the folder location in File Explorer, Try to use the following statement to combine the location and file name

System.IO.Path.Combine(path,filename)

Tip: SQL SERVER Error, Fatal error 823

If you encounter following error

Fatal error 823 occurred at <time stamp>. Note the error and time, and contact your system administrator

Suggest you to restart the SQL service again. This is will resolve this issue.

Sequence of service restart is Pause -> Stop -> Start the service. This will help you to come out of this error.

If you still face this issue do let me know

ASP: Convert String to ASCII and Vice a Versa

ASP – VBScript Code for converting string to ASCII.

Use string function ASC e.g.

ASC(“a”) ====> 97

ASP – VBScript Code for converting ASCII to string

Use string function Chr e.g.

Chr(97) ====> a

CSS Style – Hover doesn’t work for visited links……..!

The browser will read your css line by line, so it needs to be logically structured with hover after visited.

As an Example

HTML Code:
a {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
}
a:link {
text-decoration: none;
color: #000000;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
color: #FFFF00;
}

How to reset the Remote connection limit

Go to Run Command->Type gpedit.msc->Click on Computer Configuration ->Administrativr Tempelate->Windows Component->Terminal Service and Increase the “Limit Number of Connection”

Click ok

MS SQL Server : WITH CHECK OPTION

Views in SQL Server are updateable, so when you add/update rows the view details could get alter (resultant records from the views). Consider following example

CREATE VIEW Employees_Karnataka
AS
(
SELECT * FROM Authors WHERE state='Karnataka'
)

Now if you execute following DML statement:

UPDATE Employees_Karnataka SET state='Maharashtra'

This statement will execute and the view will not have no records to display. This is very much legal DML statement, which results in anomolous results.

This anamolous situation can avoided by adding WITH CHECK OPTION predicate when you create the view:

CREATE VIEW Employees_Karnataka
AS
(
SELECT * FROM Authors WHERE state='Karnataka'
)
WITH CHECK OPTION

Now any insert or update operation that makes a record disappear from the view raises a trappable runtime error.

How to add a Windows user to the sysadmin fixed server role in SQL Server

You can use the account of a Windows user who is a member of the local Administrators group to add another Windows user to the sysadminfixed server role in SQL Server 2005. To do this, follow these steps:

  1. Log on to Windows by using the account of a Windows user who is a member of the local Administrators group.
  2. Stop the SQL Server service.
  3. At a command prompt, start the instance in single-user mode. To do this, follow these steps:
    1. At a command prompt, change to the following folder:
      SQLInstall\Microsoft SQL Server\MSSQL.X\MSSQL\Binn

      Notes

      • SQLInstall is a placeholder for the folder in which SQL Server 2005 is installed.
      • MSSQL.X is a placeholder for the folder for the instance.
    2. If the instance is a named instance of SQL Server 2005, run the following command:
      sqlservr.exe -sInstanceName -m -c

      If the instance is the default instance of SQL Server 2005, run the following command:

      sqlservr.exe -m -c
  4. Use the Sqlcmd utility (Sqlcmd.exe) to connect to the instance. To do this, follow these steps:
    1. Start a command prompt.
    2. If the instance is a named instance of SQL Server 2005, run the following command:
      sqlcmd -SComputerName\InstanceName

      If the instance is the default instance of SQL Server 2005, run the following command:

      sqlcmd -SComputerName
  5. At a command prompt, run the following Transact-SQL statement.
    sp_addsrvrolemember '<Login>', 'sysadmin'
    GO

    Note <Login> is a placeholder for the Windows user whom you want to add to the sysadmin fixed server role.

Important The method that is described in this article is a new feature in SQL Server 2005. You cannot disable this feature. However, use other methods to add a Windows user to the sysadmin fixed server role if other methods are available. For example, if you have a different login that is a member of the sysadmin fixed server role, use this different login to log on to the instance. Then, add the Windows user to the sysadmin fixed server role.

Microsoft – SkyDrive Feature

Check this lovely site to understand the SkyDrive feature and MS Office 2010 integration.

http://office.microsoft.com/en-us/web-apps-help/using-office-web-apps-in-windows-live-skydrive-HA101231889.aspx

Calendar

April 2014
M T W T F S S
« Feb    
 123456
78910111213
14151617181920
21222324252627
282930  

Recent Comments