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

Wednesday, March 28, 2012

How to use Xcopy & User Instance to copy 3 dbo tables from the database of SQL Server Mana

Hi all,

I have read/studied (i) Working with Databases in Visual Web Developer 2005 Express inhttp://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/vwd.aspx, (ii) Xcopy Deployment (SQL Server Express) inhttp://msdn2.microsoft.com/en-us/library/ms165716.aspx, (iii) User Instances for Non-Administrators inhttp://msdn2.microsoft.com/en-us/library/ms143684.aspx, and (iv) Embedding SQL Server Server Express in Applications inhttp://msdn2.microsoft.com/en-us/library/ms165660.aspx. I do not understand the concepts and procedures to do Xcopy and User Instances for non-administrators completely-I do not know how to connect to databases and create database diagrams or schemas using the Database Explorer. I have a stand-alone Windows XP Pro PC. I have created a ChemDatabase with 3 dbo tables in the SQL Server Management Studio of my SQL Server Express and a website of my VWD Express application with an App_Data folder. I am not able to proceed to use Xcopy and user instance to bring the 3 dbo tables of ChemDatabase to my App_Data folder. Please help and give me some detailed procedures/instructions to bring the 3 dbo tables of ChemDatabase (or ChemDatabase itself) from the SQL Server Management Studio Express to the App_Data folder of the website of my VWD Express project?

Thanks in advance,

Scott Chang

I am sure those documentation entries were good intentioned but all of the above is not used with standard SQL Server so it is not very useful because you cannot xcopy a regular SQL Server database. The SQL Server team have a blog entry that will help you connect your user instance so you can use it in Management Studio. You could choose to do it per those docs which is not applicable to regular SQL Server or take the time to read up on how SQL Server really work. Hope this helps.

http://blogs.msdn.com/sqlexpress/archive/2006/11/22/connecting-to-sql-express-user-instances-in-management-studio.aspx

|||

Hi Caddre, Thanks for your response.

I read the article "SQL Server Express Weblog" you suggested in your response. I studied that article and Xcopy Deployment (SQL Server Express) in the Microsoft Library very hard for the last 5 days. I think I know more about Xcopy and User Instance. But I still do not know where and how to get my Xcopy deployment started in the website of my VWD Express application!!!? I have the Micosoft "Northwind" Database in the SQL Server Management Studio Express of my SQL Server Express that is installed in my stand-alone Windows XP Pro PC. My VWD Express program is also installed in the same stand-alone Windows XP Pro PC. I think that User Instance in my SQL Server Express is established. Suppose that I want to get the .mdf file of Northwind Database in the App_Data folder of a website of my VWD Express project. Where and how can I get Xcopy and Use Instance started? Please help me and kindly give me the key steps/instructions for obtaining the .mdf file of Northwind Database to the App_Data folder of the website of my VWD Express project via the Xcopy procedures.

Many Thanks in advance,

Scott Chang

|||

Hi Scott,

I found the MSDN thread below you have posted there that is very good since I don't think xcopying a SQL Server database is a valid operation I will let that forum provide you the means to implement it. However I have created a faq of the correct ways to move a SQL Server database so I will also post that thread, when you choose to know a SQL Server database as half of your application I will be here to help.

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

http://forums.asp.net/thread/1454694.aspx

Monday, March 26, 2012

How to use unit test in SSIS

I build a SSIS Package in Visual Studio 2005 , but i don't know how to test it automated?

Steven,

I don't know of way of unit testing SSIS packags other than buildig a framework for it yourself. There is certainly nothing provided with the product to allow you to do this.

Do you think there should be?

-Jamie

|||

I have played around with using the data unit testing features in the Database Developer's version of Visual Studio to test SSIS packages. It was a bit of a hack, and the functionality was limited for testing non-relational destinations.

I, for one, would love to see better support for unit testing in SSIS. Here's a Connect request I just created for it:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=276292

|||

Nice one John. I'd definately like to see that.

