Showing posts with label appropriate. Show all posts
Showing posts with label appropriate. Show all posts

Thursday, March 22, 2012

Accessing AdventureWorks DB from ASPNET

Hi folks,

I've been wondering whats the "appropriate" way to configure AdventureWorks DB such that the WHOLE database can be access from Visual Studio and ASPNET webpages.

The problem I keep beating my head against is the schema problem which prevents me from accessing tables with different schema.

What I've done/can do so far is:

1. Installed AdventureWorks DB
2. Can run SQL cmds from Winforms apps and these are working as expected.
3. I've added MACHINENAME\ASPNET to the database. The default schema is "dbo".
4. The DB is running on the same server as the web server.
When I try to execute something trivial such as:

SqlConnection connection = new SqlConnection("Data Source=localhost;Initial Catalog=AdventureWorks;Integrated Security=true;");

try

{

connection.Open();

SqlCommand command = new SqlCommand("SELECT * FROM [Production.Product]", connection);

SqlDataReader reader = command.ExecuteReader();
...
To get the above to work I need to set the ASPNET users schema to Production.

I will admit I am a novice when it comes to SQL Server but I'm learning fast.

Can anyone help?

Short of trawling through a ton of code what was Microsofts intended usage of schema and how would one access tables located in multiple schemas from ASPNET.

Thanks,

Philip.

See the response at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=166975&SiteID=1

Saturday, February 25, 2012

Access Reports via URL

Hi,
I figured, that I can call reports directly via URL and pass the
appropriate parameters in the URL when adding '&mypara=value'.
So far so good. But I could not figure out so far, how I can pass
parameters that allow "multiselections". Using the above notation
doesn't seem to work ... :(
--
Henning Eiben
busitec GmbH
Consultant
e-mail: eiben@.busitec.de
+49 (251) 13335-0 Tel
+49 (251) 13335-35 Fax
Rudolf-Diesel-Straße 59
48157 Münster
www.busitec.de
Sitz der Gesellschaft: Münster
HR B 55 75 - Amtsgericht Münster
USt-IdNr. DE 204607833 - St.Nr. 336/5704/1277
Geschäftsführer: Simon Böwer, Henning Eiben, Stefan Kühn, Martin Saalmann
--
... There are 10 kinds of people. Those who know binary code, and those
who don't.On Aug 24, 2:05 am, Henning Eiben <ei...@.busitec.de> wrote:
> Hi,
> I figured, that I can call reports directly via URL and pass the
> appropriate parameters in the URL when adding '&mypara=3Dvalue'.
> So far so good. But I could not figure out so far, how I can pass
> parameters that allow "multiselections". Using the above notation
> doesn't seem to work ... :(
> --
> Henning Eiben
> busitec GmbH
> Consultant
> e-mail: ei...@.busitec.de
> +49 (251) 13335-0 Tel
> +49 (251) 13335-35 Fax
> Rudolf-Diesel-Stra=DFe 59
> 48157 M=FCnsterwww.busitec.de
> Sitz der Gesellschaft: M=FCnster
> HR B 55 75 - Amtsgericht M=FCnster
> USt-IdNr. DE 204607833 - St.Nr. 336/5704/1277
> Gesch=E4ftsf=FChrer: Simon B=F6wer, Henning Eiben, Stefan K=FChn, Martin =Saalmann
> --
> ... There are 10 kinds of people. Those who know binary code, and those
> who don't.
This link might help.
http://www.esa-server.net/index.php?option=3Dcom_content&task=3Dview&id=3D1=
14&Itemid=3D103&lang=3Den
Regards,
Enrique Martinez
Sr. Software Consultant|||http://ServerName/reportserver?/FolderName/ReportName&Param1=value1&Param2=value2
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Henning Eiben" <eiben@.busitec.de> wrote in message
news:%23VLf70h5HHA.1208@.TK2MSFTNGP05.phx.gbl...
> Hi,
> I figured, that I can call reports directly via URL and pass the
> appropriate parameters in the URL when adding '&mypara=value'.
> So far so good. But I could not figure out so far, how I can pass
> parameters that allow "multiselections". Using the above notation
> doesn't seem to work ... :(
> --
> Henning Eiben
> busitec GmbH
> Consultant
> e-mail: eiben@.busitec.de
>
> +49 (251) 13335-0 Tel
> +49 (251) 13335-35 Fax
> Rudolf-Diesel-Straße 59
> 48157 Münster
> www.busitec.de
> Sitz der Gesellschaft: Münster
> HR B 55 75 - Amtsgericht Münster
> USt-IdNr. DE 204607833 - St.Nr. 336/5704/1277
> Geschäftsführer: Simon Böwer, Henning Eiben, Stefan Kühn, Martin Saalmann
>
> --
> ... There are 10 kinds of people. Those who know binary code, and those
> who don't.