Thursday, July 15, 2010

SQL Statement OpenDataSource

SELECT *
FROM OPENDATASOURCE('SQLNCLI',
'Data Source=10.20.2.218;uid=sa;pwd=sa').
cardrequests.dbo.tbl_customer_Sql

Saturday, May 1, 2010

The credentials you provided for the SQL server Agent service are invalid. To continue, provide valid account and password for the SQL server Agent Se

The credentials you provided for the SQL server Agent service are invalid. To continue, provide valid account and password for the SQL server Agent Service.

Today, I have decided to install SQL SERVER 2008 on my PC. All was going fine until I came to server configuration page/tab. I was halted for half an hour to insert correct credential to move to the next page. If you are also getting the same trouble then just enter following data in Account name and password:

Account Name : "NT AUTHORITY\NETWORK SERVICE "
Password : Blank

I hope this will resolve your issue.

FORMATTING NUMBERS IN SQL

To format numbers in sql queries in SQL SERVER 2005, use the following command

Select Convert(nvarchar,cast(123123323 as money),1)

This will convert the following number 123123323 to 123,123,323.00

Thursday, July 30, 2009

HOW TO REMOVE PRINTER DRIVER

You can remove printer driver by following steps that are defined below:

1. Go to Printers & Faxes

2. Delete the printer configuration in question. (For safety's sake, you may want to consider deleting all printer configurations to ensure that you aren't still using some element of the driver in another configuration somewhere. Remember that a driver is often times more than just a single file. It may involve shared libraries in use by multiple printer configurations.)

3. Go to File --> Server Properties

4. Go to the Drivers tab. You will be presented with a list of drivers.

5. Select a Driver and press the "Remove" button.

Tuesday, July 28, 2009

\\server is not accessible. You might not have permission to use this network resource. Contact the administarator of this server to find out if you

Problem:

Often time I receive a problem while my computer is connected with networks.It work properly on server 5 minutes ago but after 5 minutes it display me the error.

"\\server is not accessible. You might not have permission to use this network resource. Contact the administarator of this server to find out if you have access Permissions. Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again."

I digged alot about the solution of the problem. Some post suggest block your firewall which I was not using and many other solution. But nothing work.

After a long hours of digging on web for the above problem and implementing all the solutions that they suggest in their post, I have found a valuable command which solve my problem and now I am not facing this problem and if some time I face then use the solution.


Oh........ I forget the share solution with you. The solution is based on commands and they are (Open your command prompt first)

1) net use * /d

The above command will remove all the map drives from your computer. After writing this command and press enter, it will ask you that to press 'y' for Yes and 'n' for No. Press y. After then write the next command

2) net use h:\\server_name\foldername

Now wait for a few seconds / minutes (might be). It will ask the user name and password. Enter the user name and password and get rid from the problem.

Hope this will work for you as well.

Best of Luck.

OUTLOOK CANNOT CONNECT TO YOUR OUTGOING SMTP EMAIL SERVER.

Dear Friends,

I am using MS OUTLOOK for my Email. It was working fine but since last day it is giving me an error.

"Outlook can not connect to your outgoing SMTP E-mail server. If you continue to recieve this message contact your Administrator or ISP Provider."


After digging long hours I get some solutions.

1) Change smtp port from 25 to 587.

OR

2) create the account again.

OR

3) Check Firewalls either they are not creating the problem.

OR

4) If any of the above options is not working then contact to your ISP Provider. Either they have block the SMTP address from their side. Ask them to allow your SMTP to send E-mails.

In my case the fourth option works.

I hope that this will help you in solving the problem.

Wish you all the best............

CONNECTION STRING IN WEB.CONFIG IN C#

Dear Fellows,

You can create declare connection string in web.config file. You can do so by

<add name="Connection_Name" connectionString="server=(local);database=database_name;uid=sa;pwd=sa" providerName="System.Data.SqlClient"/>

Now you can call this connection in any .aspx page by this command.

NOTE: I am getting connection string in a string variable named "Path"

string path = System.Configuration.ConfigurationManager.ConnectionStrings["Connection_Name"].ConnectionString;

See how simple is this. In the same way you can use this connection string in all your .aspx pages.

Take Care and Enjoy...............

Docker Tutorial

 I have listed all the necessary commands of Docker below. In case if any is missing or if any improvement required, please share in comment...