RE: Error Message

From: frank_lupo <frank_lupo(at)email(dot)it>
To: dpage <dpage(at)vale-housing(dot)co(dot)uk>
Cc: ian(dot)brown <ian(dot)brown(at)printsoft(dot)de>
Subject: RE: Error Message
Date: 2003-05-28 11:56:00
Message-ID: HFLIHC$2DD44A971903241A27FFBEA91958739D@email.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi Dave,

>
>>Insert your comment:
>>The above error is generated by clicking the 'view' toolbar button on a table of mine called user. I can >>get the same error using the SQL winodow...
>>In the SQL window:
>>select * from user
>>gives the error, but
>>select * from "user"
>>works okay.

>Hi,
>The problem is that user is a reserved word because it is part of the SQL syntax. It's usually best to >avoid reserved words for object names, though I appreciate that's not always easy, or what you want.
>Frank: It seems to me that the best solution might be to maintain a list of reserved words and add a >check in fmtID to make sure the word is not in the list. What do you think?
>Regards, Dave

In fmtID why do not escape always ?

------------------
e.g:
Public Function fmtID(ByVal szData As String) As String
On Error Resume Next

'Replace double quotes
szData = Replace(szData, QUOTE, QUOTE & QUOTE)
szData = QUOTE & szData & QUOTE
fmtID = szData

End Function
------------------

What do you think?

Bye !!
Frank Lupo (Wolf) !!

/\_ _/\
\ o o /
--ooo-----ooo---

--
GPG Key: http://users.jc-hosting.co.uk/frank_lupo/files/publickey.txt

WebSite: http://users.jc-hosting.co.uk/frank_lupo

--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Bisogno di un elettricista? Trovalo su QxService e potrai trovare anche il nuovo Nec e606! UMTS Fai la tua richiesta e partecipa al concorso! Clicca qui!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1414&d=28-5

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2003-05-28 12:05:11 Re: Error Message
Previous Message Dave Page 2003-05-28 11:16:58 Re: Error Message