Sql Connetion

Nov 29, 2007

Hello

i am portuguese and my english is not good...sorry


1 - The connection to the northwinds database on my computer(visual 2005) is good and i use this code:
<add name="northwindsConnectionString1" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|
orthwinds.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>


2 - i have attached that northwinds database to my remot server and i can acess it from control panel...at the control panel, they say The code for the  connetion is:     Provider=sqloledb;Data Source=sql349.mysite4now.com,1433;Initial Catalog=northwinds;User Id=id?????;Password=pass????????;

the path at the remote server is -----------Northwind ------- Filename : C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData
orthwinds.mdf


3 - After attached the db, i want to run my local application on the remote server and access to teh mdf.Is this code good for connection to webaplication northwinds in your server?

<connectionStrings>
<add name="ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=sql349.mysite4now.com,1433;Initial Catalog=northwinds;User Id=id?????;Password=pass?????;" providerName="System.Data.OleDb" />
</connectionStrings>



Cumprimentos aquiles boiƧa

View 1 Replies


ADVERTISEMENT

Remote Connetion Problem

Oct 2, 2006

I developed a VB 2005 application that uses sql express for data.

I have a win xp pro box set up as a server with sql express installed. I enabled remote connections etc.... 

My laptop has the application (but not sql express) and the laptop is using a cat 5 cable connecto to the router of the server box.

When I run my application and log in from the laptop, the connection  string works fine ..

con.ConnectionString = "Data Source=" & logServer.Text & ";Initial Catalog=" & logDatabase.Text & ";User ID=" & logUsername.Text & ";Password=" & logPassword.Text



and I connect to the server box sql express and all the funtions work on my aplication. I see all the data.

Also when I use the wireless connection all is ok.

I brought my laptop to a friend and connected it via cat 5 to his router. The connection was good because I was able to get on the web. Then I tried logging in as usual with my application into the server, but I got an error:
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.
 


Let me just add that I do have McAfee firewall set up on the server box and I have it set to allow sqlexpress. It's set up as a Home Network. I'm not sure if this can be the problem.
 
I'm not sure what the problem can be. Can anyone help me out?
 
Thanks

View 3 Replies View Related

Connetion Fails Suddenly

Apr 9, 2008

I've had this connection used for months and months. The setupQL Express + VS2008. In that particular app I use only one DB Connection but there are about 10 other Sql Server Dbs that I connect to in other apps.

I am still in a development stage.

Today I've decided to connect also via the Server Explorer in VS2008. All connections were established easy. Immediately after that a connection.Open ( ) statement failed with the error message

System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.

At the Open statement I did a break and with Ctrl + Alt + E got all exceptions. They are too numerous to show in here. One of the messages I found was that the failure occured in System.dll.

Any ideas as to why it happened?

I disconnected (deleted) the DB in question--no change. I deleted ALL DB connections from the server explorer in VS2008 - no change. I see the only option now and that is to reinstall the VS2008. I am kind of sick and tired of doing it.

Also I've been trying to move on to Linq and it is my understanding that in order to do Linq I have to establish connections via VS2008 not just connection strings. Is it right? Perhaps I am mistaken?

This particular connection is not that crutial. I can survice without it with this app but for others it would be impossible to continue development.

Any help will be appreciated.

Thanks.

P.S.

Some additional information has transpired. I checked Sql Server Object Explorer and immediately determined that the DB in question lost ALL its tables. There was just an empty shell: the name, no tables, no system tables, no Programmability, nothing.

I "deleted" this DB and reconnected it. The connection with my app miraculously restored itself. Now I could run the app with no problem and the connection to this DB could be Opened in the app. However, when I tried to set up the connection again in the Server Explorer of VS2008 the same thing promptly happened. Now I got this exception back.

It is not the way VS2005 behaved. Is it normal?

Thanks.

View 39 Replies View Related

Auto Database Connetion When SQL Server Restarted In VC++

Mar 7, 2007

How can I connect database automatically when SQL server gets restarted while VC application execution. Any suggestions....

Regards
Sabitha

View 2 Replies View Related

Hardware Requairment For 1200 Concurrent Connetion

May 14, 2008

Hi,

Is any knows what will be the possible hardware requaired for the sql2005server which support 1200 concurrent connection


--Santhosh

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved