C
CodeImp
A simple app I quickly wrote to try getting info from a database. Here
is the first part of its code. The rest of the code is irellevant.
using System;
using System.Data;
using System.Data.SqlClient;
using System.Threading;
namespace TestSQL
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
// Make SQL connection
Console.WriteLine("Connecting to SQL database
server...");
SqlConnection conn = new SqlConnection("CONNECT TIMEOUT=2;
SERVER=localhost; DATABASE=doomconnector; USER ID=codeimp;
PASSWORD=#########; ENCRYPT=false; POOLING=false;");
try { conn.Open(); }
catch(SqlException e)
{
Console.WriteLine("ERROR " + e.Number + ":
" + e.Message);
}
...
The output of this code:[quote:5608abe1e3]Connecting to SQL database
server...
ERROR 11: General network error. Check your network
documentation.[/quote:5608abe1e3]
Im using Windows 2000 Pro (completely up-to-date according to
www.windowsupdate.com).
I have installed the MySQL windows server on localhost and changed the
passwords as well as creating that "codeimp" account with all
privileges. I can login to that using the mysql console application
and perform operations without problems.
I have installed MDAC 2.8, no problems.
Using the Data Sources (ODBC) from the control panel, I am unable to
add a User DSN with the same settings (gives me the same error). I
have tried many different settings down to the most stupid things
like trying 127.0.0.1 instead of 'localhost', but nothing got any
better.
My network is fine and its on localhost so that shouldnt matter.
TCP/IP protocols installed and work fine as you can see, because I
can make this post.
I read some KB articles that talk about errors with this description
but they did not apply to my problem here.
What could this be? What should I do now? Help me please
is the first part of its code. The rest of the code is irellevant.
using System;
using System.Data;
using System.Data.SqlClient;
using System.Threading;
namespace TestSQL
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
// Make SQL connection
Console.WriteLine("Connecting to SQL database
server...");
SqlConnection conn = new SqlConnection("CONNECT TIMEOUT=2;
SERVER=localhost; DATABASE=doomconnector; USER ID=codeimp;
PASSWORD=#########; ENCRYPT=false; POOLING=false;");
try { conn.Open(); }
catch(SqlException e)
{
Console.WriteLine("ERROR " + e.Number + ":
" + e.Message);
}
...
The output of this code:[quote:5608abe1e3]Connecting to SQL database
server...
ERROR 11: General network error. Check your network
documentation.[/quote:5608abe1e3]
Im using Windows 2000 Pro (completely up-to-date according to
www.windowsupdate.com).
I have installed the MySQL windows server on localhost and changed the
passwords as well as creating that "codeimp" account with all
privileges. I can login to that using the mysql console application
and perform operations without problems.
I have installed MDAC 2.8, no problems.
Using the Data Sources (ODBC) from the control panel, I am unable to
add a User DSN with the same settings (gives me the same error). I
have tried many different settings down to the most stupid things
like trying 127.0.0.1 instead of 'localhost', but nothing got any
better.
My network is fine and its on localhost so that shouldnt matter.
TCP/IP protocols installed and work fine as you can see, because I
can make this post.
I read some KB articles that talk about errors with this description
but they did not apply to my problem here.
What could this be? What should I do now? Help me please