I think it would be a lot easier to unit test SSIS packages if the package were not one stand-alone entity. If you could access different parts of the package outside the context of the package it would really help.

That is why I think this connect posting is such good ideas:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=253500

-Jamie

|||Automated unit testing is difficult to do right now in SSIS.

It seems like when a given project has reached a size of 5+ packages (arbitrary number) , unit testing via point-and-click becomes untenable. "necessity is the mother of invention", and so I think various people will start forging their own test-automation "framework" on top of the framework provided in Visual studio Team Suite, Team Dev, or DB Pro, or perhaps nUnit. Its just too unproductive/time-consuming/error-prone to go through all the Integration Services project packages in a point-and-click fashion and make sure they all still "work" without some sort of automation system.
|||

I agree 100% percent. I'm a big fan of automated unit testing from back in my app dev days, and it's one of the biggest things I miss in working with BI tools. I think a decent tool could be built for testing control flow, but currently, I don't think SSIS provides all the "hooks" needed to really automate the unit testing of data flows, except as an end to end process. That makes unit testing data flows very similar to unit testing a method with 5000 lines of code in it Smile.

I'm hoping Katmai will help.

How to use unit test in SSIS

I build a SSIS Package in Visual Studio 2005 , but i don't know how to test it automated?

Steven,

I don't know of way of unit testing SSIS packags other than buildig a framework for it yourself. There is certainly nothing provided with the product to allow you to do this.

Do you think there should be?

-Jamie

|||

I have played around with using the data unit testing features in the Database Developer's version of Visual Studio to test SSIS packages. It was a bit of a hack, and the functionality was limited for testing non-relational destinations.

I, for one, would love to see better support for unit testing in SSIS. Here's a Connect request I just created for it:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=276292

|||

Nice one John. I'd definately like to see that.

I think it would be a lot easier to unit test SSIS packages if the package were not one stand-alone entity. If you could access different parts of the package outside the context of the package it would really help.

That is why I think this connect posting is such good ideas:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=253500

-Jamie

|||Automated unit testing is difficult to do right now in SSIS.

It seems like when a given project has reached a size of 5+ packages (arbitrary number) , unit testing via point-and-click becomes untenable. "necessity is the mother of invention", and so I think various people will start forging their own test-automation "framework" on top of the framework provided in Visual studio Team Suite, Team Dev, or DB Pro, or perhaps nUnit. Its just too unproductive/time-consuming/error-prone to go through all the Integration Services project packages in a point-and-click fashion and make sure they all still "work" without some sort of automation system.
|||

I agree 100% percent. I'm a big fan of automated unit testing from back in my app dev days, and it's one of the biggest things I miss in working with BI tools. I think a decent tool could be built for testing control flow, but currently, I don't think SSIS provides all the "hooks" needed to really automate the unit testing of data flows, except as an end to end process. That makes unit testing data flows very similar to unit testing a method with 5000 lines of code in it Smile.

I'm hoping Katmai will help.

How to use the Thousand Seperators In Crystal Report 8.5

Hi!

I am developing a accounting application using visual basic and ms access.
then i use the crystal report 8.5 for report.

plz explain how to use the thousand seperator formula in number field.

like Rs.5,55,555.00

when i applied the thousand seperator formula

it should be displayed like this :

Rs 55,555,55.00

what can i do for these problem plz explain.

then one more doubt is there :

how to use the crystal report in asp page.

plz have u got any source plz send me.

thanks in advance.What is your desired output?
Rs 55,555,55.00 or 5,55,555.00?|||hi mathivanan!

i like the following format

indian currency format

Rs : 5,55,55,555.00

