How to compare a variable against an sql bit field

M

Mirovk

I am having problems making a comparison into my asp program when I
compare against a bit field.

the sintaxis used was:

if (rs_cu("bt_nac") <> 1) then .......

I made the query using the query analyzer and saw that the field value
was NULL so I made the question

if (rs_cu("bt_nac") = NULL) then ........


Either of both questions the program flow via Else instead the
condition were attained.

Help appreciatted.

PD: The SQL construction is shown below:

1.- SQL = "SELECT carrito.*, Productos.ca_producto AS ca_producto,
Productos.co_imp_iva AS co_imp_iva, Productos.nu_peso AS nu_peso,"
SQL = SQL & " Productos.nu_dim_alto AS nu_dim_alto,
Productos.nu_dim_largo AS nu_dim_largo, Productos.nu_dim_ancho AS
nu_dim_ancho, Productos.bt_nac AS bt_nac"
SQL = SQL & " FROM carrito INNER JOIN"
SQL = SQL & " Productos ON Productos.co_producto =
carrito.co_producto"
SQL = SQL & " WHERE (carrito.id_session = " & session.SessionID & ")"

2.- The query result was (the last field was bt_nac):
2069 783347814 37313 1 2006-09-12
00:43:16.700 22500.0000 4500.0000 0 0 NULL 0.69999999 5.5 10.5 10.5 NULL
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top