Showing posts with label returns. Show all posts
Showing posts with label returns. Show all posts

Wednesday, March 21, 2012

Open SqlCeConnection from an ASP.NET Web Service?

Help!

I am trying to implement a web service that creates and populates a SQL Mobile database file, then returns the created database to a mobile device as a byte array. The database size could be in excess of 500,000 rows, which is why I want to do as much of this preprocessing on the server before it gets to the mobile device. I can't use replication since I have to do some shaping of the data before I can use it on the mobile device.

Unfortunately, the web service is throwing the following exception when I try to instantiate a SqlCeConnection object:

"System.NotSupportedException: SQL Server Everywhere Edition is not intended for ASP.NET development."

Are there any suggestions as to how I can get around this potential limitation? If I refactor out the code that actually performs the SqlCe operations to a separate assembly, but still call that assembly from within the ASP.NET process, will I get the same error?

I know that you can work with Sql Mobile databases from the deskop, and I suppose I could invoke a console application to create the database, but that seems like such a hack.

Thanks for any advice,

Matthew

This limitation was built into the SQL Everywhere engine because it is supposed to be used as an embedded database (running in-proc with your application), and not in a client-server scenario. The engine will actually test if there are any IIS processes in the calling stack (not sure about the terminology here), so you are out of luck.

Maybe someone smarter than me has a solution - I would also love to know it.

|||

I can understand the reasoning behind that decision; SQL Express is positioned perfectly for that case, but I am definitely not trying to use the SQL Everywhere engine in a client/server scenario.

I am just trying to let a server with significantly more resources pre-build a database for use on a mobile device, then ship the database down to the client. I'd hate to have to write some process that I can "shell" out to from the web app, generate the .sdf file, then read it in by the web service, but I really don't want to if I don't have to. Replication is not really an option, unfortunately.

Thanks,

Matthew

Friday, March 9, 2012

OOP Objects and SSRS ? Doable? Reusable? Performance?

Is there any way to reuse Objects that returns a collection to my
report in SSRS?
Is it practical? Will it perform okay if I need to join the output
from that object with other data? Say I have a vb.net object that
already has all the business logic that joins a bunch of objects
(tables really). It's in one place and we like it that way. If I want
to use SSRS will I have to code a select (or a create a view) to get
my same expected row set?
Thanks for any help or information.You have several options. None of them great as far as I am concerned.
One is to use the reportviewer control that ships with VS 2005 and VS 2008.
Use it in local mode. In local mode you give it a dataset and a report.
However, there is a lot more coding and complexity involved and you lose the
server capabilities (subscriptions, performance, etc).
Two, to write a data processing extension. Non-trivial but possible. I would
read up on that in books online.
Or, have a web service that you query and get the data back from it. That
will work as well.
RS is not architected to perform this type of integration easily. It is a
SOA (service oriented architecture).
Crystal reports might work better if this is a hard and fast requirement.
But, do look up data processing extension. That is the best bet for you.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
<wildman@.noclient.net> wrote in message
news:0802c9d7-98bb-4875-8f15-c24782d51cdd@.x35g2000hsb.googlegroups.com...
> Is there any way to reuse Objects that returns a collection to my
> report in SSRS?
> Is it practical? Will it perform okay if I need to join the output
> from that object with other data? Say I have a vb.net object that
> already has all the business logic that joins a bunch of objects
> (tables really). It's in one place and we like it that way. If I want
> to use SSRS will I have to code a select (or a create a view) to get
> my same expected row set?
> Thanks for any help or information.|||If the collections returned by your objects are 'flat' (have no nested
objects), you should be able to report on them, by exposing them as a web
service. See http://technet.microsoft.com/en-us/library/aa964129.aspx.
The documentation is a little sketchy. It works if your objects returns just
a list of fields. If there are nested objects, its not so simple.
<wildman@.noclient.net> wrote in message
news:0802c9d7-98bb-4875-8f15-c24782d51cdd@.x35g2000hsb.googlegroups.com...
> Is there any way to reuse Objects that returns a collection to my
> report in SSRS?
> Is it practical? Will it perform okay if I need to join the output
> from that object with other data? Say I have a vb.net object that
> already has all the business logic that joins a bunch of objects
> (tables really). It's in one place and we like it that way. If I want
> to use SSRS will I have to code a select (or a create a view) to get
> my same expected row set?
> Thanks for any help or information.