p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 (http://p2p.wrox.com/forumdisplay.php?f=229)
-   -   Listing 12-1 (http://p2p.wrox.com/showthread.php?t=61181)

cJeffreywang August 15th, 2007 04:09 PM

Listing 12-1
 
Is line "List (Of String)" okay?

I got the error msg:
Type List is not defined.

TIA,
Jeffrey

Imar August 15th, 2007 04:11 PM

It probably is. However, you need the following Imports statement for this to work:

Imports System.Collections.Generic

Click right after the g or ) and Visual Studio will show an error correction hint. Open it up and it offers the correct namespace...

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

cJeffreywang August 16th, 2007 09:10 AM

Thanks.

I have 3 more questions.

1. I am using the Listing 12-1 as an inline code for
    a stored procedure. After solving the List(Of String)
    error, I have another error on "Return returnData" -
    'Return' statement in a sub or a set cannot return a value,
     even after I added one more line,
     Cmd.CommandType = CommandType.StoredProcedure.
2. Any other ways to access data through DataReader object.

3. Moving the mouse showed only the error statement. Right click
   after the g or ) did not show an error correction hint.

TIA,
jeffrey

Imar August 16th, 2007 01:00 PM

Sorry, don't have the book here so I can't say anything useful about this. Maybe someone else?

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


All times are GMT -4. The time now is 11:42 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.