Unable to Connect To Sql Server 2000 using .NET 2005 EXPRESS

dotnet framework

    Next

  • 1. When comes time to save to multiple table handling many relations...
    Hi, We are working at building a web application using a SQL server database. This DB already contains many tables and many relations ( "one to many" and "many to many"). How should I develop the "write to database" layer in order to make it handle many tables with many relations from the .NET code ? And if possible, in an abstract way. I'm sure that many already did the same, I just don't want to rebuild the wheel. Do you have any idea or link to look at? Thank you! Regards, Marty
  • 2. why different syntaxes in Commnad lines?
    Hi, I saw three different syntaxes in command lines: UpdateCommand="UPDATE [mytable] SET [name] = @name ... UpdateCommand="Update `mytable` set `name`=? ... UpdateCommand="UPDATE [mytable] SET [name] = ? ... Does the three do the same? Why those differences? Thanks Phil
  • 3. OleDbCommand.Parameters.Add and 'IN' Comparator and MSAccess
    I am using Visual Studio with a MS Access Database I just can not work out how to create my parameter for the following Select Fld1, Fld2 from myTable where Fld1 in (?) The value I wish to add to the parameter collection for Fld1 is '2, 3, 17, 9, 235' to add a single Parameter I would do the following cmd.parameters.add("",oledbtype.integer).value = 1 There does not seem to be an OleDbType for an integer array But I don't have a single value and I do not know how many values, there will be in the 'IN' query I also have other parameters in the Selection (not shown) and as OleDbParameters, seem to be positional, with no way of changing that, I can't just enter many '?' into the 'IN' part and only enter as many as I need. In any case what would happen if I had multiple 'IN' comparators. Any ideas or suggestions, welcomed

Unable to Connect To Sql Server 2000 using .NET 2005 EXPRESS

Postby VGVycmFuY2U » Sat, 28 Apr 2007 00:14:04 GMT

Can anyone help me with an issue. I have a .net app that tries to connect to 
my sql server here on my laptop on my company's network. When I have someone 
on the network try the app they get the following message in the errorlog:
*Timeout expired.  The timeout period elapsed prior to completion of the 
operation or the server is not responding*

I tried connecting through IP and machine name but no success. My Sql Server 
agent and Sql Server is running. I can access the data fine locally of 
course. Here is the connection string:

private string connstring = "pwd=<password>;uid=<username>;" +
            "database=projectMgr;server=<machinename>";

Here is what I'm using when the user tries to login:

  cmd.CommandType = CommandType.Text;
                cmd.Connection = sconn;
                cmd.CommandText = "SELECT username, upassword, rights FROM " +
                    "usertable WHERE username = @username AND upassword = 
@upassword";
                cmd.CommandTimeout = 30000;
            
                SqlParameter sparam = new SqlParameter(); 
                sparam = cmd.Parameters.AddWithValue("@username", user);
                sparam.DbType = DbType.String;
                sparam.Direction = ParameterDirection.Input;

                sparam = cmd.Parameters.AddWithValue("@upassword", upassword);
                sparam.DbType = DbType.String;
                sparam.Direction = ParameterDirection.Input;
                sconn.Open();
 
                mAdapter.SelectCommand = cmd;
                mAdapter.Fill(myDataTable);

                if (myDataTable.Rows.Count > 0)
                {
                    mFlag = true;
                    appObject.uClass.urights = 
myDataTable.Rows[0]["rights"].ToString();
                }
                else
                {
                    mFlag = false;
                }

I using the timeout method but it's not helping.
-- 
TC

Re: Unable to Connect To Sql Server 2000 using .NET 2005 EXPRESS

Postby RobinS » Sat, 28 Apr 2007 12:37:18 GMT

Check www.connectionstrings.com and see if your connection string is valid.

Robin S.
--------------------







Re: Unable to Connect To Sql Server 2000 using .NET 2005 EXPRESS

Postby VGVycmFuY2U » Sat, 28 Apr 2007 20:16:02 GMT

Thanks for the reply. I found out that the problem was Microsoft Firewall was 
blocking port 1433 which is the default port that SQL SERVER uses. When I 
placed this exception in my firewall other indivduals were able to access my 
records.

Thanks all.
-- 
TC









Similar Threads:

1.SQL Server 2005 Express Beta messes up your SQL Server 2000, B

Does any one know why SQL 2005 is coming withouy any UI?
when is the UI going ot be released? What is the purpose of this BETA
without UI? i understand that u can get Data Explorer from Studio 2005.
Is it also available with 2005 Express Edition?



"Samuel L Matzen" wrote:

> ik,
> 
> whew, such passion.
> 
> -Sam Matzen
> 
> 
> "ik" < XXXX@XXXXX.COM > wrote in message
> news:% XXXX@XXXXX.COM ...
> > First off, MICROSOFT, doesn't listen you and there is definite proof of
> that
> > over and over again.
> >
> > To even think that a README and a BETA disclaimer allows you to put
> > something out that they should have already tested on their owe in house
> > server shows how out of touch your are with the real world.
> >
> > When you put out a BETA, why not test it on lots and lots other microsoft
> > computers first.  I got these bugs immediately...there are so many bugs,
> but
> > to screw up SQL Server 2000 on the same machine, COME ON?
> >
> > Of course it's on the development machine!!  I am not going to dedicate an
> > entire computer to testing a beta, NITWIT!!!
> >
> > I am also smart enough to NOT put it on production, BUT OF COURSE, you,
> MR.
> > MVP, know all about production, RIGHT?  WRONG, YOU DON'T know anything
> about
> > production because if your are an MVP because you can't be in two places
> at
> > the same time and since you spend all you time answering the same
> questions
> > over and over again, you can't actually be doing REAL WORK, nitwit.....
> >
> >
> >
> >
> >
> >
> > "Cowboy (Gregory A. Beamer) [MVP]" < XXXX@XXXXX.COM >
> wrote
> > in message news: XXXX@XXXXX.COM ...
> > > You seem to have a problem with playing around with beta software on
> > > machines that you cannot afford to have problems with, as this is the
> > second
> > > set of threads where you have LOUDLY complained about how dumb Microsoft
> > is.
> > > IMO, installing betaware (from anyone) on a production machine is a very
> > > ignorant and/or stupid maneuver.
> > >
> > > As we are a group that is horrible at reading readme files, where it
> tells
> > > you not to install betas on production machines, the first time is
> > > understandable. We pull out our media and get going. IN all fairness to
> > the
> > > manufacturer, we realize it was our mistake and move on. You seem to
> have
> > a
> > > problem with the idea that you could be at fault one iota.
> > >
> > > It is a great service, for me, to have access to products before
> release.
> > It
> > > helps me stay ahead of the crowd when the final release is out. But, if
> I
> > > were Microsoft, I would consider stopping the public betas, largely
> > because
> > > of people who complain when a public beta is released.
> > >
> > > -- 
> > > Gregory A. Beamer
> > > MVP; MCP: +I, SE, SD, DBA
> > >
> > > ************************************************
> > > Think Outside the Box!
> > > ************************************************
> > > "ik" < XXXX@XXXXX.COM > wrote in message
> > > news: XXXX@XXXXX.COM ...
> > > > ERROR after uninstalling SQL Server 2005 Express
> > > >
> > > > I get this message,
> > > >
> > > > SQLDMO has not been registered. Please re-run your setupand contact
> your
> > > > system administrator.
> > > >
> > > > GREAT!!! ReInstalled SQL SERVER 2000 after playing around with SQL
> > Server
> > > > 2005...
> > > >
> > > > Snap In Failed to Initialize,
> > > > Name: Sql SErver Enterprise Manager
> > > > CSLID: (00100100-1816-11D0-8EF5-00AA0062C58F)
> > > >
> > > >
> > > >
> > > > THIS IS NOT BETA, this ALPHA!!!
> > > >
> > > >
> > > > Year 2006 here we come.....
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
> 
> 
> 

2.SQL Server 2005 Express Beta messes up your SQL Server 2000, BEWARE

ERROR after uninstalling SQL Server 2005 Express

I get this message,

SQLDMO has not been registered. Please re-run your setupand contact your
system administrator.

GREAT!!! ReInstalled SQL SERVER 2000 after playing around with SQL Server
2005...

Snap In Failed to Initialize,
Name: Sql SErver Enterprise Manager
CSLID: (00100100-1816-11D0-8EF5-00AA0062C58F)



THIS IS NOT BETA, this ALPHA!!!


Year 2006 here we come.....






Return to dotnet framework

 

Who is online

Users browsing this forum: No registered users and 65 guest