Showing posts with label mdf. Show all posts
Showing posts with label mdf. Show all posts

Wednesday, March 7, 2012

Creating ODBC connection

In my project, I have added a database called aspnetdb.mdf and I store all the required information here. Now I want to write a seperate Cryatl Report for my manager, that accesses this database and display required data. This report is not a part of the asp.net project. This is only for my manager. My database is not attached to any server. I just use the attachdb in the coonection string of my project to attach this database. no I want my crystal report to access this database. If I can create an ODBC connection to this database, it will solve my problem. Dows any body know how to access this database from Crystal with or without ODBC?

Any help is greatly appreciated.

i think crystal supports pretty much any type of data source, eg. odbc, oledb, etc.

Is the database SQL Express running on your own computer? I can find the connection string for you if this is the case.

Tuesday, February 14, 2012

creating db from mdf and ldf files

Hi, I have been sent a .mdf and a .ldf file and I need to use them to create
a DB and in the past I have always created a DB by restoring from a .bak fi
le. Can I create the database in EM using the two files or is there a script
I can run in QA? Thank youCheck out sp_attach_db in the BOL.
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create
a DB and in the past I have always created a DB by restoring from a .bak
file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||Hahnja,
You can attach the mdf and ldf file using sp_attach_db.Refer BooksOnLine for
details.
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there
a
script I can run in QA? Thank you.|||you can do both in EM and QA.
in EM first save the files at the desired location, open EM, right click
Databases folder on left pane, click on All Tasks, Attach Database ... then
follow the ziward.
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there
a
script I can run in QA? Thank you.|||Thank you to everyone for your help. I tried to use EM first, but it wanted
me to have the ldf and mdf files on the same drive. So then I used QA and I
got it to work. I started off using sp_attach_db but then I read about using
CREATE DATABASE in MS Help
and using FOR ATTACH with it - and that worked perfectly. Thank you again fo
r your help.

creating db from mdf and ldf files

Hi, I have been sent a .mdf and a .ldf file and I need to use them to create a DB and in the past I have always created a DB by restoring from a .bak file. Can I create the database in EM using the two files or is there a script I can run in QA? Thank you
Check out sp_attach_db in the BOL.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create
a DB and in the past I have always created a DB by restoring from a .bak
file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.
|||Hahnja,
You can attach the mdf and ldf file using sp_attach_db.Refer BooksOnLine for
details.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
..bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.
|||you can do both in EM and QA.
in EM first save the files at the desired location, open EM, right click
Databases folder on left pane, click on All Tasks, Attach Database ... then
follow the ziward.
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
..bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.
|||Thank you to everyone for your help. I tried to use EM first, but it wanted me to have the ldf and mdf files on the same drive. So then I used QA and I got it to work. I started off using sp_attach_db but then I read about using CREATE DATABASE in MS Help
and using FOR ATTACH with it - and that worked perfectly. Thank you again for your help.

creating db from mdf and ldf files

Hi, I have been sent a .mdf and a .ldf file and I need to use them to create a DB and in the past I have always created a DB by restoring from a .bak file. Can I create the database in EM using the two files or is there a script I can run in QA? Thank you.Check out sp_attach_db in the BOL.
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create
a DB and in the past I have always created a DB by restoring from a .bak
file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||Hahnja,
You can attach the mdf and ldf file using sp_attach_db.Refer BooksOnLine for
details.
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||you can do both in EM and QA.
in EM first save the files at the desired location, open EM, right click
Databases folder on left pane, click on All Tasks, Attach Database ... then
follow the ziward.
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||Thank you to everyone for your help. I tried to use EM first, but it wanted me to have the ldf and mdf files on the same drive. So then I used QA and I got it to work. I started off using sp_attach_db but then I read about using CREATE DATABASE in MS Help and using FOR ATTACH with it - and that worked perfectly. Thank you again for your help.

creating database from mdf file

how can i create a new database with a .mdf file ? in mS SQL 2000
thank youyou attach it... u better off creating one in enterprise manager.