Showing posts with label base. Show all posts
Showing posts with label base. Show all posts

Sunday, March 25, 2012

Connecting to SQL Failed

I am trying to connect to SQL following the directions in Learn ASP.NET in 24 hours I am on page 332-334 where i try to create a Data base for the first time.

I am using a localhost configuration.

I get the following message

"Unable to connect to database server.

SQL does not exist or access denied.

ConnectionOpen(Connect())"

However I see that SQL server(SQLEXPRESS) and SQL server browser are both running and their start state is automatic

Hi,

You can reach SQLEXPRESS instance as ComputerName\SQLExpress

Connecting to SQL Data Base with ADODB

Hi I need help regarding ADODB Connection that i have used in connecting database in my web application, do tell me is this connection type is ok? or I need to switch to ADO.NET Connection.

Hi There,

Of course you still can use ADODB, below is some example:

http://www.dotnetcoders.com/web/Articles/ShowArticle.aspx?article=54

http://www.vbdotnetheaven.com/UploadFile/ptailor/ADODBServices04082005081324AM/ADODBServices.aspx

Having said that, i long run, you should migrate to ADO.net. ;) Good luck!

Friday, February 17, 2012

Connected users

does anybody know how I get to obtain the number or connected users' list in
a base SQL Server for license control?
In Access I get through the function LDBUser_GetUsers of msldbusr.dll.
Thank you.Try sp_who.
All of the SPIDS below 20, I believe, are system and not counted as "users"
"Frank Dulk" <fdulk@.bol.com.br> wrote in message
news:u3n9TfncDHA.3708@.tk2msftngp13.phx.gbl...
>
> does anybody know how I get to obtain the number or connected users' list
in
> a base SQL Server for license control?
> In Access I get through the function LDBUser_GetUsers of msldbusr.dll.
> Thank you.
>|||In SQL2K spids 1-50 are reserved for internal use
--
Ray Higdon MCSE, MCDBA, CCNA
--
"Morgan" <mfears@.spamcop.net> wrote in message
news:OZ0TLzncDHA.2308@.TK2MSFTNGP12.phx.gbl...
> Try sp_who.
> All of the SPIDS below 20, I believe, are system and not counted as
"users"
> "Frank Dulk" <fdulk@.bol.com.br> wrote in message
> news:u3n9TfncDHA.3708@.tk2msftngp13.phx.gbl...
> >
> >
> >
> > does anybody know how I get to obtain the number or connected users'
list
> in
> > a base SQL Server for license control?
> >
> > In Access I get through the function LDBUser_GetUsers of msldbusr.dll.
> >
> > Thank you.
> >
> >
>|||Thanks for the clarification, Ray. Much appreciated.
"Ray Higdon" <rayhigdon@.higdonconsulting.com> wrote in message
news:ukjY87ncDHA.2112@.TK2MSFTNGP10.phx.gbl...
> In SQL2K spids 1-50 are reserved for internal use
> --
> Ray Higdon MCSE, MCDBA, CCNA
> --
> "Morgan" <mfears@.spamcop.net> wrote in message
> news:OZ0TLzncDHA.2308@.TK2MSFTNGP12.phx.gbl...
> > Try sp_who.
> >
> > All of the SPIDS below 20, I believe, are system and not counted as
> "users"
> >
> > "Frank Dulk" <fdulk@.bol.com.br> wrote in message
> > news:u3n9TfncDHA.3708@.tk2msftngp13.phx.gbl...
> > >
> > >
> > >
> > > does anybody know how I get to obtain the number or connected users'
> list
> > in
> > > a base SQL Server for license control?
> > >
> > > In Access I get through the function LDBUser_GetUsers of msldbusr.dll.
> > >
> > > Thank you.
> > >
> > >
> >
> >
>

Sunday, February 12, 2012

connect to sql server from other computer

hi

i have 2 computers named pc1 , pc2 .

i have lan connect between this computers.

in pc1 i have server named center , in this server data base named library.

how i can connect to this database from pc2 .

note: i am working with visual basic 2005 .

please help me ,

Do you get any exception ? You just have to setup a sqlconnection via .NET and connect to the server, the simplest statement would be in C# something like:

new SqlConnection("Data Source=YourServerName;Initial catalog=library").Open()

The conenction string uses integrated authentication, I don′t know if that applies to you.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

are you programming a windows application

or ASp.net?

|||thanks alot .|||i am using windows application|||

Are these two servers in the same domain? If not, you'd better first configure the authentication mode of the SQL Server to Mixed Authentication and change the password of the sa account, which by default is blank.

After this, you can specify a connection string for the SqlConnection class in VB.NET, specifying the machine name of the sql and username and password. After this, you should be able to connect to the remote server. It is not much different from connecting to a local sql.

|||

thanks for reply .

best regards