Thread View: comp.lang.basic.visual.misc
2 messages
2 total messages
Started by Road Runner News
Sat, 24 Jul 1999 00:00
Visual Basic and SQL
Author: Road Runner News
Date: Sat, 24 Jul 1999 00:00
Date: Sat, 24 Jul 1999 00:00
13 lines
1557 bytes
1557 bytes
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
Re: Visual Basic and SQL
Author: 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
>
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads