Article View: comp.lang.basic.visual.misc
Article #375Re: Visual Basic and SQL
From: kns
Date: Sun, 08 Aug 1999 00:00
Date: Sun, 08 Aug 1999 00:00
25 lines
1768 bytes
1768 bytes
Try this :
adoLeague.Open "select Name, LeagueID from League Where Name =
'"+strleaguename+"'",......
( watch, you must use single and double aphostrophe )
Road Runner News wrote in message ...
>Alright i need some serious help quick.... when using an SQL statement in
>VB... how can i use a variable with the "where" clause in a select
>statement??? like this:
>
>adoLeague.Open "select Name, LeagueID from League Where Name =
>strleaguename", db, adOpenStatic, adLockOptimistic
>
>where "strleaguename" is a variable
>
>I've tried enclosing it in ' ', " ", ( ), { },[ ], < >... I just can't get
>ti to work... how do i do it...
>
>thanks... phil
>
>
>
Technical Details
Message-ID:
<Caer3.1591$RD5.20223@typ11>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<p2lm3.862$dM.23089@newse3.tampabay.rr.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1053fc,51e6611c37fa7e82 X-Google-Attributes: gid1053fc,public X-Google-Thread: ffb5a,51e6611c37fa7e82 X-Google-Attributes: gidffb5a,public X-Google-Thread: 110e3b,f215963d4b03f357 X-Google-Attributes: gid110e3b,public X-Google-Thread: 108062,51e6611c37fa7e82 X-Google-Attributes: gid108062,public X-Google-Thread: fb992,51e6611c37fa7e82 X-Google-Attributes: gidfb992,public From: "kns" <kartono1976@hotmail.com> Subject: Re: Visual Basic and SQL Date: 1999/08/08 Message-ID: <Caer3.1591$RD5.20223@typ11> X-Deja-AN: 510222499 Content-Transfer-Encoding: 7bit References: <p2lm3.862$dM.23089@newse3.tampabay.rr.com> Content-Type: text/plain; charset="iso-2022-jp" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 X-Trace: typ11 934113058 210.145.149.82 (Sun, 08 Aug 1999 07:50:58 EDT) MIME-Version: 1.0 NNTP-Posting-Date: Sun, 08 Aug 1999 07:50:58 EDT Newsgroups: comp.lang.basic.visual.misc,comp.lang.visual.basic,comp.lang.visual.basic.misc,cz.comp.lang.basic.visual,es.comp.lenguajes.visual-basic