Re: sqlite help needed with my proc....



Mel wrote:
On Jun 24, 11:09 am, Darren New <d...@xxxxxxxxxx> wrote:
Melwrote:
>>>|delete from departments<<<
near "'s automotive)": syntax error
Along with all the other advice, be aware that this sort of thing can
lead to what's called an "SQL injection attack". You prompt the user for
a business name to look up, and they type in
Al's automotive
and get that error back. So they type in
Al';delete from departments;
and you're hosed.

--
Darren New / San Diego, CA, USA (PST)
I bet exercise equipment would be a lot more
expensive if we had evolved from starfish.

so how should i avoid getting hosed ? Can you please put me on the
right path ?


I think the answer is, "use sqlite" (which you're doing, right?) If you use sqlite's ability to expand tcl variable names you don't have to worry about injections so much since the whole of your data gets stored in the column rather than being treated as an sql string.




--
Bryan Oakley
http://www.tclscripting.com
.



Relevant Pages

  • Re: sqlite help needed with my proc....
    ... near "'s automotive)": syntax error ... Along with all the other advice, be aware that this sort of thing can ... lead to what's called an "SQL injection attack". ...
    (comp.lang.tcl)
  • Re: sqlite help needed with my proc....
    ... near "'s automotive)": syntax error ... Along with all the other advice, be aware that this sort of thing can lead to what's called an "SQL injection attack". ...
    (comp.lang.tcl)
  • Re: Rearrange data in a column, Access 2003
    ... I tried this and am getting a 'syntax error, ... I have learned some about SQL, but not enough to figure out the above error. ... "John W. Vinson" wrote: ... this is high-hazard work: ...
    (microsoft.public.access.queries)
  • Re: return a value using MDX
    ... From [Total Revenue] ... but I am getting a syntax error with the. ... it is looking for @sql as well. ... DECLARE @sql varchar ...
    (microsoft.public.sqlserver.olap)
  • Re: C# / SQL Related - whats wrong with this Insert Into syntax?
    ... Strange little problem here... ... I'm getting a "Syntax error in Insert Into statement" when it ... tries to execute the SQL. ... execute it using the MS Access query engine, ...
    (microsoft.public.dotnet.languages.csharp)