Showing posts with label runs. Show all posts
Showing posts with label runs. Show all posts

Thursday, March 8, 2012

an easy question....

I have to connect to a SQL server 2000 database from a VB6 application that runs on a different PC....
PC name = FR_SERVER
SQL server name = FR_SERVER
file name = SQLlab_data.mdf
database name=SQLlab

thank you
Degia

Missing question:
I tried different connectionStrings, but I get a lot of different errors....

|||Try http://www.connectionstrings.com/.|||

Hi degia,

What are the exact connection strings and the corresponding errors messages that you're seeing? Also, have you checked the firewall settings on your server? These KB articles may be of some assistance for configuring the firewall:

http://support.microsoft.com/kb/287932/en-us
http://support.microsoft.com/kb/841249/en-us

Thanks,
Il-Sung

Wednesday, March 7, 2012

An attempt to attach an auto-named database failed

I have a problem with Microsoft SQL Server 2005 Express,
My web application runs fine on my development PC, but when I copy it to my
server (My server is running Windows 2000 Server) and try to access it from
the web I get following error:
An attempt to attach an auto-named database for file
C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with the
same name exists, or specified file cannot be opened, or it is located on UNC
share.
The ASPNET account has full control of the database.
Is this a known bug in Microsoft SQL Server?
What should I do?
Thanks for your help in advance,
Noah.Noah
How do you perform an attach operation?
"Noah" <Noah@.discussions.microsoft.com> wrote in message
news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
>I have a problem with Microsoft SQL Server 2005 Express,
> My web application runs fine on my development PC, but when I copy it to
> my
> server (My server is running Windows 2000 Server) and try to access it
> from
> the web I get following error:
> An attempt to attach an auto-named database for file
> C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with the
> same name exists, or specified file cannot be opened, or it is located on
> UNC
> share.
> The ASPNET account has full control of the database.
> Is this a known bug in Microsoft SQL Server?
> What should I do?
> Thanks for your help in advance,
> Noah.
>|||Assuming you are using the default settings, the .mdf and .ldf files must be
located in the same directory as your application on the server. The other
common cause for this is having the database open in the IDE or having the
database files with no write permissions for the ASPNET account. There is
more info here:
http://msdn.microsoft.com/sql/express/default.aspx?pull=/library/en-us/dnsse/html/sqlexpuserinst.asp
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
"Noah" <Noah@.discussions.microsoft.com> wrote in message
news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
>I have a problem with Microsoft SQL Server 2005 Express,
> My web application runs fine on my development PC, but when I copy it to
> my
> server (My server is running Windows 2000 Server) and try to access it
> from
> the web I get following error:
> An attempt to attach an auto-named database for file
> C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with the
> same name exists, or specified file cannot be opened, or it is located on
> UNC
> share.
> The ASPNET account has full control of the database.
> Is this a known bug in Microsoft SQL Server?
> What should I do?
> Thanks for your help in advance,
> Noah.
>|||I use the following command:
data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true
"Uri Dimant" wrote:
> Noah
> How do you perform an attach operation?
>
> "Noah" <Noah@.discussions.microsoft.com> wrote in message
> news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
> >I have a problem with Microsoft SQL Server 2005 Express,
> > My web application runs fine on my development PC, but when I copy it to
> > my
> > server (My server is running Windows 2000 Server) and try to access it
> > from
> > the web I get following error:
> >
> > An attempt to attach an auto-named database for file
> > C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with the
> > same name exists, or specified file cannot be opened, or it is located on
> > UNC
> > share.
> >
> > The ASPNET account has full control of the database.
> > Is this a known bug in Microsoft SQL Server?
> > What should I do?
> >
> > Thanks for your help in advance,
> >
> > Noah.
> >
>
>|||As I said... The ASPNET account has full control of the database and of the
application root folder.
Read, Write, Modify, etc.
I thought that was the problem, but it isn't. I had already given the ASPNET
account full control when I had problems with a hit counter. That took me two
days to figure out...
Anyway,
With the info you have now what do you suggest I do?
Thanks,
Noah.
"Roger Wolter[MSFT]" wrote:
> Assuming you are using the default settings, the .mdf and .ldf files must be
> located in the same directory as your application on the server. The other
> common cause for this is having the database open in the IDE or having the
> database files with no write permissions for the ASPNET account. There is
> more info here:
> http://msdn.microsoft.com/sql/express/default.aspx?pull=/library/en-us/dnsse/html/sqlexpuserinst.asp
>
> --
> 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
> "Noah" <Noah@.discussions.microsoft.com> wrote in message
> news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
> >I have a problem with Microsoft SQL Server 2005 Express,
> > My web application runs fine on my development PC, but when I copy it to
> > my
> > server (My server is running Windows 2000 Server) and try to access it
> > from
> > the web I get following error:
> >
> > An attempt to attach an auto-named database for file
> > C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with the
> > same name exists, or specified file cannot be opened, or it is located on
> > UNC
> > share.
> >
> > The ASPNET account has full control of the database.
> > Is this a known bug in Microsoft SQL Server?
> > What should I do?
> >
> > Thanks for your help in advance,
> >
> > Noah.
> >
>
>|||So, you eliminated one of the three things I suggested. How about the other
two? Di reading the article give you any things to try?
--
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
"Noah" <Noah@.discussions.microsoft.com> wrote in message
news:C270718F-C4ED-4D9D-9154-BE54671192B2@.microsoft.com...
> As I said... The ASPNET account has full control of the database and of
> the
> application root folder.
> Read, Write, Modify, etc.
> I thought that was the problem, but it isn't. I had already given the
> ASPNET
> account full control when I had problems with a hit counter. That took me
> two
> days to figure out...
> Anyway,
> With the info you have now what do you suggest I do?
> Thanks,
> Noah.
> "Roger Wolter[MSFT]" wrote:
>> Assuming you are using the default settings, the .mdf and .ldf files must
>> be
>> located in the same directory as your application on the server. The
>> other
>> common cause for this is having the database open in the IDE or having
>> the
>> database files with no write permissions for the ASPNET account. There
>> is
>> more info here:
>> http://msdn.microsoft.com/sql/express/default.aspx?pull=/library/en-us/dnsse/html/sqlexpuserinst.asp
>>
>> --
>> 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
>> "Noah" <Noah@.discussions.microsoft.com> wrote in message
>> news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
>> >I have a problem with Microsoft SQL Server 2005 Express,
>> > My web application runs fine on my development PC, but when I copy it
>> > to
>> > my
>> > server (My server is running Windows 2000 Server) and try to access it
>> > from
>> > the web I get following error:
>> >
>> > An attempt to attach an auto-named database for file
>> > C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with
>> > the
>> > same name exists, or specified file cannot be opened, or it is located
>> > on
>> > UNC
>> > share.
>> >
>> > The ASPNET account has full control of the database.
>> > Is this a known bug in Microsoft SQL Server?
>> > What should I do?
>> >
>> > Thanks for your help in advance,
>> >
>> > Noah.
>> >
>>|||Yes.
"Roger Wolter[MSFT]" wrote:
> So, you eliminated one of the three things I suggested. How about the other
> two? Di reading the article give you any things to try?
> --
> 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
> "Noah" <Noah@.discussions.microsoft.com> wrote in message
> news:C270718F-C4ED-4D9D-9154-BE54671192B2@.microsoft.com...
> > As I said... The ASPNET account has full control of the database and of
> > the
> > application root folder.
> > Read, Write, Modify, etc.
> > I thought that was the problem, but it isn't. I had already given the
> > ASPNET
> > account full control when I had problems with a hit counter. That took me
> > two
> > days to figure out...
> > Anyway,
> > With the info you have now what do you suggest I do?
> >
> > Thanks,
> > Noah.
> >
> > "Roger Wolter[MSFT]" wrote:
> >
> >> Assuming you are using the default settings, the .mdf and .ldf files must
> >> be
> >> located in the same directory as your application on the server. The
> >> other
> >> common cause for this is having the database open in the IDE or having
> >> the
> >> database files with no write permissions for the ASPNET account. There
> >> is
> >> more info here:
> >>
> >> http://msdn.microsoft.com/sql/express/default.aspx?pull=/library/en-us/dnsse/html/sqlexpuserinst.asp
> >>
> >>
> >>
> >> --
> >> 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
> >>
> >> "Noah" <Noah@.discussions.microsoft.com> wrote in message
> >> news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
> >> >I have a problem with Microsoft SQL Server 2005 Express,
> >> > My web application runs fine on my development PC, but when I copy it
> >> > to
> >> > my
> >> > server (My server is running Windows 2000 Server) and try to access it
> >> > from
> >> > the web I get following error:
> >> >
> >> > An attempt to attach an auto-named database for file
> >> > C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with
> >> > the
> >> > same name exists, or specified file cannot be opened, or it is located
> >> > on
> >> > UNC
> >> > share.
> >> >
> >> > The ASPNET account has full control of the database.
> >> > Is this a known bug in Microsoft SQL Server?
> >> > What should I do?
> >> >
> >> > Thanks for your help in advance,
> >> >
> >> > Noah.
> >> >
> >>
> >>
> >>
>
>

