How VBA accepts "true" in recordset?

H

hanski

Hi.

I have a simple recordset:

Dim Town as New ADODB.connection
Dim Base as New ADODB.recordset
....
....

open.Base "select * from MyDatabase where Field1 =
true",Town,adOpenDynamic, adLockOptimistic

And when I start it, it says:" Invalid column name 'true'.

Field1 has bit-type.

How can I tell it that I want to have all fields that have value True?


Hannu
 
K

kingston via AccessMonster.com

Try:

... WHERE Field1=-1...
Hi.

I have a simple recordset:

Dim Town as New ADODB.connection
Dim Base as New ADODB.recordset
...
...

open.Base "select * from MyDatabase where Field1 =
true",Town,adOpenDynamic, adLockOptimistic

And when I start it, it says:" Invalid column name 'true'.

Field1 has bit-type.

How can I tell it that I want to have all fields that have value True?

Hannu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top