473,546 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sql Server connection problem

Hi!
I have some problems with ms sql server database connection. When I
wrote
the following function (in VB):

sub Remplir_Theme()
Dim connectionStrin g As String = "Data Source=.\SQLExp ress;
AttachDbFileNam e=|DataDirector y|\BasedeDonnee s_babySQL.mdf ;Integrated
Security=true; User Instance=true"
Dim sqlCon As new System.Data.Sql Client.SQLConne ction
(connectionStri ng)
sqlCon.open()
Dim cmd as sqlCommand = new sqlCommand ("Select * from
Table_theme;", sqlCon)
end sub
I Had this error (sorry it's in french)

Server Error in '/' Application.

--------------------------------------------------------------------------------

Échec d'une tentative d'attachement d'une base de données nommée
automatiquement pour le fichier
c:\inetpub\wwwr oot\App_Data\Ba sedeDonnees_bab ySQL. Il existe une base
de
données du même nom ou le fichier spécifié ne peut être ouvert ou
il se
trouve sur un partage UNC.

When I created a folder named App_Data. and putting inside my mssql
databse
file, I had this error
Server Error in '/' Application.

--------------------------------------------------------------------------------

Impossible d'ouvrir la nouvelle base de données
'C:\INETPUB\WWW ROOT\APP_DATA\B ASEDEDONNEES_BA BYSQL.MDF'. Abandon de
CREATE
DATABASE.
Échec d'une tentative d'attachement d'une base de données nommée
automatiquement pour le fichier
c:\inetpub\wwwr oot\App_Data\Ba sedeDonnees_bab ySQL.mdf. Il existe une
base de
données du même nom ou le fichier spécifié ne peut être ouvert ou
il se
trouve sur un partage UNC.
Échec de l'activation du fichier. Le nom de fichier physique
'c:\inetpub\www root\App_Data\B asedeDonnees_ba bySQL_log.ldf' est
peut-être
incorrect.
Impossible de reconstruire le journal lorsque le fichier principal est
en
lecture seule.

Please, someone can help me !

Thanks,

Djamila.

Sep 3 '06 #1
2 5032
Hi

Have you checked that the database does not already exist? I would suspect
that the files are already attached and the first one failed because of
that, and the second one failed because the name was in use.

If you rename the file what happens?

John

<dj***********@ gmail.comwrote in message
news:11******** **************@ e3g2000cwe.goog legroups.com...
Hi!
I have some problems with ms sql server database connection. When I
wrote
the following function (in VB):

sub Remplir_Theme()
Dim connectionStrin g As String = "Data Source=.\SQLExp ress;
AttachDbFileNam e=|DataDirector y|\BasedeDonnee s_babySQL.mdf ;Integrated
Security=true; User Instance=true"
Dim sqlCon As new System.Data.Sql Client.SQLConne ction
(connectionStri ng)
sqlCon.open()
Dim cmd as sqlCommand = new sqlCommand ("Select * from
Table_theme;", sqlCon)
end sub
I Had this error (sorry it's in french)

Server Error in '/' Application.

--------------------------------------------------------------------------------

Échec d'une tentative d'attachement d'une base de données nommée
automatiquement pour le fichier
c:\inetpub\wwwr oot\App_Data\Ba sedeDonnees_bab ySQL. Il existe une base
de
données du même nom ou le fichier spécifié ne peut être ouvert ou
il se
trouve sur un partage UNC.

When I created a folder named App_Data. and putting inside my mssql
databse
file, I had this error
Server Error in '/' Application.

--------------------------------------------------------------------------------

Impossible d'ouvrir la nouvelle base de données
'C:\INETPUB\WWW ROOT\APP_DATA\B ASEDEDONNEES_BA BYSQL.MDF'. Abandon de
CREATE
DATABASE.
Échec d'une tentative d'attachement d'une base de données nommée
automatiquement pour le fichier
c:\inetpub\wwwr oot\App_Data\Ba sedeDonnees_bab ySQL.mdf. Il existe une
base de
données du même nom ou le fichier spécifié ne peut être ouvert ou
il se
trouve sur un partage UNC.
Échec de l'activation du fichier. Le nom de fichier physique
'c:\inetpub\www root\App_Data\B asedeDonnees_ba bySQL_log.ldf' est
peut-être
incorrect.
Impossible de reconstruire le journal lorsque le fichier principal est
en
lecture seule.

Please, someone can help me !

Thanks,

Djamila.
Sep 4 '06 #2
Hi,

By chance are you using this connection string in a ASP.Net
application? This error message can usually be explained when a ASP.Net
website is not pointing at the root. ASP.Net is not keen on /.

If you are not deploying a .Net website then I'm blowed if I know :)

Thanks

Bryan


John Bell wrote:
Hi

Have you checked that the database does not already exist? I would suspect
that the files are already attached and the first one failed because of
that, and the second one failed because the name was in use.

If you rename the file what happens?

John

<dj***********@ gmail.comwrote in message
news:11******** **************@ e3g2000cwe.goog legroups.com...
Hi!
I have some problems with ms sql server database connection. When I
wrote
the following function (in VB):

sub Remplir_Theme()
Dim connectionStrin g As String = "Data Source=.\SQLExp ress;
AttachDbFileNam e=|DataDirector y|\BasedeDonnee s_babySQL.mdf ;Integrated
Security=true; User Instance=true"
Dim sqlCon As new System.Data.Sql Client.SQLConne ction
(connectionStri ng)
sqlCon.open()
Dim cmd as sqlCommand = new sqlCommand ("Select * from
Table_theme;", sqlCon)
end sub
I Had this error (sorry it's in french)

Server Error in '/' Application.

--------------------------------------------------------------------------------

Échec d'une tentative d'attachement d'une base de données nommée
automatiquement pour le fichier
c:\inetpub\wwwr oot\App_Data\Ba sedeDonnees_bab ySQL. Il existe une base
de
données du même nom ou le fichier spécifié ne peut être ouvert ou
il se
trouve sur un partage UNC.

When I created a folder named App_Data. and putting inside my mssql
databse
file, I had this error
Server Error in '/' Application.

--------------------------------------------------------------------------------

Impossible d'ouvrir la nouvelle base de données
'C:\INETPUB\WWW ROOT\APP_DATA\B ASEDEDONNEES_BA BYSQL.MDF'. Abandon de
CREATE
DATABASE.
Échec d'une tentative d'attachement d'une base de données nommée
automatiquement pour le fichier
c:\inetpub\wwwr oot\App_Data\Ba sedeDonnees_bab ySQL.mdf. Il existe une
base de
données du même nom ou le fichier spécifié ne peut être ouvert ou
il se
trouve sur un partage UNC.
Échec de l'activation du fichier. Le nom de fichier physique
'c:\inetpub\www root\App_Data\B asedeDonnees_ba bySQL_log.ldf' est
peut-être
incorrect.
Impossible de reconstruire le journal lorsque le fichier principal est
en
lecture seule.

Please, someone can help me !

Thanks,

Djamila.
Sep 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
2002
by: Fortepianissimo | last post by:
Here is the situation: I want my server started up upon connection. When the first connection comes in, the server is not running. The client realizes the fact, and then starts up the server and tries to connect again. This of course all happens on the same machine (local connection only). The connections can come in as fast as 30+/sec, so...
4
1677
by: Frodo | last post by:
I have a problem establishing a link between Visual Studio.NET 2003 and SQL Server 2000. Both are installed on a Windows Server 2003, standard version. Visual Studio.NET Issues =================== From Visual Studio.NET 2003 I attempt to ‘Connect to a database’ The ‘Data Link Properties’ dialog box appears.
12
1314
by: RKay | last post by:
I have a Win2k server running SQL Server 2000. On that box I built a working web service that pulls data from the database. One of the services available simply accepts an ado.net connection string to test if a connection can be made to the local server. I can call that web service from any box on my network, and with the correct connection...
0
3909
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2 development client. Bur Its gives me following error message. I searched lots of things on net and tried on remote server but i didnt got suceess. Can any...
3
2005
by: Vinod R.Shenoy | last post by:
Hi All, Came across a post wherin you had helped somebody with a similar problem and was wondering if you could help us out with it. Our problem is , We have a development SQL Server 2000 (running on Win2K SP4) machine that we want to run on a Windows 2003 server machine and access it via our internal LAN. We have opened the firewall...
0
8829
by: Kris Mattheus | last post by:
A little background: I've been using web services successfully for a while now. My web server is a Windows CE 4.2 device and my client is a windows C# application created with Visual Studio 2003. My web server has both NTLM and Basic authentication. By providing the Credentials for my web service call, my application can access the web...
12
2234
by: Light | last post by:
Hi all, I posted this question in the sqlserver.newusers group but I am not getting any response there so I am going to try it on the fine folks here:). I inherited some legacy ASP codes in my office. The original code's backend is using the SQL Server 2000 and I am testing to use it on the Express edition. And I run into the following...
1
5105
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from the control unit and store them into the Sql server - The operation console then retrieve this data from the sql for reporting and statistics...
39
5829
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci;
5
6311
by: marshmallowww | last post by:
I have an Access 2000 mde application which uses ADO and pass through queries to communicate with SQL Server 7, 2000 or 2005. Some of my customers, especially those with SQL Server 2005, have had pass-through queries fail due to intermittent connection failures. I can easily restablish a connection for ADO. My problem is with...
0
7507
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7698
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7461
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5361
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3472
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.