An attempt to attach an auto-named database failed

I have a problem with Microsoft SQL Server 2005 Express,
My web application runs fine on my development PC, but when I copy it to my
server (My server is running Windows 2000 Server) and try to access it from
the web I get following error:
An attempt to attach an auto-named database for file
C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with the
same name exists, or specified file cannot be opened, or it is located on UNC
share.
The ASPNET account has full control of the database.
Is this a known bug in Microsoft SQL Server?
What should I do?
Thanks for your help in advance,
Noah.
Noah
How do you perform an attach operation?
"Noah" <Noah@.discussions.microsoft.com> wrote in message
news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
>I have a problem with Microsoft SQL Server 2005 Express,
> My web application runs fine on my development PC, but when I copy it to
> my
> server (My server is running Windows 2000 Server) and try to access it
> from
> the web I get following error:
> An attempt to attach an auto-named database for file
> C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with the
> same name exists, or specified file cannot be opened, or it is located on
> UNC
> share.
> The ASPNET account has full control of the database.
> Is this a known bug in Microsoft SQL Server?
> What should I do?
> Thanks for your help in advance,
> Noah.
>
|||Assuming you are using the default settings, the .mdf and .ldf files must be
located in the same directory as your application on the server. The other
common cause for this is having the database open in the IDE or having the
database files with no write permissions for the ASPNET account. There is
more info here:
http://msdn.microsoft.com/sql/expres...xpuserinst.asp
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
"Noah" <Noah@.discussions.microsoft.com> wrote in message
news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
>I have a problem with Microsoft SQL Server 2005 Express,
> My web application runs fine on my development PC, but when I copy it to
> my
> server (My server is running Windows 2000 Server) and try to access it
> from
> the web I get following error:
> An attempt to attach an auto-named database for file
> C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with the
> same name exists, or specified file cannot be opened, or it is located on
> UNC
> share.
> The ASPNET account has full control of the database.
> Is this a known bug in Microsoft SQL Server?
> What should I do?
> Thanks for your help in advance,
> Noah.
>
|||I use the following command:
data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspn etdb.mdf;User Instance=true
"Uri Dimant" wrote:

