Oracle Help Vb.net application

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2008
Posts: 1
Reputation: icklecoder is an unknown quantity at this point 
Solved Threads: 0
icklecoder icklecoder is offline Offline
Newbie Poster

Oracle Help Vb.net application

 
0
  #1
Sep 26th, 2008
Hi there Sorry if i have posted this on the wrong area.
I have a problem with a simple query shown below
  1. SELECT * FROM Disney
  2. WHERE UPPER(COLNAME) LIKE UPPER('%' || SEARCHSTRING || '%');
My problem, The colname variable is not being recognised as a column name for example
A user can select to view a set of characters from the DB by username, movies, etc etc (they select this from a combobox) They then enter a search string(textbox)
colname = username
Searchstring = pluto
SELECT * FROM Disney
WHERE Upper(COLNAME) LIKE UPPER('%' || SEARCHSTRING || '%');

The problem is orac;e does not seem to be picking up that colname is a column name and seems to be doing a simple comparison. To make this clearer

it' seems to be trying to match username = pluto
rather than finding pluto in the username column.

Has anyone got any ideas how i can get around this. I have a strange feeling it is something to do with dynamic pl/sql but i am new to oracle so i have no idea how to write dynamic queries. Any help would be muchly appreciated

I am using oracle 11g and visual studio .net 2005

many regards and thanks in advanced icklecoder
Last edited by cscgal; Sep 26th, 2008 at 7:40 pm. Reason: Fixed code tags
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC