Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is not null 1

Status
Not open for further replies.

mjonson

Technical User
Mar 9, 2004
128
GB
help me understand

have this code
<code>
If Not IsNull (x_pxid) Then
sqlwrk = "SELECT * FROM tbl_stock"
sqlwrk = sqlwrk & " WHERE stockid = " & x_pxid
Set rspx = conn.Execute(sqlwrk)

endif
</code>

...but this query is still being run even though value of
x_pxid is nothing
 
NULL is a special case.

an empty or unassigned variable is not a NULL value.
so it depends on what you are looking for

Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
i would like it if the query is not run if the value
of x_pxid is nothing else the page errors

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[MySQL][ODBC 3.51 Driver][mysqld-4.0.21-debug]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
/dfasp/dealaddmain.asp, line 212
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top