> Noah
> How do you perform an attach operation?
>
> "Noah" <Noah@.discussions.microsoft.com> wrote in message
> news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
>
>
|||As I said... The ASPNET account has full control of the database and of the
application root folder.
Read, Write, Modify, etc.
I thought that was the problem, but it isn't. I had already given the ASPNET
account full control when I had problems with a hit counter. That took me two
days to figure out...
Anyway,
With the info you have now what do you suggest I do?
Thanks,
Noah.
"Roger Wolter[MSFT]" wrote:

> Assuming you are using the default settings, the .mdf and .ldf files must be
> located in the same directory as your application on the server. The other
> common cause for this is having the database open in the IDE or having the
> database files with no write permissions for the ASPNET account. There is
> more info here:
> http://msdn.microsoft.com/sql/expres...xpuserinst.asp
>
> --
> 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
> "Noah" <Noah@.discussions.microsoft.com> wrote in message
> news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
>
>
|||So, you eliminated one of the three things I suggested. How about the other
two? Di reading the article give you any things to try?
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
"Noah" <Noah@.discussions.microsoft.com> wrote in message
news:C270718F-C4ED-4D9D-9154-BE54671192B2@.microsoft.com...[vbcol=seagreen]
> As I said... The ASPNET account has full control of the database and of
> the
> application root folder.
> Read, Write, Modify, etc.
> I thought that was the problem, but it isn't. I had already given the
> ASPNET
> account full control when I had problems with a hit counter. That took me
> two
> days to figure out...
> Anyway,
> With the info you have now what do you suggest I do?
> Thanks,
> Noah.
> "Roger Wolter[MSFT]" wrote:
|||Yes.
"Roger Wolter[MSFT]" wrote:

> So, you eliminated one of the three things I suggested. How about the other
> two? Di reading the article give you any things to try?
> --
> 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
> "Noah" <Noah@.discussions.microsoft.com> wrote in message
> news:C270718F-C4ED-4D9D-9154-BE54671192B2@.microsoft.com...
>
>

An attempt to attach an auto-named database failed

