Advertisement

09.26.2005 at 10:06AM PDT, ID: 21574355
[x]
Attachment Details

Using EXIST in SQL to Check values

Asked by dexter777 in Miscellaneous Web Development

Tags: ,

I am trying to grab the network ID of the user and check if its netID is in the database as follow, but Iam having problem with the EXIST or IN clause.

(the database is MS SQL)


Dim strSQL As String

strSQL = "SELECT DISTINCT netID FROM tblDAP_uBeta"

If User.Identity.Name.ToLower().ToString() IN (strSQL) Then
 'Do this...

Else
 'Do that...
End If

This gives me the error: End of statement expectedStart Free Trial
 
Loading Advertisement...
 
[+][-]09.26.2005 at 10:08AM PDT, ID: 14960568

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 10:11AM PDT, ID: 14960600

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 10:13AM PDT, ID: 14960617

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 10:13AM PDT, ID: 14960619

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 10:17AM PDT, ID: 14960656

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 10:26AM PDT, ID: 14960740

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 10:42AM PDT, ID: 14960866

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 10:51AM PDT, ID: 14960972

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 10:55AM PDT, ID: 14961017

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Miscellaneous Web Development
Tags: sql, exist
Sign Up Now!
Solution Provided By: PraxisWeb
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09.26.2005 at 12:07PM PDT, ID: 14961620

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 12:26PM PDT, ID: 14961764

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32