<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/1.5.1-alpha" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: General network error. Check your network documentation</title>
	<link>http://parmeshwar.blogsome.com/2005/10/06/general-network-error-check-your-network-documentation/</link>
	<description>Parmeshwar's Home</description>
	<pubDate>Wed, 09 Dec 2009 12:16:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.1-alpha</generator>

	<item>
		<title>by: Barretto VN</title>
		<link>http://parmeshwar.blogsome.com/2005/10/06/general-network-error-check-your-network-documentation/#comment-18</link>
		<pubDate>Sun, 15 Jul 2007 14:53:11 +0100</pubDate>
		<guid>http://parmeshwar.blogsome.com/2005/10/06/general-network-error-check-your-network-documentation/#comment-18</guid>
					<description>
&quot;General Network error ..........&quot;

This error message really got me worked, but fortunately i was able to find the reason.

To replicate the error you need to have SQL Server Management Studio (2005) may be with SQL Server 2000 it is Enterprise Manager, but not MSDE.

You may create a small VB.NET app using the following code


Dim conn as SqlConnection
Dim cmd as SqlCommand

' Remember to change values between [] 

Try
    conn = New SqlConnection(&quot;Data Source=&quot; + [Your Server Name] + &quot;;Integrated Security=false; User ID=&quot; + [Your User Name] + &quot;;Password=&quot; + &quot;Your Password&quot; + &quot;;&quot;)
    conn.Open()
    cmd = New SqlCommand
    cmd.Connection = conn
    cmd.CommandText = &quot;CREATE DATABASE [aftermarket]&quot;
    cmd.ExecuteNonQuery()
 Catch ex As SqlException
    Console.WriteLine(ex.Message)
    ' OR following if under Winforms
    MessageBox.Show(ex.Message)
 Finally
    conn.Close()
 End Try


OR

You may create a small C# app using the following code

SqlConnection conn;
SqlCommand cmd ;

try
{
    // Remember to change values between [] 
    conn = new SqlConnection(&quot;Data Source=&quot; + [Your Server Name] + &quot;;Integrated Security=false; User ID=&quot; + [Your User Name] + &quot;;Password=&quot; + &quot;Your Password&quot; + &quot;;&quot;);
    conn.Open();
    cmd = new SqlCommand();
    cmd.Connection = conn;
    cmd.CommandText = &quot;CREATE DATABASE [MyDatabase]&quot;;
    cmd.ExecuteNonQuery();
}
catch (SqlException ex)
{
    Console.WriteLine(ex.Message);
    // OR following if under Winforms
    MessageBox.Show(ex.Message);
}
finally
{
    conn.Close();
}


Compile and run the app, hopefully a Database named &quot;MyDatabase&quot; will be created

Now start SQL Server Management Studio (for 2005) or Enterprise Manager (for 2000) and delete the Database just created, now run the app created earlier, you might get the dreaded error message, try to run the app atleast 3 times you will get the same error message.

Now question is , how do i correct the problem, simple - Reboot the system and try running the app again.

Indeed a painful way of overcomming an error message.

This error message ONLY show up when you have, and has no connection with the Timeout property.

Integrated Security=false
User ID=[Your User Name]
Password=[Your Password]

Note: This is Microsofts general-purpose error message and this solution may not work in all cases.

Barretto


</description>
		<content:encoded><![CDATA[	<p>&#8220;General Network error &#8230;&#8230;&#8230;.&#8221;</p>
	<p>This error message really got me worked, but fortunately i was able to find the reason.</p>
	<p>To replicate the error you need to have SQL Server Management Studio (2005) may be with SQL Server 2000 it is Enterprise Manager, but not MSDE.</p>
	<p>You may create a small VB.NET app using the following code</p>
	<p>Dim conn as SqlConnection<br />
Dim cmd as SqlCommand</p>
	<p>&#8216; Remember to change values between [] </p>
	<p>Try<br />
    conn = New SqlConnection(&#8221;Data Source=&#8221; + [Your Server Name] + &#8220;;Integrated Security=false; User ID=&#8221; + [Your User Name] + &#8220;;Password=&#8221; + &#8220;Your Password&#8221; + &#8220;;&#8221;)<br />
    conn.Open()<br />
    cmd = New SqlCommand<br />
    cmd.Connection = conn<br />
    cmd.CommandText = &#8220;CREATE DATABASE [aftermarket]&#8221;<br />
    cmd.ExecuteNonQuery()<br />
 Catch ex As SqlException<br />
    Console.WriteLine(ex.Message)<br />
    &#8216; OR following if under Winforms<br />
    MessageBox.Show(ex.Message)<br />
 Finally<br />
    conn.Close()<br />
 End Try</p>
	<p>OR</p>
	<p>You may create a small C# app using the following code</p>
	<p>SqlConnection conn;<br />
SqlCommand cmd ;</p>
	<p>try<br />
{<br />
    // Remember to change values between []<br />
    conn = new SqlConnection(&#8221;Data Source=&#8221; + [Your Server Name] + &#8220;;Integrated Security=false; User ID=&#8221; + [Your User Name] + &#8220;;Password=&#8221; + &#8220;Your Password&#8221; + &#8220;;&#8221;);<br />
    conn.Open();<br />
    cmd = new SqlCommand();<br />
    cmd.Connection = conn;<br />
    cmd.CommandText = &#8220;CREATE DATABASE [MyDatabase]&#8221;;<br />
    cmd.ExecuteNonQuery();<br />
}<br />
catch (SqlException ex)<br />
{<br />
    Console.WriteLine(ex.Message);<br />
    // OR following if under Winforms<br />
    MessageBox.Show(ex.Message);<br />
}<br />
finally<br />
{<br />
    conn.Close();<br />
}</p>
	<p>Compile and run the app, hopefully a Database named &#8220;MyDatabase&#8221; will be created</p>
	<p>Now start SQL Server Management Studio (for 2005) or Enterprise Manager (for 2000) and delete the Database just created, now run the app created earlier, you might get the dreaded error message, try to run the app atleast 3 times you will get the same error message.</p>
	<p>Now question is , how do i correct the problem, simple - Reboot the system and try running the app again.</p>
	<p>Indeed a painful way of overcomming an error message.</p>
	<p>This error message ONLY show up when you have, and has no connection with the Timeout property.</p>
	<p>Integrated Security=false<br />
User ID=[Your User Name]<br />
Password=[Your Password]</p>
	<p>Note: This is Microsofts general-purpose error message and this solution may not work in all cases.</p>
	<p>Barretto</p>
]]></content:encoded>
				</item>
</channel>
</rss>
