Showing posts with label sqlexpress. Show all posts
Showing posts with label sqlexpress. Show all posts

Tuesday, March 20, 2012

connections remote SQLExpress

how I can connect remotely to SQLExpress?.. I have enabled TCP/IP, but it
does not work.
error:
...
When connecting to SQL server 2005m this failure may be caused by the fact
the under the default settings SQL server does not allow remote
connections (provider SQL Network Interfaces, error 26 error, locating
server/instance specified).
.....
...
thanksYou need to run the Surface Area Configuration tool and enable Remote
connections.
Andrew J. Kelly SQL MVP
"EWAT" <eabarca@.medinet-igd.com> wrote in message
news:OM3KqItBGHA.2920@.tk2msftngp13.phx.gbl...
> how I can connect remotely to SQLExpress?.. I have enabled TCP/IP, but it
> does not work.
>
> error:
> ...
> When connecting to SQL server 2005m this failure may be caused by the
> fact the under the default settings SQL server does not allow remote
> connections (provider SQL Network Interfaces, error 26 error, locating
> server/instance specified).
> .....
> ...
> thanks
>|||Since SQL Express installs with a named instance, you also need to enable
and start the SQLBROWSER service.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23j1qbavBGHA.1180@.TK2MSFTNGP09.phx.gbl...
> You need to run the Surface Area Configuration tool and enable Remote
> connections.
> --
> Andrew J. Kelly SQL MVP
>
> "EWAT" <eabarca@.medinet-igd.com> wrote in message
> news:OM3KqItBGHA.2920@.tk2msftngp13.phx.gbl...
>sqlsql

connections remote SQLExpress

how I can connect remotely to SQLExpress?.. I have enabled TCP/IP, but it
does not work.
error:
....
When connecting to SQL server 2005m this failure may be caused by the fact
the under the default settings SQL server does not allow remote
connections (provider SQL Network Interfaces, error 26 error, locating
server/instance specified).
......
...
thanks
You need to run the Surface Area Configuration tool and enable Remote
connections.
Andrew J. Kelly SQL MVP
"EWAT" <eabarca@.medinet-igd.com> wrote in message
news:OM3KqItBGHA.2920@.tk2msftngp13.phx.gbl...
> how I can connect remotely to SQLExpress?.. I have enabled TCP/IP, but it
> does not work.
>
> error:
> ...
> When connecting to SQL server 2005m this failure may be caused by the
> fact the under the default settings SQL server does not allow remote
> connections (provider SQL Network Interfaces, error 26 error, locating
> server/instance specified).
> .....
> ...
> thanks
>
|||Since SQL Express installs with a named instance, you also need to enable
and start the SQLBROWSER service.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23j1qbavBGHA.1180@.TK2MSFTNGP09.phx.gbl...
> You need to run the Surface Area Configuration tool and enable Remote
> connections.
> --
> Andrew J. Kelly SQL MVP
>
> "EWAT" <eabarca@.medinet-igd.com> wrote in message
> news:OM3KqItBGHA.2920@.tk2msftngp13.phx.gbl...
>

connections remote SQLExpress

how I can connect remotely to SQLExpress?.. I have enabled TCP/IP, but it
does not work.
error:
...
When connecting to SQL server 2005m this failure may be caused by the fact
the under the default settings SQL server does not allow remote
connections (provider SQL Network Interfaces, error 26 error, locating
server/instance specified).
.....
...
thanksYou need to run the Surface Area Configuration tool and enable Remote
connections.
Andrew J. Kelly SQL MVP
"EWAT" <eabarca@.medinet-igd.com> wrote in message
news:OM3KqItBGHA.2920@.tk2msftngp13.phx.gbl...
> how I can connect remotely to SQLExpress?.. I have enabled TCP/IP, but it
> does not work.
>
> error:
> ...
> When connecting to SQL server 2005m this failure may be caused by the
> fact the under the default settings SQL server does not allow remote
> connections (provider SQL Network Interfaces, error 26 error, locating
> server/instance specified).
> .....
> ...
> thanks
>|||Since SQL Express installs with a named instance, you also need to enable
and start the SQLBROWSER service.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23j1qbavBGHA.1180@.TK2MSFTNGP09.phx.gbl...
> You need to run the Surface Area Configuration tool and enable Remote
> connections.
> --
> Andrew J. Kelly SQL MVP
>
> "EWAT" <eabarca@.medinet-igd.com> wrote in message
> news:OM3KqItBGHA.2920@.tk2msftngp13.phx.gbl...
>

