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.

Select into statement

2 posts in Visual Basic Last posting was on 2005-07-21 13:52:45.0Z
ttoyne Posted on 2005-07-20 16:55:05.0Z
From: <ttoyne@bellsouth.net>
Newsgroups: advantage.visual_basic
Subject: Select into statement
Date: Wed, 20 Jul 2005 11:55:05 -0500
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 68.222.42.6
Message-ID: <42de8376@solutions.advantagedatabase.com>
X-Trace: 20 Jul 2005 11:01:42 -0700, 68.222.42.6
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!68.222.42.6
Xref: solutions.advantagedatabase.com Advantage.Visual_Basic:992
Article PK: 1137783

I am using VB6 ADO ADB 7.0

I am trying to retrieve a value from a database table field into a varialble
using commandtext statement. no matter what syntax I use, I either get an
error or no value.

Can someone provide the proper commandtext to make this work.

Assume a vbprocedure variable as mx as a string, trying to retrieve a field
value from a table.

Example:

Select idfield into mx from table where [id source] = "12345"

I have tried various derivations with no success. Thanks to anyone who can
help. As you see, I am new at this.


"Lee Stigile" <lees Posted on 2005-07-21 13:52:45.0Z
From: "Lee Stigile" <lees@nospam_extendsys.com>
Newsgroups: advantage.visual_basic
References: <42de8376@solutions.advantagedatabase.com>
Subject: Re: Select into statement
Date: Thu, 21 Jul 2005 07:52:45 -0600
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 192.168.30.168
Message-ID: <42dfaa67@solutions.advantagedatabase.com>
X-Trace: 21 Jul 2005 08:00:07 -0700, 192.168.30.168
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!192.168.30.168
Xref: solutions.advantagedatabase.com Advantage.Visual_Basic:993
Article PK: 1137786

try something like:

rs.Open "SELECT idfield FROM frome table", cn

mx = rs.Fields("name").Value


Also, there are several sample apps on the devzone
(devzone.advantagedatabase.com). You might download these for some sample
syntax.

-Lee

<ttoyne@bellsouth.net> wrote in message
news:42de8376@solutions.advantagedatabase.com...
>I am using VB6 ADO ADB 7.0
>
> I am trying to retrieve a value from a database table field into a
> varialble using commandtext statement. no matter what syntax I use, I
> either get an error or no value.
>
> Can someone provide the proper commandtext to make this work.
>
> Assume a vbprocedure variable as mx as a string, trying to retrieve a
> field value from a table.
>
> Example:
>
> Select idfield into mx from table where [id source] = "12345"
>
> I have tried various derivations with no success. Thanks to anyone who
> can help. As you see, I am new at this.
>
>