Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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 March 7th, 2009, 06:09 PM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

i have the table you talking about users column and campaigns column this is how i find what campaign is assignt to user,
and yes if tomorrow someone comes with more campaigns we add those tables to the database, the reason is that each campaign have 8 columns that later in process will store data about clients contacted by, date-time, emails etc...

how can i add a parameter 4 the table ?
__________________
bx
 
Old March 12th, 2009, 04:20 PM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

hi guys is it possible to to use a statement like this
Select Name, Surname From DB Where (Name = @Name, Surname =@Surname)

i tried it and got an error incorrect syntax net to name.


thanks
__________________
bx
 
Old March 12th, 2009, 04:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi.. the code is wrong, it should be:

Select Name, Surname From DB Where Name = @Name and Surname =@Surname

Anyway this have no sense, since you will returning the same data you already know.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old March 12th, 2009, 06:35 PM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

this was my last resort for checking the db for names that exist.

early on i tried to use a CustomValidator to check 4 the name which i could not figure out to make the table dynamic, now i took this approach,

i have textbox1, textbox2 and a button.
the user enters name in textbox1 and surname in textbox2, in the button click event i created a sql connection and a data reader.

if name =true then
label.text="Name exist"
btnNext.visible=false
btnsearch.Visible=True
else
label.text=Name does not exist"
End If
this works if i search 4 one textbox, if i try to search both on override method occurs,


so if i do this
If surname= true then

...........
it validates the last bit of code,


any way thanks for the code
__________________
bx
 
Old March 12th, 2009, 06:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Well, the problem is that you are using the wrong aproach. You need a query that returns the number of rows that match your data, not the row. For that you use a executerscalar instead of an execute reader. Are you following a book or something else???
Usually books takes this aproach (at least it the basic one).
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old March 13th, 2009, 02:39 AM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

i am not using any book can you recommend me one that deals with this,
__________________
bx
 
Old March 13th, 2009, 07:07 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Jim may be better suited for recommending books.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Designer to UI Designer jitesh82 BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 April 16th, 2011 01:04 AM
how can i cover all datagrid rows ??? thomaz C# 1 November 30th, 2006 10:19 PM
Back Cover Error mitmaro BOOK: Ivor Horton's Beginning Visual C++ 2005 0 July 9th, 2006 02:22 AM
how can i cover all itens of a list view? thomaz C# 1 November 30th, 2005 04:30 AM
Book cover and ISBN Misleading.. kitjunk Wrox Book Feedback 1 June 17th, 2003 12:27 PM





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