Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Friday, March 23, 2012

Importing RDL from Server to VS

One of my staff members created a report and published it to the server. The
original Visual Studio project has been lost. Is there a way to import the
report definition from the server into Visual Studio for editing?
I realize that we could hand edit the RDL. I just want to try and avoid this.David,
I've found myself in the same situation in the past couple days.
Here's what I did (it may not be the best, most efficient way, but it
worked).
In Report Manager, click Edit on the Properties>General tab for the
given report. You should get a File Download window; select Save and
put the rdl in the folder where you want it.
In VS, create a new report project. Open Solution Explorer and right
click Reports. Select Add>Add new item then pick your rdl. You should
then be able to open it in Designer.
HTH
toolman
David wrote:
> One of my staff members created a report and published it to the server. The
> original Visual Studio project has been lost. Is there a way to import the
> report definition from the server into Visual Studio for editing?
> I realize that we could hand edit the RDL. I just want to try and avoid this.

Sunday, February 19, 2012

Importing Access database into SQLExpress

I am trying to complete a lab in the Microsoft self-paced training kit, Developing Web Applications with Microsoft Visual C# .NET.

They have provided an Access database named Contacts.mdb and a batch file named InstContacts.bat that uses InstContacts.sql to import the data.

I have installed SQLExpress, but when I run the batch file I get the following:

C:\Microsoft Press\...\data>rem The following command line installs the Contact SQL database

C:\Microsoft Press\...\data>osql -i InstContacts.Sql -E
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2].
[SQL Native Client]Login timeout expired
[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.

Nevermind, I found the answer here.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=421593&SiteID=1

Importing Access database into Sql Server Express

Some facts:
1) I have an Access database (.mdb file) sitting on my harddrive.
2) I have Visual Studio 2005, Sql Server Express, and Sql Server
Management Studio Express.
3) I do *not* have Microsoft Access.
What I'm trying to do:
I simply want to import the Access database into Sql Server Express. In
other words, I want to end up with a Sql Server Express database that
has all the same tables, keys, and relationships as the Access database
as well as all the data from it. I can live without the queries stored
in the Access database, but those would be nice too.
What I've tried so far:
I'm able to connect to the Access database using the "Linked Servers"
features in Management Studio Express. From there, I was able to write
some simple Transact-SQL queries to find out what tables are in the
Access database and copy them, one at a time, into a Sql Server Express
database.
This is definitely a good start, but it doesn't take care of the
primary keys or foreign keys. There appear to be procedures for those
as well (sp_primarykeys, sp_foreignkeys), but I keep thinking there
must be an easier way.
Which brings me to...
Questions:
Without having to buy additional software/tools, can I import this
Access database without a lot of programming? If so, how?
Thanks in advance,
-DanDaniel
Actually I have not tried it by myself on SQL Server 2005, so try if this
works for you
SELECT *
FROM OPENDATASOURCE(
'Microsoft.Jet.OLEDB.4.0',
'Data Source="d:\northwind.mdb";
User ID=Admin;Password='
)...Customers
"Daniel Manes" <danthman@.cox.net> wrote in message
news:1139881255.986395.191440@.f14g2000cwb.googlegroups.com...
> Some facts:
> 1) I have an Access database (.mdb file) sitting on my harddrive.
> 2) I have Visual Studio 2005, Sql Server Express, and Sql Server
> Management Studio Express.
> 3) I do *not* have Microsoft Access.
> What I'm trying to do:
> I simply want to import the Access database into Sql Server Express. In
> other words, I want to end up with a Sql Server Express database that
> has all the same tables, keys, and relationships as the Access database
> as well as all the data from it. I can live without the queries stored
> in the Access database, but those would be nice too.
> What I've tried so far:
> I'm able to connect to the Access database using the "Linked Servers"
> features in Management Studio Express. From there, I was able to write
> some simple Transact-SQL queries to find out what tables are in the
> Access database and copy them, one at a time, into a Sql Server Express
> database.
> This is definitely a good start, but it doesn't take care of the
> primary keys or foreign keys. There appear to be procedures for those
> as well (sp_primarykeys, sp_foreignkeys), but I keep thinking there
> must be an easier way.
> Which brings me to...
> Questions:
> Without having to buy additional software/tools, can I import this
> Access database without a lot of programming? If so, how?
> Thanks in advance,
> -Dan
>|||Thanks for the answer, Uri, but what I'm really looking for is a way to
take all the tables, primary keys, foreign keys, constraints and the
data itself from the Access (mdb) file and place them in a Sql Server
Express database.
But I did try your SELECT statement in SQL Server Express 2005. Doesn't
work.Seems like you need to set up the Access file as a Linked Server
then just do "SELECT * FROM Northwind...Customers."
But that only gives me the data, not the keys, constraints,
relationships, etc.
Any other ideas for importing the *whole* database?
Thanks,
-Dan