Thread View: comp.databases.ms-access
3 messages
3 total messages
Started by Eyal Maaravi
Thu, 16 Dec 1999 00:00
passing sql from asp
Author: Eyal Maaravi
Date: Thu, 16 Dec 1999 00:00
Date: Thu, 16 Dec 1999 00:00
25 lines
2050 bytes
2050 bytes
hi
i want to create a recordset from an ASP page using an SQL string;
the SQL is:
SELECT * FROM Business_qry WHERE name Like '*rest*'
i opened the recordset in the following way:
set rsCoupons = CreateObject("ADODB.Recordset")
rsCoupons.Open "SELECT * FROM Business_qry WHERE name Like '*rest*'", _
"DATABASE=myDB;UID=;PWD=;DSN=myDB"
that doesn't work, and the problem is with the operator like and with the
asterisk.
i succeeded executing the exact same SQL in Access, in it worked fine.
please help if you know the answer.
thanks in advance
eyal maaravi
Re: passing sql from asp
Author: Peter van Kampen
Date: Fri, 17 Dec 1999 00:00
Date: Fri, 17 Dec 1999 00:00
41 lines
2370 bytes
2370 bytes
Eyal,
* = % in SQL-92
Hth,
PeterK
--
Access FAQ : www.mvps.org/access
To Search the archives of this NG : http://people.a2000.nl/kampen/access/
Eyal Maaravi <netc1@netvision.net.il> wrote in message
news:83bleq$2gh$1@news.netvision.net.il...
> hi
>
> i want to create a recordset from an ASP page using an SQL string;
>
> the SQL is:
>
> SELECT * FROM Business_qry WHERE name Like '*rest*'
>
> i opened the recordset in the following way:
>
> set rsCoupons = CreateObject("ADODB.Recordset")
> rsCoupons.Open "SELECT * FROM Business_qry WHERE name Like '*rest*'", _
> "DATABASE=myDB;UID=;PWD=;DSN=myDB"
>
>
> that doesn't work, and the problem is with the operator like and with the
> asterisk.
>
> i succeeded executing the exact same SQL in Access, in it worked fine.
>
> please help if you know the answer.
>
> thanks in advance
>
> eyal maaravi
>
>
Re: passing sql from asp
Author: Thomas J
Date: Fri, 17 Dec 1999 00:00
Date: Fri, 17 Dec 1999 00:00
45 lines
2373 bytes
2373 bytes
Hi,
you must take '%rest%'
mfg
Thomas J.
***********************************************
Homepage: http://www.heckerothconsult.com/Thomas
E-Mail: thomas.juenemann@metronet.de
Eyal Maaravi schrieb in Nachricht
<83bleq$2gh$1@news.netvision.net.il>...
>hi
>
>i want to create a recordset from an ASP page using an SQL
string;
>
>the SQL is:
>
>SELECT * FROM Business_qry WHERE name Like '*rest*'
>
>i opened the recordset in the following way:
>
>set rsCoupons = CreateObject("ADODB.Recordset")
>rsCoupons.Open "SELECT * FROM Business_qry WHERE name Like
'*rest*'", _
> "DATABASE=myDB;UID=;PWD=;DSN=myDB"
>
>
>that doesn't work, and the problem is with the operator
like and with the
>asterisk.
>
>i succeeded executing the exact same SQL in Access, in it
worked fine.
>
>please help if you know the answer.
>
>thanks in advance
>
>eyal maaravi
>
>
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