connections remote SQLExpress

how I can connect remotely to SQLExpress?.. I have enabled TCP/IP, but it
does not work.
error:
....
When connecting to SQL server 2005m this failure may be caused by the fact
the under the default settings SQL server does not allow remote
connections (provider SQL Network Interfaces, error 26 error, locating
server/instance specified).
......
...
thanks
You need to run the Surface Area Configuration tool and enable Remote
connections.
Andrew J. Kelly SQL MVP
"EWAT" <eabarca@.medinet-igd.com> wrote in message
news:OM3KqItBGHA.2920@.tk2msftngp13.phx.gbl...
> how I can connect remotely to SQLExpress?.. I have enabled TCP/IP, but it
> does not work.
>
> error:
> ...
> When connecting to SQL server 2005m this failure may be caused by the
> fact the under the default settings SQL server does not allow remote
> connections (provider SQL Network Interfaces, error 26 error, locating
> server/instance specified).
> .....
> ...
> thanks
>
|||Since SQL Express installs with a named instance, you also need to enable
and start the SQLBROWSER service.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23j1qbavBGHA.1180@.TK2MSFTNGP09.phx.gbl...
> You need to run the Surface Area Configuration tool and enable Remote
> connections.
> --
> Andrew J. Kelly SQL MVP
>
> "EWAT" <eabarca@.medinet-igd.com> wrote in message
> news:OM3KqItBGHA.2920@.tk2msftngp13.phx.gbl...
>

connections remote SQLExpress

how I can connect remotely to SQLExpress?.. I have enabled TCP/IP, but it
does not work.
error:
...
When connecting to SQL server 2005m this failure may be caused by the fact
the under the default settings SQL server does not allow remote
connections (provider SQL Network Interfaces, error 26 error, locating
server/instance specified).
.....
...
thanksYou need to run the Surface Area Configuration tool and enable Remote
connections.
--
Andrew J. Kelly SQL MVP
"EWAT" <eabarca@.medinet-igd.com> wrote in message
news:OM3KqItBGHA.2920@.tk2msftngp13.phx.gbl...
> how I can connect remotely to SQLExpress?.. I have enabled TCP/IP, but it
> does not work.
>
> error:
> ...
> When connecting to SQL server 2005m this failure may be caused by the
> fact the under the default settings SQL server does not allow remote
> connections (provider SQL Network Interfaces, error 26 error, locating
> server/instance specified).
> .....
> ...
> thanks
>|||Since SQL Express installs with a named instance, you also need to enable
and start the SQLBROWSER service.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23j1qbavBGHA.1180@.TK2MSFTNGP09.phx.gbl...
> You need to run the Surface Area Configuration tool and enable Remote
> connections.
> --
> Andrew J. Kelly SQL MVP
>
> "EWAT" <eabarca@.medinet-igd.com> wrote in message
> news:OM3KqItBGHA.2920@.tk2msftngp13.phx.gbl...
>> how I can connect remotely to SQLExpress?.. I have enabled TCP/IP, but
>> it does not work.
>>
>> error:
>> ...
>> When connecting to SQL server 2005m this failure may be caused by the
>> fact the under the default settings SQL server does not allow remote
>> connections (provider SQL Network Interfaces, error 26 error, locating
>> server/instance specified).
>> .....
>> ...
>> thanks
>

Saturday, February 25, 2012

connection strings

This is probably a very basic question and I apologise for asking. Can an app developed with VWD using SQLexpress be used with server2000? if so how do I modify the connection string.

hi,

a long as no particular keywords for SQL Server 2005 are used (say, the unsupported "MARS_Connection=yes;", and the like), the connection string is quite similar.. please have a look at http://www.connectionstrings.com/ for samples..

regards

|||Also have a look at the driver, if you install the application on a non SQL System, the SNAC will probably not exist. YOu will either have to ship it within your application, or use a MADC driver which is installed on the most systems.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Sunday, February 19, 2012

connection string error

OK - I have seen lots posted on this, but the behavior is very strange, and I am trying to understand:

I am using Visual Basic 2003 with SQLEXPRESS 2005 to connect to a database and to develop a desktop application. My connection string is:

Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
Directory.GetCurrentDirectory & "\CWW.mdf;" & _
"Trusted_Connection=Yes;"
I get the following error:

"An attempt to attach an auto-named database for file C:\Documents and Settings\Brian\My Documents\Compressor Program Development\bin\CWW.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

However, if I copy the database to anywhere else on the "c:\" drive, the connection works, as in the following:

Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
"C:\temp\CWW.mdf;" & _
"Trusted_Connection=Yes;"

What I have found is that ist works everywhere on my computer except in the following location:

"c:\documents and settings\Brian", which includes My Documents, Desktop folders.

Why is this?

Any help would be great - I can work around this by moving my development folder to the "c:\" drive. Since my ultimate application directory will be the "Program Files" directory I should be fine.

hi,

bridress wrote:

Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
Directory.GetCurrentDirectory & "\CWW.mdf;" & _
"Trusted_Connection=Yes;"

did you try "AttachDbFilename=|DataDirectory|\CWW.mdf;" ?

regards

|||Thanks for the response -

Yes I did - I even tried the following to shift the default DataDirectory:

AppDomain.CurrentDomain.SetData("DataDirectory", Directory.GetCurrentDirectory)

Proj_ConnStr="DataSource=.\SQLExpress;AttachDbFilename=|DataDirectory|\CWW.mdf; _ Trusted_Connection=Yes;"

I still had no success. It seems I should be able to put the db file in any directory I choose and not be restricted like this?

|||

hi,

please verify the Windows account running the SQLExpress is granted enought NTFS permissions on the specified path...

regards

|||

The first time you run your code it attaches the database and used the path provided as the Name of the database. You will get failures in subsequent attempts because the database is already attached unless you have detached the database somewhere else in your code.

AttachDbFilename is mostly useful when working with User Instances, which you're not using, so I'm unclear why your're using this keyword. Why aren't you just attaching your database once and then connecting to it normally?

Mike

connection string error

OK - I have seen lots posted on this, but the behavior is very strange, and I am trying to understand:

I am using Visual Basic 2003 with SQLEXPRESS 2005 to connect to a database and to develop a desktop application. My connection string is:

Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
Directory.GetCurrentDirectory & "\CWW.mdf;" & _
"Trusted_Connection=Yes;"
I get the following error:

"An attempt to attach an auto-named database for file C:\Documents and Settings\Brian\My Documents\Compressor Program Development\bin\CWW.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

However, if I copy the database to anywhere else on the "c:\" drive, the connection works, as in the following:

Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
"C:\temp\CWW.mdf;" & _
"Trusted_Connection=Yes;"

What I have found is that ist works everywhere on my computer except in the following location:

"c:\documents and settings\Brian", which includes My Documents, Desktop folders.

Why is this?

Any help would be great - I can work around this by moving my development folder to the "c:\" drive. Since my ultimate application directory will be the "Program Files" directory I should be fine.

hi,

bridress wrote:

Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
Directory.GetCurrentDirectory & "\CWW.mdf;" & _
"Trusted_Connection=Yes;"

did you try "AttachDbFilename=|DataDirectory|\CWW.mdf;" ?

regards

|||Thanks for the response -

Yes I did - I even tried the following to shift the default DataDirectory:

AppDomain.CurrentDomain.SetData("DataDirectory", Directory.GetCurrentDirectory)

Proj_ConnStr="DataSource=.\SQLExpress;AttachDbFilename=|DataDirectory|\CWW.mdf; _ Trusted_Connection=Yes;"

I still had no success. It seems I should be able to put the db file in any directory I choose and not be restricted like this?

|||

hi,

please verify the Windows account running the SQLExpress is granted enought NTFS permissions on the specified path...

regards

|||

The first time you run your code it attaches the database and used the path provided as the Name of the database. You will get failures in subsequent attempts because the database is already attached unless you have detached the database somewhere else in your code.

AttachDbFilename is mostly useful when working with User Instances, which you're not using, so I'm unclear why your're using this keyword. Why aren't you just attaching your database once and then connecting to it normally?

Mike

Tuesday, February 14, 2012

connection string

I have made an app (the first one) and im trying to find the right connection string to the database. Im using sqlexpress on my local computer, and my host uses MSSQL, can anyone tell me what the connection string could

Checkwww.connectionstrings.com