Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Friday, March 30, 2012

How to control security to parameter level in Report server?

I am developing a web application which need control security to parameter level. For example, salesman just only view report which belong to himself, but manager need to view all sales reports.
what should I do? thanks

newmanYou can achieve this in several ways:

Solution 1) use the User!UserID global in your report definition. This allows you to scope query results, parameter values, etc based on who the user actually is. This provides a single report that lists all the data for

Solution 2) use linked reports. If, for example, you have 2 groups, one which needs to see North region and the other South region, you can create a single report that takes the region parameter. Then create 2 linked reports that submit only the parameter value that each group is supposed to see. You can then ACL each linked report to be visible only to the appropriate group.

Solution 3) use database security with integrated security. You can just always access the underlying data source as the current users. If you underlying data source supports row level security, then the user will automatically get only those values to which they have permission.

-Lukaszsql

Wednesday, March 28, 2012

How to connect to SQL Server with ASP.NET

Hi
I need help to connect to SQL server, i got Microsoft Visual Web Developer 2005 Express and SQL Server Management Studio Express
With SQL Server Management Studio Express i can make databases and create tables but i dunno how to connect via asp.net
Anyone could give me a helping hand?
Thanks for the help
- Gucchi

Hi
Following is the sample create_connection method that works for me.Hope this helps you.
ALL THE BEST
Chickoo
Sub create_Conn()

Dim oConnectionAs SqlConnection

Dim DAAs SqlDataAdapter

Dim DSAsNew DataSet

Dim sSQLAsString

Dim sConnAs SqlConnection =New SqlConnection("workstation id=<xxx>;packet size=4096;integrated security=SSPI;data source=<xxx >;persist security info=False;initial catalog=<Database Name>;Trusted_Connection=Yes")

sSQL = " SELECT * FROM MyDatabase"

DA =New SqlDataAdapter(sqlstr, sConn)

DA.Fill(DS, "MyTable")

MyGrid.DataSource = DS

MyGrid.DataBind()

sConn.Close()

EndSub

sql

Monday, March 26, 2012

How to connect to a SQL view NOT table

Normally i can use Web Matrix to connect to a SQL table. e.g.
Dim queryString As String = "SELECT [MyTable].* FROM [MyTable]"
Is is possible to connect to a SQL View. The reason is because i have generated a view using UNIONS and JOINS and some columns are generated by concatenating columns together (ie.. has alias columns).
I also need to use VB.NET to refer to these alias columns.

hy..
I suppose it's the same as that in a table.
Dim queryString As String = "SELECT * from [MyView]"
...|||

Hey,

I think you can just use 'SELECT [MyView].* FROM [MyView]' as a query.
We use views here, we query them like they were tables, so ...
If you still have problems with it, let me know and i'll look into it a little deeper

How to connect to a mirrored SQL Server?

SQL Configuration: Two 2003 Servers (OS Std ver) with SQL 2005 (Std ver) configured for db mirroring. (The servers aren't clustered.)

Web.config configuration string is using "ServerA".

If we fail Server A, then Server B will change roles to "primary" in about 20 seconds (we have confirmed this via SQL Mgt Console). BUT...our web app is still pointing to Server A and doesn't seem to know there is a fail over. SO - how can I make the web app aware of the failure?

Server A and Server B aren't in a cluster - and I understand a cluster's virtual server would be referenced in the connection string. Is there a way to make the web app automatically switch to Server B (without a cluster configuration)?

From what I understand, the cluster configuration would require Ent Ed. of OS and SQL and a big fat check!!

Thanks.

-Kevin

One problem Database Mirroring did not make it to SQL Server 2005 shipping but expected in a service pack in the future. In the mean time Cluster is the way to go. Hope this helps.|||

I understand the mirror feature is for "testing only" - which is what I am doing. I have read that SQL 2005 SP1 would be released in early 2006 and MS would fully support the mirror capability.

From what I have read about mirroring, it seems that server clustering isn't necessary - that SQL can mirror the data. From a ASP.NET perspective, I just didn't know how it would know if a server is down and "switch" the connection to the failover server. Cluster's Vitual server makes that seamless - maybe that is the only way for ASP.NET apps to work with the failover server??

So, to clarify what I intended...how can ASP.Net use the failover server unless you are a cluster or unless you modify the connection string when Server A fails?

-Kevin

|||

SQL Server 2000 came with Log Shipping which is what Microsoft improved to get database Mirroring but you still need the Enterprise edition to get all fancy components of SQL Server. And for how to know when the server is down you will need monitoring tools like MOM (Microsoft Operation Management ) server or database specific tools like Embarcadero, I have used both and the cost is almost the same with basic cluster hardware without the System admin requirement. I would add the MOM implementation was enterprise wide so the cost was very high. Hope this helps.

Friday, March 23, 2012

How to connect SQL-Server to MSDE using Linked Server?

I s there a good explanation in the web for beginners like me?
See the subject sp_addlinkedserver in the Books Online.
Jim
"Geri Reshef" <GeriR@.Dubek.co.il> wrote in message
news:OTGIc%238%23EHA.3336@.TK2MSFTNGP11.phx.gbl...
>I s there a good explanation in the web for beginners like me?
>
sql

How to Connect SQL server Using ASP.net

Dear ASP.NET user...

I'm a new user in ASP.NET...
i have a problem facing now...
I'm using SQL server as my database...
how do i CONNECT my web application using ASP.NET to SQL server??

What should i do?
any coding do i need to insert to my web HTML?

what i heard from my friend...she said web config can connect the web application to SQL server...?...it that work?

pls help me guys and gals...

From jhwong2610
URGENTVery often the web.config is used to store the connection string - that alone does not connect you to a database - using the connection string you have to open a sqlConnection and then proceed from there.

My best recommendation would be to pick up one of the ASP.NET books and look at one of the examples that uses data binding.|||Hi:
Like This


Dim Conn As New SqlConnection("ConnectionStringHere")
Dim Conn As New SqlCommand("Select * From Table", Conn)
Dim DRs As SqlDataReader
Conn.Open()
DRs = Comm.ExecuteReader()
If DRs.Read() Then
Response.Write(DRs("Column"))
End If
DRs.Close()
Conn.Close()
|||Add this to the web.config file:

<configuration>
<appSettings>
<add key="SQLConnStr" value="<your connection string" />
</appSettings
...

You can use the connectionstring in the code like this:

Dim str as connStr = System.Configuration.ConfigurationSettings.AppSettings("SQLConnStr")

Monday, March 19, 2012

How to configure sql server

Hi All,

Here is my question

What might you configure on a SQL Server so that a Web server running
on the same machine, with limited memory, will continue to perform
optimally?

Thank you
Rajuraju.angani@.gmail.com (Raju) wrote in message news:<4bf5a0e7.0409291458.336cc521@.posting.google.com>...
> Hi All,
> Here is my question
> What might you configure on a SQL Server so that a Web server running
> on the same machine, with limited memory, will continue to perform
> optimally?
> Thank you
> Raju

Hallo,
My configuration of server: dual PentiumIII(copermine)/768MB RAM/
On it IIS 6.0 runing.