I have a problem with Microsoft SQL Server 2005 Express,
My web application runs fine on my development PC, but when I copy it to my
server (My server is running Windows 2000 Server) and try to access it from
the web I get following error:
An attempt to attach an auto-named database for file
C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with the
same name exists, or specified file cannot be opened, or it is located on UN
C
share.
The ASPNET account has full control of the database.
Is this a known bug in Microsoft SQL Server?
What should I do?
Thanks for your help in advance,
Noah.Noah
How do you perform an attach operation?
"Noah" <Noah@.discussions.microsoft.com> wrote in message
news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
>I have a problem with Microsoft SQL Server 2005 Express,
> My web application runs fine on my development PC, but when I copy it to
> my
> server (My server is running Windows 2000 Server) and try to access it
> from
> the web I get following error:
> An attempt to attach an auto-named database for file
> C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with the
> same name exists, or specified file cannot be opened, or it is located on
> UNC
> share.
> The ASPNET account has full control of the database.
> Is this a known bug in Microsoft SQL Server?
> What should I do?
> Thanks for your help in advance,
> Noah.
>|||Assuming you are using the default settings, the .mdf and .ldf files must be
located in the same directory as your application on the server. The other
common cause for this is having the database open in the IDE or having the
database files with no write permissions for the ASPNET account. There is
more info here:
http://msdn.microsoft.com/sql/expre...expuserinst.asp
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
"Noah" <Noah@.discussions.microsoft.com> wrote in message
news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
>I have a problem with Microsoft SQL Server 2005 Express,
> My web application runs fine on my development PC, but when I copy it to
> my
> server (My server is running Windows 2000 Server) and try to access it
> from
> the web I get following error:
> An attempt to attach an auto-named database for file
> C:\Inetpub\okbehappy.net\App_Data\aspnetdb.mdf failed. A database with the
> same name exists, or specified file cannot be opened, or it is located on
> UNC
> share.
> The ASPNET account has full control of the database.
> Is this a known bug in Microsoft SQL Server?
> What should I do?
> Thanks for your help in advance,
> Noah.
>|||I use the following command:
data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDire
ctory|aspnetdb.mdf;User Instance=tru
e
"Uri Dimant" wrote:

> Noah
> How do you perform an attach operation?
>
> "Noah" <Noah@.discussions.microsoft.com> wrote in message
> news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
>
>|||As I said... The ASPNET account has full control of the database and of the
application root folder.
Read, Write, Modify, etc.
I thought that was the problem, but it isn't. I had already given the ASPNET
account full control when I had problems with a hit counter. That took me tw
o
days to figure out...
Anyway,
With the info you have now what do you suggest I do?
Thanks,
Noah.
"Roger Wolter[MSFT]" wrote:

> Assuming you are using the default settings, the .mdf and .ldf files must
be
> located in the same directory as your application on the server. The othe
r
> common cause for this is having the database open in the IDE or having the
> database files with no write permissions for the ASPNET account. There is
> more info here:
> http://msdn.microsoft.com/sql/expre...expuserinst.asp
>
> --
> 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
> "Noah" <Noah@.discussions.microsoft.com> wrote in message
> news:227BE70D-49A8-4987-8CF3-DCADFDEE777E@.microsoft.com...
>
>|||So, you eliminated one of the three things I suggested. How about the other
two? Di reading the article give you any things to try?
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
"Noah" <Noah@.discussions.microsoft.com> wrote in message
news:C270718F-C4ED-4D9D-9154-BE54671192B2@.microsoft.com...[vbcol=seagreen]
> As I said... The ASPNET account has full control of the database and of
> the
> application root folder.
> Read, Write, Modify, etc.
> I thought that was the problem, but it isn't. I had already given the
> ASPNET
> account full control when I had problems with a hit counter. That took me
> two
> days to figure out...
> Anyway,
> With the info you have now what do you suggest I do?
> Thanks,
> Noah.
> "Roger Wolter[MSFT]" wrote:
>|||Yes.
"Roger Wolter[MSFT]" wrote:

> So, you eliminated one of the three things I suggested. How about the oth
er
> two? Di reading the article give you any things to try?
> --
> 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
> "Noah" <Noah@.discussions.microsoft.com> wrote in message
> news:C270718F-C4ED-4D9D-9154-BE54671192B2@.microsoft.com...
>
>

An alert...of sorts

I have written a report which, depending upon the data year you want to analyze, runs against different databases. If you want the 1987 data, for example, you pull from the 1987 database, and so on.

It is no problem to change ("update") the files to the correct year and then run the report...when you remember to do it.

Is there a way to put an "alert" or something into the report which reminds the user to "update" the data files before actually running the report? What would the syntax be?

Or better yet, is there a way to automate the "update" files process based on a parameter such as [?Year}?Alternatives :

-Develop a small application in a visual language (Delphi, VisualBasic, FoxPro)

-Copy the report for each year and name them and configure them accordingly (Report1987, Report1988, and so on)