Click here to Skip to main content
15,888,984 members
Home / Discussions / Database
   

Database

 
GeneralRe: I want to change the owner of the object............. Pin
Scott Serl5-Jul-05 12:38
Scott Serl5-Jul-05 12:38 
Generalsd Pin
Anonymous4-Jul-05 18:56
Anonymous4-Jul-05 18:56 
QuestionHow to optimise performance of retrieving multiple sql function results from DB Pin
luckyeagle4-Jul-05 12:50
luckyeagle4-Jul-05 12:50 
AnswerRe: How to optimise performance of retrieving multiple sql function results from DB Pin
Rob Graham4-Jul-05 13:14
Rob Graham4-Jul-05 13:14 
GeneralRe: How to optimise performance of retrieving multiple sql function results from DB Pin
luckyeagle4-Jul-05 14:43
luckyeagle4-Jul-05 14:43 
GeneralRe: How to optimise performance of retrieving multiple sql function results from DB Pin
Rob Graham5-Jul-05 5:56
Rob Graham5-Jul-05 5:56 
GeneralT-QL Problem Pin
WDI4-Jul-05 10:38
WDI4-Jul-05 10:38 
GeneralRe: T-QL Problem Pin
Colin Angus Mackay4-Jul-05 11:32
Colin Angus Mackay4-Jul-05 11:32 
WDI wrote:
what should i do?

I'd fix the error.

First, the code you've presented here is not the code you've got a problem with because there are more errors in it than you present. For instance, the word "where" is misspelled.

Second, and I'm sure I've told you this before, you should use parameterised queries. Then you don't need to worry about stringing together fragments of SQL like this. And, it also improves the security of your application, reducing the risk that someone will be able to successfully launch an attack on it. For more information you can read SQL Injection Attacks and Tips on How to Prevent Them[^]. This acticle actually shows you how to use parameterised queries. I don't know why you don't use them. It makes everything so much easier.

Just for your information - I fully expect you to change this to use parameterised queries - The reason for the error is that you need to put an AND or OR between the conditions in a WHERE clause.

Another tip, put a breakpoint on the return statement and examine the contents of the sql string - it is much easier to read that than trying to decipher what the string should look like based on code that concatenates lots of little strings together.

Does this help?


My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More


GeneralRe: T-QL Problem Pin
WDI4-Jul-05 21:05
WDI4-Jul-05 21:05 
GeneralRe: T-QL Problem Pin
Colin Angus Mackay4-Jul-05 22:46
Colin Angus Mackay4-Jul-05 22:46 
GeneralRe: T-QL Problem Pin
WDI5-Jul-05 3:29
WDI5-Jul-05 3:29 
GeneralRe: T-QL Problem Pin
Colin Angus Mackay5-Jul-05 3:38
Colin Angus Mackay5-Jul-05 3:38 
GeneralLDAP Frontend to MSSQL Pin
MrEyes4-Jul-05 2:13
MrEyes4-Jul-05 2:13 
GeneralIMPORT ACCESS FROM SQL SERVER 2000 Pin
RajithCAlwis4-Jul-05 0:47
RajithCAlwis4-Jul-05 0:47 
GeneralRe: IMPORT ACCESS FROM SQL SERVER 2000 Pin
Rob Graham4-Jul-05 13:23
Rob Graham4-Jul-05 13:23 
GeneralRe: IMPORT ACCESS FROM SQL SERVER 2000 Pin
RajithCAlwis4-Jul-05 17:02
RajithCAlwis4-Jul-05 17:02 
GeneralParadox lock Pin
Screwtape4-Jul-05 0:29
Screwtape4-Jul-05 0:29 
GeneralRe: Paradox lock Pin
Rob Graham4-Jul-05 13:25
Rob Graham4-Jul-05 13:25 
GeneralRe: Paradox lock Pin
Screwtape4-Jul-05 21:47
Screwtape4-Jul-05 21:47 
GeneralRe: Paradox lock Pin
Rob Graham5-Jul-05 6:01
Rob Graham5-Jul-05 6:01 
GeneralFilterData Set eproblem VB.NET Pin
monageasmear3-Jul-05 21:44
monageasmear3-Jul-05 21:44 
GeneralRe: FilterData Set eproblem VB.NET Pin
asithangae4-Jul-05 20:57
asithangae4-Jul-05 20:57 
GeneralUnicode Support Pin
Mr. Naveed Butt3-Jul-05 20:44
professionalMr. Naveed Butt3-Jul-05 20:44 
GeneralRe: Unicode Support Pin
Colin Angus Mackay3-Jul-05 21:17
Colin Angus Mackay3-Jul-05 21:17 
GeneralRe: Unicode Support Pin
Mr. Naveed Butt3-Jul-05 22:05
professionalMr. Naveed Butt3-Jul-05 22:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.