plz explain|||Create a formula having this code
StringVar Amt;
StringVar s;
NumberVar N;
Amt:=Replace(Totext({AmountField}),",","");
s:=left(Amt,len(Amt)-3);
N:=len(s);
Select N
case 4:
left(s,1)&","& right(s,3) & ".00"
case 5:
left(s,2)&","& right(s,3)& ".00"
case 6:
left(s,1)&","& mid(s,2,2) & "," & right(s,3)& ".00"
case 7:
left(s,2)&","& mid(s,3,2) & "," & right(s,3)& ".00"
case 8:
left(s,1)&","& mid(s,3,2) & "," & mid(s,6,2) & "," & right(s,3)& ".00"
case 9:
left(s,2)&","& mid(s,3,2) & "," & mid(s,6,2) & "," & right(s,3)& ".00"
default:
s;
and place it in the details section|||hi mathi!

when i am using the formula!
i got the error message

"The Formula Result Must be a Boolean"
here u also use ToText Function but its fired error.

what can i do for these problem plz explain.

StringVar Amt;
StringVar s;
NumberVar N;

Amt:=Replace(Totext({product_details.prod_price}),",","");
s:=left(Amt,len(Amt)-3);
N:=len(s);

Select N
case 4:
left(s,1)&","& right(s,3) & ".00"
case 5:
left(s,2)&","& right(s,3)& ".00"
case 6:
left(s,1)&","& mid(s,2,2) & "," & right(s,3)& ".00"
case 7:
left(s,2)&","& mid(s,3,2) & "," & right(s,3)& ".00"
case 8:
left(s,1)&","& mid(s,3,2) & "," & mid(s,6,2) & "," & right(s,3)& ".00"
case 9:
left(s,2)&","& mid(s,3,2) & "," & mid(s,6,2) & "," & right(s,3)& ".00"
default:s;|||It should work correctly
Check again whether you miss something in the code|||Hi MathiVanan!

your code is working properly!

thanking you.|||Well
How did you have problem initially?|||Hi Mathy!

actually i am applying the function to the price field object using

Field Object --> Format -->Number Format-->
Thousand Seperator -->Choose the Formula Editor

later i just create a new formula field and applying this code.
and then drag the formula field in my report page
it working properly.

thanks mathi!

muthu

Friday, March 23, 2012

How to Use Suppressed Formula?

Hi!
i am devleoping a application using with visual basic and crystal reports 8.5. i would like to know

how to suppress the field value when the both entries are same?

like : table.filedname="January"
plz explain.Right click on the field
Select Format section
Goto Suppress option
There is button labelled x-2
Click that and write this

table.filedname="January"

How to use SqlCE 3.5 with in Visual Studio 2005?

Dear All,

I have downloaded Microsoft Synchronization Services for ADO.NET CTP from:

http://www.microsoft.com/downloads/details.aspx?FamilyId=75FEF59F-1B5E-49BC-A21A-9EF4F34DE6FC&displaylang=en

This download package contains the SQL Server Compact Edition 3.5 and I have installed the same. Before that I was having SqlCE 3.1 and able to work with that fine from C# application on Desktop.

After installing the new one I could see V3.1 and V3.5 folders at: C:\Program Files\Microsoft SQL Server Compact Edition\. But when I tried to create a new data connection from Visual Studio 2005, it directly making use of V3.1.

Does anybody know how to make use of this newer version in my C# application with in Visual Studio 2005 and also enabling the same in SQL Server Management Studio?

It’s an urgent requirement for me; please do spend couple of minutes in providing the solution for this.

Thanks in advance

Hi,
Can some one help me if you have a solution for the above one|||

The development environment for SQL Server Compact 3.5 is Visual Studio 2008 Beta 1. The Beta is available for download at http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx

Visual Studio 2008 Beta 1 can be installed side-by-side with Visual Studio 2005 SP1. Visual Studio 2008 Beta 1 also installs SQL Server Compact 3.5. Prior to installing Visual Studio 2008 Beta 1 uninstall SQL Server Compact 3.5 Beta.

Regards

Ambrish

Wednesday, March 21, 2012

How to use SqlCE 3.5 with in Visual Studio 2005?

Hi,

I have downloaded Microsoft Synchronization Services for ADO.NET CTP from:

http://www.microsoft.com/downloads/details.aspx?FamilyId=75FEF59F-1B5E-49BC-A21A-9EF4F34DE6FC&displaylang=en

This download package contains the SQL Server Compact Edition 3.5 and I have installed the same. Before that I was having SqlCE 3.1 and able to work with that fine from C# application on Desktop.

After installing the new one I could see V3.1 and V3.5 folders at: C:\Program Files\Microsoft SQL Server Compact Edition\. But when I tried to create a new data connection from Visual Studio 2005, it directly making use of V3.1.

Does anybody know how to make use of this newer version in my C# application with in Visual Studio 2005 and also enabling the same in SQL Server Management Studio?

It’s an urgent requirement for me; please do spend couple of minutes in providing the solution for this.

Thanks in advance

Hi,
Can some one help me if you are aware of this situation|||

Moving to CE related forums.

Have you checked whether the newest components related services are restarted successfully.

for the VS issue you might check under VS related forums.

How to use SqlCE 3.5 with in Visual Studio 2005?

Dear All,

I have downloaded Microsoft Synchronization Services for ADO.NET CTP from:

http://www.microsoft.com/downloads/details.aspx?FamilyId=75FEF59F-1B5E-49BC-A21A-9EF4F34DE6FC&displaylang=en

This download package contains the SQL Server Compact Edition 3.5 and I have installed the same. Before that I was having SqlCE 3.1 and able to work with that fine from C# application on Desktop.

After installing the new one I could see V3.1 and V3.5 folders at: C:\Program Files\Microsoft SQL Server Compact Edition\. But when I tried to create a new data connection from Visual Studio 2005, it directly making use of V3.1.

Does anybody know how to make use of this newer version in my C# application with in Visual Studio 2005 and also enabling the same in SQL Server Management Studio?

It’s an urgent requirement for me; please do spend couple of minutes in providing the solution for this.

Thanks in advance

Hi,
Can some one help me if you have a solution for the above one|||

The development environment for SQL Server Compact 3.5 is Visual Studio 2008 Beta 1. The Beta is available for download at http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx

Visual Studio 2008 Beta 1 can be installed side-by-side with Visual Studio 2005 SP1. Visual Studio 2008 Beta 1 also installs SQL Server Compact 3.5. Prior to installing Visual Studio 2008 Beta 1 uninstall SQL Server Compact 3.5 Beta.

Regards

Ambrish

How To use SQL Server Database

Hi.

I am Create a web Application Using Visual Web Developer and SQL Server 2000, I am Upload my Database on web server also. Now what Chaning req. in my application for access my web server database online.

Reagrds

Fakhruddin

Usually, the only change you would need to make is the connection string to make sure it points to the Sql Server that your web server has access to.|||

Thanks Mike

Can your give me Example. ?

this is my Connection string (LOCAL)Data Source=MYSERVER;Initial Catalog=Testing;User ID=sa; Password=xxxxx

if my server IP for eg. is 168.0.2.0 then ?

wating for your +ve reply

Thanks

|||

No, I can't give you a meaningful example that you can use. The thing that would change is the name of the server (Data Source), and only the person who manages the Sql Server you will be using can tell you that. You would be better advised asking your web hosting admin/support for this information.

|||

Hi Fakhruddin,


Based on my understanding, I think you are asking about how to connect to your database again after you have migrated it to a new web server ( the "changing requirements" as you have mentioned in your first post).

Well, I think what you should do now is exactly like our community member Mikesdotnetting has suggested you in his last post,

"Usually, the only change you would need to make is the connection string to make sure it points to the Sql Server that your web server has access to "

Generally speaking your connection string should look like this: Data Source=MYSERVER;Initial Catalog=Testing;User ID=sa; Password=xxxxx

And what you need to do now is to make sure that

1. the "data source" section has been filled in with the new server name(or IP Address in most cases)
2. you have used the right User ID and Password as the web hosting admin/support has given you(you can only get this user id/password from your web hosting admin/support).

Hope my suggestion can help. Thanks.

|||

Bo - that's all well and good if the OP has access to the web server. I understood his question related to the changes he would have to make to his existing development set up twhen migrating to a hosted environment. Are you reading it differently?

Monday, March 12, 2012

How to use mssql-2000

I am using Visual Studio 2005 and MSSql-2005 Server. But i also want to add MSSql-2000 Server Database.

Both the servers are running but when i provide the connection string of MSSql-2000 in SqlConnection to access data base, i get an error. It says like MSSql-2005 is not allowing to access.

So, How can i add MSSql-2000 to Visual Studio-2005?

I don't think there should be any problem. Pse post back the actual error you gets. And also , when you have two instances on same machine , you need to mention port number in the connection string. Which is the default instance in this box. and also check SQL Browser is running or not. If firewall is enabled on this machine you should excempt the port which sql server uses from firewall

Madhu

Friday, February 24, 2012

How to use cell data security with visual totals?

Hi,

We are working on a project with SQL Server 2005 and SSAS.

We created several roles using dimension security and one special role that requires cell data access permissions (i.e. cell security).

This last role is giving us trouble since we do not know how to implement visual totals on cell security.

A problem description follows:

1) We have a budget and expenses cube with a) Account, b) Time and c) Cost Center dimensions
2) The special role was created for a group of users who have the following requirement for data access permission:
- for some cost centers, restrict access to some accounts
- and for the rest of cost centers see all accounts
3) When looking at data at the cost center and account level, the role works fine. Restrictions are applied correctly.
4) However when looking at the data at the cost center level ONLY, the aggregated total shows a sum for all accounts, regardless of restrictions.


We know that if you use regular dimension security, you can enable Visual Totals in order to have aggregated values that reflect
the restrictions applied at the atomic level.

However, we do not know how to apply visual totals on cell data security. If anyone has faced similar situation,
we would appreciate any help on how to do this.


Another way to put it:

1) In a cube with a Product dimension (Family > Category > Product) and a Geography dimension (Country > State > City)
2) You can set dimension security to restrict access to certain products.
3) If you enable Visual Totals when creating the role, the aggregations at the Category level will show total values excluding amounts for those restricted products.
4) If you do not enable Visual Totals, the aggregated totals at the Category level will add up all products, regardless of access restrictions at the product level.

We are trying to achieve the same with Cell Data Access Permissions, but there is no option to Enable Visual Totals. For instance:

1) Same cube as above
3) Your create a role with cell data access permission; for some cities, you restrict acess to some products, and for all other cities allow access to all products.
4) When you look at data at the City level, you want to aggregate totals not for all products, but excluding amounts for those restricted ones.


We would appreciate your help on this enormously!

Cheers!
jbadillo@.streamnova.com

Cell security was not designed to support visual totals as you described.|||

Hi,

Is there a way around this? Instead of using visual totals, is there some other way to get the right totals?

Cheers

|||

One approach, which seems to work in limited testing with Adventure Works, would involve introducing cell security MDX conditions into the cube MDX script. Basically, a scoped calculation sets the secured cell values to NULL, which will cause the aggregation of those values up the hierarchy to adjust accordingly. However, when cube cells are browsed, the secured cells will still show "#N/A". The limitation with this approach, of course, is that user and/or role logic will be needed, so that unrestricted users are unaffected.

The simplified scenario in Adventure Works was as follows:

For user XYZ, secure the data for Bikes in CY 2003, and rollups in the Sales Summary measure group should reflect this.

The Cell Read Permission expression (for a role with user XYZ as member) is:

Not ([Date].[Calendar].CurrentMember is [Date].[Calendar].[CY 2003]
and [Product].[Product Categories].CurrentMember is [Product].[Product Categories].[Bikes])

And the cube calculation MDX script is something like:

Scope(MeasureGroupMeasures("Sales Summary"),

[Date].[Calendar Year].&[2003],

[Product].[Category].[All Products].[Bikes]);

IF UserName = "XYZ"

THEN this = NULL END IF;

End Scope;