Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 11:03 AM
Zlatko Matiæ
Guest
 
Posts: n/a
Default double qutes inside string ?

Hello.
I have a problem when writing strings for pass-through queries or command
text for ADO command object while working with PostgreSQL as back-end.
Namely, SQL dialect syntax uses double quotes for table name and field name,
something like this:
select * from public."Customers"
Therefore, when I put it as string in VBA it looks like:
"select * from public."Customers""
and VBA thinks that " after public. is the end of statement.

How to solve it?

Thanks.


  #2  
Old November 13th, 2005, 11:04 AM
Salad
Guest
 
Posts: n/a
Default Re: double qutes inside string ?

Zlatko Matiæ wrote:
[color=blue]
> Hello.
> I have a problem when writing strings for pass-through queries or command
> text for ADO command object while working with PostgreSQL as back-end.
> Namely, SQL dialect syntax uses double quotes for table name and field name,
> something like this:
> select * from public."Customers"
> Therefore, when I put it as string in VBA it looks like:
> "select * from public."Customers""
> and VBA thinks that " after public. is the end of statement.
>
> How to solve it?
>
> Thanks.
>
>[/color]
See if
"select * from public.""Customers"""
works.
  #3  
Old November 13th, 2005, 11:05 AM
Phil Stanton
Guest
 
Posts: n/a
Default Re: double qutes inside string ?

I think
"select * from public." & Chr$(34) & "Customers" & Chr$(34)"
is easier to understand (Chr$(34) is ASCII for ")

Try it
Phil

"Salad" <oil@vinegar.com> wrote in message
news:XjKie.3914$Ri4.479@newsread1.news.pas.earthli nk.net...[color=blue]
> Zlatko Matiæ wrote:
>[color=green]
>> Hello.
>> I have a problem when writing strings for pass-through queries or command
>> text for ADO command object while working with PostgreSQL as back-end.
>> Namely, SQL dialect syntax uses double quotes for table name and field
>> name, something like this:
>> select * from public."Customers"
>> Therefore, when I put it as string in VBA it looks like:
>> "select * from public."Customers""
>> and VBA thinks that " after public. is the end of statement.
>>
>> How to solve it?
>>
>> Thanks.
>>
>>[/color]
> See if
> "select * from public.""Customers"""
> works.[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles