Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Using an SQL statement to modify a table

3 posts in Visual Basic Last posting was on 2005-12-29 19:51:35.0Z
Carl Zuroski Posted on 2005-12-27 22:24:48.0Z
Reply-To: "Carl Zuroski" <czuroski@parentenet.com>
From: "Carl Zuroski" <czuroski@parentenet.com>
Newsgroups: advantage.visual_basic
Subject: Using an SQL statement to modify a table
Date: Tue, 27 Dec 2005 17:24:48 -0500
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 63.170.27.144
Message-ID: <43b1be61@solutions.advantagedatabase.com>
X-Trace: 27 Dec 2005 15:21:21 -0700, 63.170.27.144
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!63.170.27.144
Xref: solutions.advantagedatabase.com Advantage.Visual_Basic:1058
Article PK: 1137850

Hello,
I am trying to use an SQL statement in myvb code to create/modify tables.
When trying to use the select statement, I am getting an error with one of
my columns. The name of this column is "2ndStreet". In using the native
sql utility, I have to enclose this in double quotes to get it to work - and
this causes problems in vb. I try changing the quotes to single in my vb
code, but that gives me errors too.
If anyone has any idea how to work around this, I would really appreciate
it.

Thanks


Joachim Duerr (ADS Support) Posted on 2005-12-29 09:27:26.0Z
From: "Joachim Duerr (ADS Support)" <jojo.duerr@gmx.de>
Subject: Re: Using an SQL statement to modify a table
Newsgroups: Advantage.Visual_Basic
References: <43b1be61@solutions.advantagedatabase.com>
Organization: iAnywhere
User-Agent: XanaNews/1.17.6.5
X-Face: ,QMv7[luB)BpWAQ~:"kw6n%0ieY63.:g2K3n~8ky0;||5Xle*Xq+=~<Fy:0CVC2nx@8~vZ
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 195.2.185.25
Message-ID: <43b3abfe@solutions.advantagedatabase.com>
Date: 29 Dec 2005 02:27:26 -0700
X-Trace: 29 Dec 2005 02:27:26 -0700, 195.2.185.25
Lines: 22
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!195.2.185.25
Xref: solutions.advantagedatabase.com Advantage.Visual_Basic:1059
Article PK: 1137852


Carl Zuroski wrote in <43b1be61@solutions.advantagedatabase.com>:

> I am trying to use an SQL statement in myvb code to create/modify
> tables. When trying to use the select statement, I am getting an
> error with one of my columns. The name of this column is
> "2ndStreet". In using the native sql utility, I have to enclose this
> in double quotes to get it to work - and this causes problems in vb.
> I try changing the quotes to single in my vb code, but that gives me
> errors too. If anyone has any idea how to work around this, I would
> really appreciate it.

I'm not very familiar with VB, but IIRC VB does not allow to escape
quotes like C (\") or Delphi (''). Searching google I found following:

str1 = "President Lincoln said " & chr(34) & "Four score and seven
years ago..." & chr(34)

--
Joachim Duerr
Senior Product Support Analyst (Advantage Database Server)
iAnywhere Solutions / Extended Systems
advantage[AT]extendsys.de


Carl Zuroski Posted on 2005-12-29 19:51:35.0Z
Reply-To: "Carl Zuroski" <czuroski@parentenet.com>
From: "Carl Zuroski" <czuroski@parentenet.com>
Newsgroups: Advantage.Visual_Basic
References: <43b1be61@solutions.advantagedatabase.com> <43b3abfe@solutions.advantagedatabase.com>
Subject: Re: Using an SQL statement to modify a table
Date: Thu, 29 Dec 2005 14:51:35 -0500
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 63.170.27.144
Message-ID: <43b43d79@solutions.advantagedatabase.com>
X-Trace: 29 Dec 2005 12:48:09 -0700, 63.170.27.144
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!63.170.27.144
Xref: solutions.advantagedatabase.com Advantage.Visual_Basic:1060
Article PK: 1137854

Hello,
Thanks for the reply. I have found out that I can simply use square
brackets [] instead of double quotes within my sql statment to accomplish
what I need to do.

"Joachim Duerr (ADS Support)" <jojo.duerr@gmx.de> wrote in message
news:43b3abfe@solutions.advantagedatabase.com...
> Carl Zuroski wrote in <43b1be61@solutions.advantagedatabase.com>:
>
>> I am trying to use an SQL statement in myvb code to create/modify
>> tables. When trying to use the select statement, I am getting an
>> error with one of my columns. The name of this column is
>> "2ndStreet". In using the native sql utility, I have to enclose this
>> in double quotes to get it to work - and this causes problems in vb.
>> I try changing the quotes to single in my vb code, but that gives me
>> errors too. If anyone has any idea how to work around this, I would
>> really appreciate it.
>
> I'm not very familiar with VB, but IIRC VB does not allow to escape
> quotes like C (\") or Delphi (''). Searching google I found following:
>
> str1 = "President Lincoln said " & chr(34) & "Four score and seven
> years ago..." & chr(34)
>
> --
> Joachim Duerr
> Senior Product Support Analyst (Advantage Database Server)
> iAnywhere Solutions / Extended Systems
> advantage[AT]extendsys.de