Let's Share

Cannot connect to database Sql Server

May 16th, 2010 trisnok

I got this error message when I tried to connect to my database using PHP code. My database server is Microsoft SQL Server 2005 and for the PHP, I use XAMPP version 7.2.

After all day long I tried some solution in internet, I got the best one and it worked. So happy happy and I want to share it with you guys. I think this error came because I use XAMPP, so maybe this solution just work if you use the same thing.

Error message : “cannot connect to database….”
Solution          :  ”you have to update your ntwdblib.dll file in C:\xampp\apache\bin”

Steps:

1. Download the new version of ntwdblib.dll, from here

2. Extract and paste the file in this path C:\xampp\apache\bin

3. Restart your apache server

4. Refresh your application

I hope this work on you also. Nice to share happy

Tags: Cannot connect to database, ntwdblib.dll, PHP, sql server 2005, XAMPP

Posted in Troubleshooting | 5 Comments »

Can not show your hidden files or folders?

August 7th, 2009 trisnok

If you can not show your hidden files or folders just try these methods. Hope this can help you happy

Method 1:

Go to registry editor by running regedit in the run box.
Go to this key:
HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer\Advanced
In the right hand area, double click hidden and change the value to 1.

Now you’re all set to go. Check it in your tools menu if the changes have taken effect.

Method 2: (By Random Hajile)

1. Click “Start” -> “Run…” (or press Windows key + R)
2. Type “regedit” and click “Ok”.
3. Find the key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\
Advanced\Folder\Hidden\SHOWALL
4. Look at the “CheckedValue” key… This should be a DWORD key. If it isn’t, delete the key.
5. Create a new key called “CheckedValue” as a DWORD (hexadecimal) with a value of 1.
6. The “Show hidden files & folders” check box should now work normally. Enjoy! :)

//
//

Method 3: (By Denny)

1- Click Start –> Run –> regsvr32 /i browseui.dll –> enter

A confirmation message will appear like given below

2- Click Start –> Run –> regsvr32 /i shell32.dll

Wait for the confirmation and click OK.

regsvr32-shell.dll.pngregsvr32-shell.dll.png

Method 4:

If none of the above methods work, please download our Smart Virus Remover from here:

Show Hidden Files and Folders not working? Smart Virus Remover (544.7 KiB, 308,573 hits)
Using this Virus Remover please restore your Windows settings and your show hidden files and folders will be set to default.

Please spare a few moments from your precious time and tell us about your experiences.

Ok have a nice time happy

taken from this site

Tags: can not show hidden files and folder, hidden files, hidden files or folders, hidden folders, show hidden files or folders not working

Posted in Troubleshooting | 7 Comments »

Error Has Occurred While Establishing A Connection To SQL Server 2005 Which …

February 14th, 2008 trisnok

When connecting to an instance of Microsoft SQL Server 2005 database, including SQL Server 2005 Express, Developer and Enterprise editions, for authentication or accessing and retrieving and updating the data, the the following error message may appear. The problem happens no matter the connection is originated from remote computer or on SQL Server local computer itself, and can be caused by any program, such as SQLCMD utility, used to connect to SQL Server.

Sqlcmd: Error: Microsoft SQL Native Client: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

Or,

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

This problem may occur when SQL Server 2005 is not configured to accept incoming local and remote connections, which is disabled by default in SQL Server 2005 Express Edition, SQL Server 2005 Developer Edition and also SQL Server 2005 Enterprise Edition. To solve the connection forbidden problem, SQL Server 2005 needs to configure to allow incoming local and remote connections.

Firstly, ensure that SQL Server 2005 is configured properly to allow incoming connections on the instance of database server, else enable and turn on the local and remote connections setting.
Click Start button, then go to Programs or All Programs, then select Microsoft SQL Server 2005, followed by Configuration Tools. Click and run the SQL Server Surface Area Configuration.
On the “SQL Server 2005 Surface Area Configuration” page, click Surface Area Configuration for Services and Connections.
On the “Surface Area Configuration for Services and Connections” page, expand Database Engine tree, click Remote Connections.
Select Local and remote connections, or Local connections only which applicable only if there is no remote system tries to connect to the SQL Server, useful when you just trying to connect and authenticate with the server after installing.
Select the appropriate protocol to enable to local and/or remote connections environment. To ensure maximum compatibility, select Using both TCP/IP and named pipes.
Click Apply button when done.
Click OK button when prompted with the message saying that “Changes to Connection Settings will not take effect until you restart the Database Engine service.”
On the “Surface Area Configuration for Services and Connections” page, expand Database Engine, then click Service.
Click Stop button to stop the SQL Server service.
Wait until the MSSQLSERVER service stops, and then click Start button to restart the MSSQLSERVER service.

Secondly, SQL Server Browser service has to be enabled to allow for local and remote connections if SQL Server 2005 is running by using an instance name and users are not using a specific TCP/IP port number in the connection string.
Click Start button, then go to Programs or All Programs, then select Microsoft SQL Server 2005, followed by Configuration Tools. Click and run the SQL Server Surface Area Configuration.
On the “SQL Server 2005 Surface Area Configuration” page, click Surface Area Configuration for Services and Connections.
On the “Surface Area Configuration for Services and Connections” page, click SQL Server Browser.
Select Automatic as the Startup type to start SQL Server Browser service automatically every time system starts.
Click Apply button.
Click on Start button to start the service immediately.
Click OK button.

Finally, if remote computer needs to connect and access SQL Server, an exceptions in Windows Firewall included in Windows XP SP2 (Service Pack 2), Windows Server 2003 and Windows Vista needs to be created. If you’re using third-party firewall system, the exception rules also needed to be created to allow external remote connections to the SQL Server 2005 and SQL Server Browser Service to communicate through the firewall, else connections will be blocked. Consult the firewall manual for more details. Each instance of SQL Server 2005 must have its own exception, together with an exclusion for SQL Server Browser service.

SQL Server 2005 uses an instance ID as part of the path when you install its program files. To create an exception for each instance of SQL Server, you must identify the correct instance ID. To obtain an instance ID, follow these steps:
Click Start button, then go to Programs or All Programs, then select Microsoft SQL Server 2005, followed by Configuration Tools. Click and run the SQL Server Configuration Manager.
In “SQL Server Configuration Manager”, click the SQL Server Browser service in the right pane, right-click the instance name in the main window, and then click Properties.
On the “SQL Server Browser Properties” page, click the Advanced tab, locate the instance ID in the property list.
Click OK button.

Then create an exception for SQL Server 2005 in Windows Firewall.
Click on Start button, the click on Run and type firewall.cpl, and then click OK. For Windows Vista, type firewall.cpl in Start Search box and press Enter key, then click on Allow a program through Windows Firewall link on left tasks pane.
In “Windows Firewall”, click the Exceptions tab, and then click Add Program.
In the “Add a Program” window, click Browse button.
Click the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe executable program, click Open button. MSSQL.1 with is a placeholder for the instance ID that is obtained from previous procedure. Note that the path may be different depending on where SQL Server 2005 is installed.
Click OK button.
Repeat steps 1 through 5 for each instance of SQL Server 2005 that needs an exception.
For SQL Server Browser service, locate the C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe executable program, and click Open button.
Click OK button.

Posted in Troubleshooting | 8 Comments »

  • Hi…

    My name is Eka Trisno Samosir from North Sumatera-Indonesia. Really wanna go to Taizé :) and still learning to be a good blogger.
    Thanks for stopping by!
  • Recent Posts

    • Stuck, have no idea
    • Life is Like a Cup of Coffee
    • Last time with Hernita
    • Eclipse Movie
    • Untitled
  • Categories

    • Movies Review
    • Ms. dotNet
    • My Religious
    • My Story
    • Troubleshooting
  • Twit-twit

    • Blogroll

      • Samosir
    • Frens

      • Ali Syah J. Samosir
      • Dion Barus
      • Irma Sari Barus
      • Nicholas Sihotang
      • Roberto Adiseputra
      • Samson
      • Sanhenra
    • My Community

    • Meta

      • Log in
      • Entries RSS
      • Comments RSS
      • WordPress.org
      • RSS SideNotes
    • Help Me To Taizé

    Let's Share is proudly edited by Eka Trisno Samosir | Bob