 |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
 | This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

May 11th, 2006, 03:12 AM
|
|
Authorized User
|
|
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
WebShop (Chap 9) Question
I have installed the WebShop on a server and attached the database to SQL Server 2005.
The problem I have is that everything seems to work fine apart from any database update (delete product, add a new product). The connection string is using the SA account to connect.
Any ideas?
Stuart.
|
|

May 11th, 2006, 03:17 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Stuart,
Can you describe the problem in a bit more detail? Do you get an error?
And did you set the permissions for the uploads folder for the images? Maybe the code that saves the image doesn't run successfully.
You could try stepping through the code (set a breakpoint somewhere in the code behind, then hit F5 and then use F11 or F10) to see where you get an error...
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

May 11th, 2006, 03:30 AM
|
|
Authorized User
|
|
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
Here goes:
- No error is displayed
- Upload of Image works fine, generates three images for each item
- No database changes are made, no inserts or updates. Selects work find
- If I run the StoredProcs on the SQL Server (logged as the account in the ConnectionString) they work fine
The error has to be somewhere between the Web server and the Database. I don't have an development tool on the web server, and SQL Server Profiler is not installed.
This is a pain!!!!
Stuart.
Stuart.
|
|

May 11th, 2006, 03:31 AM
|
|
Authorized User
|
|
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
Here goes:
- No error is displayed
- Upload of Image works fine, generates three images for each item
- No database changes are made, no inserts or updates. Selects work find
- If I run the StoredProcs on the SQL Server (logged as the account in the ConnectionString) they work fine
The error has to be somewhere between the Web server and the Database. I don't have an development tool on the web server, and SQL Server Profiler is not installed.
This is a pain!!!!
Stuart.
Stuart.
|
|

May 11th, 2006, 11:56 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Stuart,
Something may be going wrong in the Insert operation of the FormView control. By default, exceptions are swallowed from that event, so you may not know what's happening (don't know why Microsoft has implemented it that way).
To get details about the error, modify the FormView1_ItemInserted handler in the AddProduct.aspx. vb file so it looks like this:
Code:
Protected Sub FormView1_ItemInserted(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.FormViewInsertedEventArgs) _
Handles FormView1.ItemInserted
If e.Exception IsNot Nothing Then
Throw New Exception("Ooops, something went wrong in FormView1_ItemInserted", _
e.Exception)
End If
Response.Redirect("Default.aspx")
End Sub
If the problem is with the insert, you should get a more detail error description. Post that description to this list, so we can take a look at it and recommend a fix...
Note: the underscores are just for readability in this forum....
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
|
|

May 15th, 2006, 07:05 AM
|
|
Authorized User
|
|
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
Included your code, but nothing was displayed. No exception displayed and the item was not added. Even when I change userID to SA it does not update the database.
Could this be a problem with the version of SQL Server?
Currently running workstation, but I'm about to upgrade it to Server to try and get Profiler working on it.
Stuart.
|
|

May 15th, 2006, 12:00 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
In that case, it seems nothing's wrong with the insert method. Very strange.
I doubt it has to do with the version of SQL Server. It should work on both Express and other versions.
The SQL Server profiler is indeed a handy tool to have in this case as it allows you to diagnose the commands that are sent to SQL Server.
It's weird that you don't get an error. If it was a permissions issue, you would at least get an error.
Can you create a very simple pages that executes the stored procedure? That is, skip the ObjectDataSource and directly let the sproc insert a record. That may give you some more information...
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
|
|

May 15th, 2006, 12:08 PM
|
|
Authorized User
|
|
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
I hope to change the SQL Server version from Workgroup to Standard tonight. SQL profiler should give me some information.
I'll also look at doing a simple page with a Stored Procedure call and see if that works.
To me it seems as if the whole database is in a Read Only mode one the server, when accessing it through the web pages.
Very strange.
Stuart.
|
|

May 15th, 2006, 01:57 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yeah, hopefully the profiler will help.
If there's anything else I can do, please let me know...
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
|
|

May 16th, 2006, 03:37 AM
|
|
Authorized User
|
|
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
IT WORKS!!!
- Upgraded the SQL Server from Workgroup to Standard.
- Created a new database
- Scripted the tables, views, stored procs etc from old Database
- Run this on new Database
- Transferred the data from the WebShop database to the new one
That seemed to solve the problem. Still don't really know what caused it.
I have another question regarding security. Do you know the Stored Procedure and details on adding a new user and deleting existing one?
Stuart.
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Webshop |
gogetsome |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 |
2 |
March 7th, 2008 03:07 PM |
| Database Design Question about WebShop |
learningASP.Net |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 |
8 |
August 9th, 2007 01:05 AM |
| WebShop (Chap 9) Question about Login |
SDonnelly |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 |
3 |
October 19th, 2006 04:12 AM |
| modifying Webshop |
mlevans |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 |
3 |
September 23rd, 2006 05:12 AM |
|
 |