Wrox Programmer Forums
|
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
 
Old January 17th, 2007, 02:08 PM
Registered User
 
Join Date: Jan 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Imar,

I just noticed something... the timestamp field in the "message" table was empty. I updated the timestamp field with data (within 1 hour) and it's showing up now in the chat screen. So I guess the problem must be in saving the message with the timestamp in SQL Server.

Thought I'd let you know.

Doug

www.fire-church.org
 
Old January 17th, 2007, 03:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

That explains a lot. The timestamp column has GetDate() as the default value. So, whenever you add a record, the column is automatically filled with today's date (provided the insert / update statement doesn't provide a different value).

Other columns have defaults too, so be sure to check those out. To do this, locate your database in the Server Explorer / Database panel. Then right click the table and choose Open Table Definition.
Then for each column check out the "Default value or databinding" option in the Column Properties grid.

With the defaults setup, things should work. If not, let me know, and I'll look into it again and make a SQL 2000 script if necessary and possible.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old January 18th, 2007, 02:57 PM
Registered User
 
Join Date: Jan 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

Everything is working fine now with 1 exception. It's not grabbing all of the chat rooms from the table because of the "CASE" statment I mentioned that was in the "viewAllChatRoomsWithActiveNotation". If you could let me know how to translate that for SQL Server that would be great! :) SQL Server didn't allow case statements within the view.

Thanks for all of the help!
Doug

www.fire-church.org
 
Old January 19th, 2007, 06:14 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I had no problem running the view in a SQL Server 2000 database.

Here's what I did you make it work:

1. Change the following columns from nvarchar(max) to something like nvarchar(50) or nvarchar(100), depending on the type of data the column is to store:

Room.Name
Room.Description
Category.Name
Category.Description
User.Email

2. Changed all remaining nvarchar(max) to ntext

3. Changed all occurences of

SELECT TOP (100) PERCENT

to

SELECT TOP 100 PERCENT

as SQL server 2000 doesn't seem to like the parentheses.

From there, the views could be created successfully...

Hope this helps,


Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old January 24th, 2007, 01:08 PM
Registered User
 
Join Date: Jan 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, I see my problem. It says my "Query Designer" does not support the case statement even though it is valid. Grrr... How can I create it outside of my query designer?

www.fire-church.org
 
Old January 24th, 2007, 03:12 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Although it doesn't give you design time support, I think it still saves the query / view just fine.

Otherwise, use the Query Analyzer (choose Tools | Query Analyzer in Enterprise Manager) and execute your CREATE statement from there.

Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Inamorala by VAS (Track 2 from the album: Sevdance) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to send attachment with text message ashuphp PHP How-To 1 October 29th, 2007 06:08 PM
Send Message to Email inbaa ASP.NET 1.0 and 1.1 Professional 2 August 28th, 2006 05:45 AM
send message to many recipients eda BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 May 29th, 2006 08:49 PM
How to send message to SMS !!!!! stevenThu Classic ASP Professional 4 August 26th, 2004 10:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.