Showing posts with label managed. Show all posts
Showing posts with label managed. Show all posts

Sunday, March 25, 2012

Adding a Delete functionality to my Shopping Cart

Hello,

I'm in the progress of developing a shopping cart system that operates with an SQL database in Visual Web Developer 2005. I've managed to successfully add items to the cart and display them, but I'm having trouble providing the user with the option of removing items from the cart.

My understanding so far is that I've got to adjust the DELETE SQL statement of the data source. At first I was thinking along the lines of a simple statement:

DELETE * FROM ShoppingCart WHERE CartID=@.CartID AND CategoryID=@.CategoryID AND ProductID=@.ProductID

However, I've realised that the parameters I need for this SQL query aren't automatically passed in when a user clicks the "Delete" text of the Delete field (at least I think this is the problem).

The error message which I'm getting when I try to remove an item from the cart is as follows:

Incorrect syntax near '*'.

If anyone could let me know where I'm going wrong and point me in the right direction I'd be really grateful.

Thank you,

Luke

Hi Luke,

There should not be an asterisk (*) in your DELETE statement. If you remove that you might have better luck.|||

Thanks very much for your help - I thought it might have been a really stupid mistake like that! Anyway everything is working fine now.

Thanks again,

Luke

Monday, March 19, 2012

Add user assembly in managed stored procedure

I am developing a managed stored procedure in VS.NET 2005 and I am trying to add a reference to an user developed assembly (not a system one) but adding a reference to it is not possible as it doesnt let me import assemblies but rather reference the few limited ones in a list. Why is this??

There are limitations to what you can do with CLR assemblies, that is the reason for the new SQL Server project template in VS 2005. Try the link below for more detailed info from Microsoft. Hope this helps.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sqlclrguidance.asp

|||I found out how to do it, it can be done. Just add the user developed assembly to the SQL database assemblies and that will make it callable from a managed database object. The downsize as I see it is that you need to keep a repository of assemblies outside of the GAC...

Saturday, February 25, 2012

Add existing database to a Project

I have an existing database with many procedures that has been managed ad hoc
in the past. I would like now with SSMS to move the database into a project
with an alter script for each object and maintain the project in source
control.
Does anyone know a simple way to acheive this rather than manually scripting
each object?
Is there a better way of doing this?
Thanks for your suggestions.
"David" wrote:

> I have an existing database with many procedures that has been managed ad hoc
> in the past. I would like now with SSMS to move the database into a project
> with an alter script for each object and maintain the project in source
> control.
> Does anyone know a simple way to acheive this rather than manually scripting
> each object?
> Is there a better way of doing this?
> Thanks for your suggestions.
Hi,
I have the same problem with a really big existing database, with many
stored procedures. So I'm very interested in a solution for this too.
Did you get any suggestions so far?
Markus (Germany)