Showing posts with label includes. Show all posts
Showing posts with label includes. Show all posts

Monday, March 19, 2012

.sql control string

My development environment includes Visual Web Developer, SQL Server 2005 Express and SQL Server Management Studio Express. I have a .sql control string that creates a database. The control string is in my App_Data folder within my web site. When I use SQL Server Managment Studio Express to run the .sql control string and create the tables etc. it does it in my SQLEXPRESS folder and not in the web.

How do I run the .sql file so it will create the database in my App_Data folder within the web site?

Thanks,

Kyleq

Hi Kyleq,

Please make sure that your SQL Server Management Studio Express has connected to the correct database.

A simple .mdf file cannot be working properly, we must

1. Attach it to a SQL Server instance.
2. Connection the SQL Server Management Studio Express to that instance and to that database.
3. Run the .sql scripts.
4. Detach the database.

Please read the following for more information:

http://msdn2.microsoft.com/en-us/library/ms228037.aspx

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

Thursday, March 8, 2012

.Net integration with SQL Reporting Services

We are working on a project that includes the development of business classes
to contain all our data access routines. The goal is to be avoid writing
numerous sql statements (some quite complex and some duplicative) in SQL
Reporting Services, forms development etc..
We've tested this model in .Net 2005 using the Report Viewer control and
have a successful pilot. The data access class returns a data set(s) that we
use in the Report Viewer. We would like to move this model to use Reporting
Services.
The question is:
We will compile our data access classes into a dll. We would like to be
able to reference the data access class and return a data set(s) that can be
used by Reporting Services designer. So far we have not figured out how to
do this.
Any suggestions or tips? Thx,your starting point:
http://msdn2.microsoft.com/en-us/library/ms154655.aspx
also you'll found a sample data extension in the official SQL Server website
(part of the samples for SQL 2005)
"def59485" <def59485@.discussions.microsoft.com> wrote in message
news:C3079CEB-6497-46AC-8949-44975EA320A2@.microsoft.com...
> We are working on a project that includes the development of business
> classes
> to contain all our data access routines. The goal is to be avoid writing
> numerous sql statements (some quite complex and some duplicative) in SQL
> Reporting Services, forms development etc..
> We've tested this model in .Net 2005 using the Report Viewer control and
> have a successful pilot. The data access class returns a data set(s) that
> we
> use in the Report Viewer. We would like to move this model to use
> Reporting
> Services.
> The question is:
> We will compile our data access classes into a dll. We would like to be
> able to reference the data access class and return a data set(s) that can
> be
> used by Reporting Services designer. So far we have not figured out how
> to
> do this.
> Any suggestions or tips? Thx,

Thursday, February 16, 2012

*.sql

I want to setup a weblog and I us .Text for it. It includes several .sql files and they are there for making my database (I think). How can I execute them so they make my database?? Thanks, Roelif the db is sql server, you can run the sql scripts from the *.sql file in QA...

HTH|||To elaborate further, if you have Query Analyzer, you can do a File...Open...and open the .SQL file. This will open up the script in a readable format. Then you do Query...Execute to run it.

If you do not have Query Analyzer, you can use the command-line OSQL utility.

osql -S (local) -E -i c:\SQLScript.sql

Terri|||If I do so then there are no tables created but there are stored procedures made. Is this okay??

Roel|||Well, the stored procedure won't be able to run without the tables being there, so no, in that sense it is not OK. But both QA and OSQL will let you create the stored procedures without the tables.

How are you planning on creating the tables? Didn't they supply scripts for that, too?

Terri|||I don't know. I think you must create tables wich match witch the stored procedures. But I will go with my question to the .Text department of this forum. Thanx