Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Wednesday, March 28, 2012

How do I add a data source view and report model to an existing project

I have an existing project with the data source and report folder with working reports. I need to create a model for other department members to use Report Builder, not Business Intelligence Developer Studio, to develop their reports from. How do I add a data source view and report model folder to the project so I can then create a view and model?

Report Models are part of a separate project type. Create a new "Report Model" project and you will be able to create the DSV and report model there.

sql

Monday, March 19, 2012

How can you sort query filenames within a ssmssqlproj project file?

Subject says it all. There appears to be no way, which is ridiculous. Surely I am missing something that someone can easily point out. Thanks, Vic.

Just edit the ssmssqlproj file.

The file for my project (SQL Main) is located in "My Documents\SQL Server Management Studio\Projects\SQL Main\SQL Main\SQL Main.ssmssqlproj". Its just an xml file. Change the following line

<LogicalFolder Name="Queries" Type="0" Sorted="true">

to

<LogicalFolder Name="Queries" Type="0" Sorted="false">

It will revert back to true so you need to repeat this if you make changes. THere is probably a better way Smile

|||I believe as of now only way is to edit hte XML in this case, as reported on the Connect site too.

Friday, March 9, 2012

How can take Back-Up and restore database from a web form wsing asp.net(vb.net)

I want to give a facility to backup database restore database to the customer in my project.
Database is stored in sql server 2000.
From the website the browser can take backup by clicking BACKUP button and
restore database by clicking RESTORE button.
is it possiable in asp.net programatically ?

In SQL Server you backup a database using the "backup database" command. You restore a database using the "restore database" commands. You can lookup the complete syntax to these commands.

You issue these SQL commands from asp.net just like you would any other SQL command. The backup command will work even if others are using the database at the moment you do the backup. The biggest problem would be the restore. If you are going to restore a database over an existing database (overwrite it) then that database must not be in use or you will get an error.

Brian

|||i do not really recommend this approach whether you can or not !!!!
this is an admin job and it is better not to have a wide access to do this kind of operation..... i am not sure about if you can do it or not ... !!|||Its definitely possible, take a look at this page on MSDNhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ba-bz_35ww.asp This details the TSQL commands that are necessary to perform the backup/restore. Once you create the commands just execute them with SqlClient.
Hope This Helps

Wednesday, March 7, 2012

how can it automatically generating a ordered number

hi,

i am a newcomer and a freshman in asp.net. i am now writing a web-based system for SME as my final year project. i am going to use sql server and asp.net in C# to perform my final year project.

as asp.net is new for me, i would have some simple problems to ask.

1. in the project, i would like the system can automatically generate the enquiry number for each new order input to the system. for example today is 05 July 2006, the enquiry number would like 2006211xxxx, where 2006 is year, 211 is the day count start from 1 Jan and xxxx is the random number/ ordered number. how can i implement this? i even don't know how to generate the ordered number. could anyone help me

2. if there is an unknown test sample in each order input. as the sample number for each order is different, how can i set a flexible table that can have different number of rows for user to input the test result.

thanks

Rgds, universe

1. I suggest you can have two columns: one used to record the inserted data for the row, another for row ID. So you can create a table as following:

create table tbl_test(id int identity(1,1),RecDate smalldatetime default getdate(), Description varchar(200))
create table tbl_test1(id uniqueidentifier default newid(),RecDate smalldatetime default getdate(), Description varchar(200))

insert into tbl_test(description) select 'This is a test row'

insert into tbl_test1(description) select 'This is a test row'

2. Sorry I'm not clear about this issue

How can I use three languages in one database?

in my project I am using three languages in one data base (English, Arabic, Turkish),
the problem is when i search about arabic character, there is no results, and when i change the default language to Arabic and search about turkish character there is no result.

what can i do to solve this problem??
plzzzzzz answer me..i am not sure about how to do this.

But my suggestion would be instead of storing it in database, you can use the resource file provided if you are developing in .net.|||In database change the collation to ARABIC_CI_AI. This will help your problem in all three arabic, english and turkish. Do reply me if it works.

If you are using full text search engine of SQL server you have to refine catalogs with different settings.. I know the settings but if u want it let me know

And by the way me facing issue in solpart menu in arabic DNN which i make .. issue is it apears more on right. any solution for that if u have changed spmenu.js for that you can send me that file on hamza@.arcom.com.sa

Bye take care Have a nice day

How can I use System.DirectoryServices in SQL 2005

I'm working on migrating webservices from VS 2003 to SQL Server 2005 by using VS 2005 DB project to create some Stored Procedure. When I want to add a component reference of "System.DirectoryServices " in to my project, I could not find it in the list. Is there a way to add this component in to my DB project or how can I access the Active Directory from the SQL 2005.

Thank you in advance,

Worachart C.

Worachart wrote:

I'm working on migrating webservices from VS 2003 to SQL Server 2005 by using VS 2005 DB project to create some Stored Procedure. When I want to add a component reference of "System.DirectoryServices " in to my project, I could not find it in the list. Is there a way to add this component in to my DB project or how can I access the Active Directory from the SQL 2005.


The reason you can not reference the dll from a Sql project in VS, is because the dll is not in the "approved list". In other words, certain system assemblies are considered to not be used from inside SQL Server, i.e. they can cause problems etc, or they have not been fully tested from inside SQL Server. Your directory services assembly is one of those.
However, you can register the assembly manually in SQL Server by running CREATE ASSEMBLY from Sql Server Management Studio, and after having done that, the assembly will be available to reference from your Sql Server project. Notice that you probably have to register the assembly as UNSAFE, which should make you stop and think what you are doing - so you do not call methods that can harm SQL Server.
Niels|||Thank you Niels to make me understand a lot better. I will learn more about whether I should use that class in my project or should I try with some other way.

POP