Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

What's the equivalent of this Ms access in vb.net

Posted on 2005-05-11
1
Medium Priority
?
166 Views
Last Modified: 2010-04-23
SELECT COURSE_ID, COURSE_NAME FROM COURSES WHERE (COURSE_ID NOT IN (SELECT COURSE_ID FROM COURSES_TAKEN WHERE  UST_ID=1204));

I want to do it like:

Dim dass As New OleDbDataAdapter("SELECT COURSE_ID, COURSE_NAME FROM COURSES (WHERE COURSE_ID NOT IN (SELECT COURSE_ID FROM COURSES_TAKEN WHERE  UST_ID= " & User_ID));, cnss)

Or what's the proper syntax...?

Esam
0
Comment
Question by:_Esam
1 Comment
 
LVL 13

Accepted Solution

by:
softplus earned 800 total points
ID: 13982287
Dim dass As New OleDbDataAdapter("SELECT COURSE_ID, COURSE_NAME FROM COURSES (WHERE COURSE_ID NOT IN (SELECT COURSE_ID FROM COURSES_TAKEN WHERE  UST_ID= " & User_ID & "))", cnss)
Just remove the ; from the end of your query and place the closing ))'s as a string. Assuming cnss is your connection string.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question